Export complete photo list - Build2024-03-28T21:38:09Zhttp://build.ning.com/forum/topics/export-complete-photo-list?commentId=6308082%3AComment%3A3141&feed=yes&xn_auth=noGot it, thanks!tag:build.ning.com,2011-08-16:6308082:Comment:77312011-08-16T18:34:25.612ZPhil McCluskeyhttp://build.ning.com/profile/PhilMcCluskey
Got it, thanks!
Got it, thanks! Yes although you can get roun…tag:build.ning.com,2011-08-16:6308082:Comment:80102011-08-16T18:32:54.431ZLee Armstronghttp://build.ning.com/profile/LeeArmstrong
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.<br />
<br />
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! :-)
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.<br />
<br />
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! :-) Hi Lee,
Is the issue that som…tag:build.ning.com,2011-08-16:6308082:Comment:77302011-08-16T18:29:03.675ZPhil McCluskeyhttp://build.ning.com/profile/PhilMcCluskey
<p>Hi Lee,</p>
<p>Is the issue that some aspect of the photo will be out of sync with the data that you have on your server?</p>
<p>Thanks,</p>
<p>Phil</p>
<p>Hi Lee,</p>
<p>Is the issue that some aspect of the photo will be out of sync with the data that you have on your server?</p>
<p>Thanks,</p>
<p>Phil</p> Phil,
I have rewritten my c…tag:build.ning.com,2011-08-09:6308082:Comment:66872011-08-09T14:57:50.335ZLee Armstronghttp://build.ning.com/profile/LeeArmstrong
<p>Phil,</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>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…</p>
<p>Phil,</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>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.</p>
<p> </p>
<p>So I suppose I need a way of getting the recently updated items in order as well?</p> Hi Lee,
Yes, that will let yo…tag:build.ning.com,2011-07-27:6308082:Comment:74052011-07-27T15:37:37.765ZPhil McCluskeyhttp://build.ning.com/profile/PhilMcCluskey
<p>Hi Lee,</p>
<p>Yes, that will let you page back through the sets in subsequent calls.</p>
<p>Hi Lee,</p>
<p>Yes, that will let you page back through the sets in subsequent calls.</p> Thanks Phil,
There may be &…tag:build.ning.com,2011-07-27:6308082:Comment:73052011-07-27T15:28:24.239ZLee Armstronghttp://build.ning.com/profile/LeeArmstrong
<p>Thanks Phil,</p>
<p> </p>
<p>There may be >99 so will using the existing anchor method then return the next 99 again in newest to oldest?</p>
<p> </p>
<p>This looks like I can work with this.</p>
<p> </p>
<p>Lee</p>
<p>Thanks Phil,</p>
<p> </p>
<p>There may be >99 so will using the existing anchor method then return the next 99 again in newest to oldest?</p>
<p> </p>
<p>This looks like I can work with this.</p>
<p> </p>
<p>Lee</p> Hi Lee,
Yes. Once you've done…tag:build.ning.com,2011-07-27:6308082:Comment:75012011-07-27T15:06:52.748ZPhil McCluskeyhttp://build.ning.com/profile/PhilMcCluskey
<p>Hi Lee,</p>
<p>Yes. Once you've done the calls to completely import the photos, then you only need to deal with new photos. The API returns new photos first. So depending on the volume of photos being added to your network, you can do a single call to get the newest 99 photos every hour/day and then determine which ones are not in your database and add only those, or, if the frequency of new photos is highly variable, you can use the count call once every hour or so, and then only make a…</p>
<p>Hi Lee,</p>
<p>Yes. Once you've done the calls to completely import the photos, then you only need to deal with new photos. The API returns new photos first. So depending on the volume of photos being added to your network, you can do a single call to get the newest 99 photos every hour/day and then determine which ones are not in your database and add only those, or, if the frequency of new photos is highly variable, you can use the count call once every hour or so, and then only make a call to recent once you've accumulated a large enough set (up to 99) to import.</p>
<p>Hope that helps!</p> Thanks for this Phil,
So wi…tag:build.ning.com,2011-07-27:6308082:Comment:74042011-07-27T14:57:43.868ZLee Armstronghttp://build.ning.com/profile/LeeArmstrong
<p>Thanks for this Phil,</p>
<p> </p>
<p>So will the API <strong>ALWAYS</strong> return the newest photos first?</p>
<p> </p>
<p>So instead of me being able to pass the API a date/anchor photo you are suggesting the following if the above is true.</p>
<ul>
<li>Call API for 99 photos</li>
<li>Scan/import/process them</li>
<li>When I reach a photo that I have seen before then stop else..</li>
<li>Repeat until the above is true</li>
</ul>
<p>Thanks for this Phil,</p>
<p> </p>
<p>So will the API <strong>ALWAYS</strong> return the newest photos first?</p>
<p> </p>
<p>So instead of me being able to pass the API a date/anchor photo you are suggesting the following if the above is true.</p>
<ul>
<li>Call API for 99 photos</li>
<li>Scan/import/process them</li>
<li>When I reach a photo that I have seen before then stop else..</li>
<li>Repeat until the above is true</li>
</ul> Hi Lee,
Is there a reason why…tag:build.ning.com,2011-07-27:6308082:Comment:66582011-07-27T14:33:47.784ZPhil McCluskeyhttp://build.ning.com/profile/PhilMcCluskey
<p>Hi Lee,</p>
<p>Is there a reason why you can't use the Photo/count function to retrieve the number of photos created since x and then do a call to Photo/recent once you've accumulated somewhere in the neighbourhood of 99?</p>
<p>Thanks,</p>
<p>Phil</p>
<p>Hi Lee,</p>
<p>Is there a reason why you can't use the Photo/count function to retrieve the number of photos created since x and then do a call to Photo/recent once you've accumulated somewhere in the neighbourhood of 99?</p>
<p>Thanks,</p>
<p>Phil</p> ??tag:build.ning.com,2011-07-25:6308082:Comment:71042011-07-25T20:55:32.287ZLee Armstronghttp://build.ning.com/profile/LeeArmstrong
??
??