At the moment I am using my own PHP code and cURL to make some requests to the API (99 at a time) to iterate through all photos and store in a MySQL database at my end.


Each time I run this I go through all of the photos again and that is getting quite large!


Is there a way to say only check for photos between a date/time at all so that I don't do the whole lot?  Can this form part of the REST query?  Or is the anchor on the last request valid for the next request at all?  Bearing in mind the last set will more than likely be <99 photos!


Let me know if anything is not clear at all.

Views: 240

Reply to This

Replies to This Discussion



I have rewritten my code and it works great.  However I think there is something I cannot achieve without looping through all the items...take the following example.


Say I have 10000 photos and I edit/update the oldest one on the Ning site itself.  This will still be listed as the oldest as I presume you sort them by createdDate.  Therefore to know that an item has been updated I still need to scan the whole list 100 at a time because this will not be at the top!  Once I get there I can check the updatedDate property but I have just made 100 API calls to get there.  If I was to repeat this call every hour this adds up.


So I suppose I need a way of getting the recently updated items in order as well?

Hi Lee,

Is the issue that some aspect of the photo will be out of sync with the data that you have on your server?



Yes although you can get round it by scanning all 10000 using the API but that is then making 1000 calls unessesarily to the API.

If you could do the same for updated as we can for created then we can be leaner on our API usage which I think we both want! :-)
Got it, thanks!

Reply to Discussion


Blog Posts

Getting Started

Posted by Kyle Ford on October 13, 2010 at 8:00am 3 Comments

A Note on API Pricing

Posted by Phil McCluskey on October 1, 2010 at 8:55am 0 Comments

Welcome to Build!

Posted by Kyle Ford on September 30, 2010 at 8:30pm 1 Comment

Ning Status

© 2024   Created by Build Team.   Powered by

Badges  |  Report an Issue  |  Terms of Service