anx-api icon indicating copy to clipboard operation
anx-api copied to clipboard

Add service wrapper / model layer

Open tsantef opened this issue 9 years ago • 0 comments

Here is an example of a service/model layer that would be useful.

var creatives = anxApl.service('creative');

creatives.getById(983904).then(function (creative) {
  creative.name = 'new name';
  return creative.save();
})

creatives.get(pageNumber, pageSize).then(function (records) { ... })

creatives.next() // gets next page
creatives.prev() // get previous page
creatives.all()

tsantef avatar Mar 24 '16 19:03 tsantef