Skip to content

baptgb/backbone-espresso-logic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backbone-espresso-logic

/!\ This README is currently out-dated /!\

About :

backbone-espresso-logic provides a simple way to adapt your Backbone.Model to Espresso Logic API requests and responses by providing API Filter configuration and response data parsing.

Licence: MIT (see LICENCE file)

API Filter usage :

// Create the model and set the urlRoot for example
var MyModel = Backbone.EspressoLogic.Model.extend({
    myProp: 'myPropValue',
    urlRoot: 'https://api.com/my/resource'
});
//
var resourceId = 1;
var myModel = new MyModel(
    { some: "attribute" },
    { apiFilter: "?filter=id = '" + resourceId + "'" } // Passing apiFilter option to append to the url
},)
// myModel.url(); will result "https://api.com/my/resource?filter=id = '1'"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published