Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. // Construct a MomentQuery object
  2.  
  3. // Pagers can be set in the constructor
  4. MomentQuery *query = [[MomentQuery alloc] initWithLimit:5 offset:10];
  5.  
  6. // Options for filtering include:
  7.  
  8. // by Zone ID
  9. query.zoneIDs = @[zone1.identifier, zone2.identifier];
  10.  
  11. // by Tag ID
  12. query.tagIDs = @[tag1.identifier, tag2.identifier];
  13.  
  14. // by Moment ID
  15. query.momentInstanceIDs = @[moment1.identifier, moment2.identifier];
  16.  
  17. // Each uses the same API construct:
  18. [APIManager getMoments:query completion:^(NSArray *moments, Pager *pager, NSError *error) {
  19. if (error) {
  20. // handle error
  21. } else {
  22. // handle success
  23. }
  24. }];
  25.  
  26. // NOTE: Other APIs are available including convenience requests and searching.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement