This question is locked. New answers and comments are not allowed.
I'm a first time Telerik App Builder and Everlive user. I created an Everlive Content Type and defined some fields and created 7 records. Next I tried to login and query but I got an error both times. The code is below (with the API key, login and password changed). I based it on my understanding of some of the examples in the documentation.
For the login attempt I got a "Invalid API key - code 607". For the query I got a "Not found - code 600".
I have a feeling that I am just not connecting to the Content Type (named "JOAD_ImagesDB") properly (although the debugger shows the return value as non-NULL), so the login failed (though I used the name and password of the only user defined for JOAD_ImagesDB) and then no data was retrieved by the query.
Obviously I am doing something wrong, but after hours of struggling I can't figure out what. Can anyone suggest something?
BTW, I am not using Kendo because the app is a very simple one and I don't need the Kendo capabilities.
Thanks in advance for any help anyone may offer.
--Alex
var el = new Everlive({
apiKey: '123456',
url: '//api.everlive.com/v1',
scheme: 'http'
});
Everlive.$.Users.login('abc', // username
'def') // password
.then(function (data) { // success callback, this returns the token that we can store to avoid re-authenticating this user!
alert(JSON.stringify(data));
},
function(error) { // error callback
alert(JSON.stringify(error));
});
var JOAD_data = el.data("JOAD_ImagesDB");
var query = new Everlive.Query();
query.where().lt("Image_Date",LastDate).done().select("Image","Image_Description","Copyright_Owner").take(7);
JOAD_data.get(query) // filter
.then(function(data){
alert(JSON.stringify(data));
},
function(error){
alert(JSON.stringify(error));
});
For the login attempt I got a "Invalid API key - code 607". For the query I got a "Not found - code 600".
I have a feeling that I am just not connecting to the Content Type (named "JOAD_ImagesDB") properly (although the debugger shows the return value as non-NULL), so the login failed (though I used the name and password of the only user defined for JOAD_ImagesDB) and then no data was retrieved by the query.
Obviously I am doing something wrong, but after hours of struggling I can't figure out what. Can anyone suggest something?
BTW, I am not using Kendo because the app is a very simple one and I don't need the Kendo capabilities.
Thanks in advance for any help anyone may offer.
--Alex
var el = new Everlive({
apiKey: '123456',
url: '//api.everlive.com/v1',
scheme: 'http'
});
Everlive.$.Users.login('abc', // username
'def') // password
.then(function (data) { // success callback, this returns the token that we can store to avoid re-authenticating this user!
alert(JSON.stringify(data));
},
function(error) { // error callback
alert(JSON.stringify(error));
});
var JOAD_data = el.data("JOAD_ImagesDB");
var query = new Everlive.Query();
query.where().lt("Image_Date",LastDate).done().select("Image","Image_Description","Copyright_Owner").take(7);
JOAD_data.get(query) // filter
.then(function(data){
alert(JSON.stringify(data));
},
function(error){
alert(JSON.stringify(error));
});