Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

I'm trying to get some data with parse by using the REST API in Javascript.

All works well until I try to add a limit and an offset ("skip").

Here, there is the doc to use the parameters with a REST API but only with curl or python. With this post I try to do something like this :

$http.post('https://api.parse.com/1/functions/expressions', option, {
    headers: {
        'X-Parse-Application-Id': 0123456789,
        'X-Parse-REST-API-Key': 9876543210,
        'Content-Type':'application/json'
    },
    params: {
        'limit': limitValue,
        'skip': skipValue 
    }
});

But this only return me the 10th first result even when I increment the skip param.

Does someone have an idea to use this parameters in javascript ?

share|improve this question
    
Curious as to why you're using the REST API instead of the JavaScript SDK? – Timothy Walters Jan 12 at 21:54
    
I'm using the REST API instead of the javascript SDK because my project will be app for ios platform and (cordova) and I already try with the javascript SDK but it doesn't work. – SocialSupaCrew Jan 13 at 8:16

1 Answer 1

up vote 1 down vote accepted

You are calling a Cloud Code function via the REST API here so the documentation doesn't really apply here in terms of the parameters you use unless your function does implement passing through the skip/limit parameter to the query you are doing in your function. Otherwise they will simply be ignored.

share|improve this answer
1  
Thank you, after looking the function in Cloud Code I found how to use my parameters. – SocialSupaCrew Jan 13 at 8:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.