Tell me more ×
SmugMug Stack Exchange is a question and answer site for SmugMug developers and end users. It's 100% free, no registration required.

I'm creating an application that has a component that lets the user browse through their SmugMug account from the top level down to a single photo. Looking at the API I have some ideas but have a couple concerns:

  • I don't want to have to request the entire tree, album and photo data every time the user uses the app
  • I don't want to request all the data up front as thats a waste of bandwidth
  • I don't want the local data to get stale and out of date w/SmugMug

Whats the best approach given those bounds?

share|improve this question

2 Answers

The API for getting the albums also tells when they were last updated (See this page). So, you could get the list of albums, see if any of them have been updated at a different time than you updated them, and if so, get the information from that album. Store all of the data you need, and you can pull it up if you need to.

share|improve this answer
2  
There is one gotcha here which is commenting on photos or galleries, replacing images and deleting images don't count as a change and won't show up in the result. – Shizam Feb 7 '12 at 21:25

Given Pearsonartphoto's answer and your comment to that, the only way I see is some kind of middleware on a webserver you control to do the heavy lifting by getting all of the users albums at SmugMug on the clients request, MD5 the result of each album and serve it to the client for comparison. The client would then know what new albums to get and existing albums to refresh.

If you're serious about bandwidth you could even have the server do the comparison and send any updates found to the client. A more complex solution (and fitting for a v2.0) it would enable you to compress the clients transmission significantly.

share|improve this answer

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.