Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Flybits.api.Content.getAll().then(function(resultObj){
- // do things with the first page of relevant Content instances
- console.log(resultObj.result);
- // fetch next page of Content instances if it exists
- return resultObj.nextPageFn? resultObj.nextPageFn():{};
- }).then(function(resultObj){
- // do things with the second page of relevant Content instances
- console.log(resultObj.result);
- // fetch next page of Content instances if it exists
- return resultObj.nextPageFn? resultObj.nextPageFn():{};
- });
- // assuming previous Content instance retrieval
- var contentInstance;
- contentInstance.getData().then(function(obj){
- /**
- * assuming Content JSON body
- * {
- * firstName: "Bob",
- * lastName: "Loblaw",
- * pets: PagedData
- * }
- */
- // bind view to obj.pets.data
- console.log(obj.pets.data);
- if(obj.pets.hasNext()){
- obj.pets.getNext();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement