Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Passing arguments to collection url in Rest Sync adapter in titanium

$
0
0

Here is my model job.js which makes use of restapi adapter from [here] (https://github.com/viezel/napp.alloy.adapter.restapi) Here is my model file:

exports.definition = {
    config: {
        "URL" : 'http://www.example.in/job.php/fetchjobs?offset=0',
        adapter: {
            type: "restapi",
            collection_name: "job"
        }
    },
    extendModel: function(Model) {
        _.extend(Model.prototype, {
            // extended functions and properties go here
        });
 
        return Model;
    },
    extendCollection: function(Collection) {
        _.extend(Collection.prototype, {
            // extended functions and properties go here
        });
 
        return Collection;
    }
};
For the given url 'offset ' is a query string parameter. So i want to know how can i pass different values of offset to this collection url. I am very new to backbone model and collections

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>