Quickblox: How to make paged request of Custom Objects
ios, quickblox, sdk
Solution
Use limit & skip params
NSMutableDictionary *getRequest = [NSMutableDictionary dictionary];
[getRequest setObject:@"10" forKey:@"limit"];
[getRequest setObject:@"10" forKey:@"skip"];
[QBCustomObjects objectsWithClassName:@"SuperSample" extendedRequest:getRequest delegate:self];
Problem
I have a custom object (QBCustomObjects) for my application which has more than 100 entries. In my application, I would like to retrieve all of them, but haven't figured out how to do that using Quickblox iOS SDK (using version with latest git commit: Wed Nov 27 18:52:20 2013). Is is possible to make request using PagedRequest like with QBUsers call: ``` PagedRequest *request = [[PagedRequest alloc] init]; request.perPage = pageSize; request.page = page; [QBUsers usersWithPagedRequest:request delegate:self]; ``` Or is is possible to make this request somehow using extended request parameters? Something with: ``` [QBCustomObjects objectsWithClassName:@"Movie" extendedRequest:getRequest delegate:self]; ``` Or is there some other method to do this? I have tried to read the developer documentation and check samples but haven't found the way to do this. For the normal requests, I get nice paged result (QBCOCustomObjectPagedResult) on my QBActionStatusDelegate, but really can't find any documentation of how to create the paged request. All suggestions and comments are appreciated. Thanks in advance!