Consistency among structures return by the API
chrispat
Registered Users Posts: 7 Beginner grinner
I have been working with the API for awhile now and recently it has started to bother me that the structures that are returned are very in consistent.
For example, when I call getAlbumStats I get an Album Structure. When I call getAlbums or getAlbumInfo I also get an album structure. The problem is the Album structure from the stats method is completely different from the album structure from the get album methods. I have seen similar problems with the image apis and I am sure there are a few more.
To me this makes for a very confusing and difficult to work with API. Is there anyone else out there that sees this as an issue? Or is it only those of use who are working with typed languages (i.e. not javascript or PHP).
Thanks,
Chris
For example, when I call getAlbumStats I get an Album Structure. When I call getAlbums or getAlbumInfo I also get an album structure. The problem is the Album structure from the stats method is completely different from the album structure from the get album methods. I have seen similar problems with the image apis and I am sure there are a few more.
To me this makes for a very confusing and difficult to work with API. Is there anyone else out there that sees this as an issue? Or is it only those of use who are working with typed languages (i.e. not javascript or PHP).
Thanks,
Chris
0
Comments
- Mark
Sorry - the call I was looking at was smugmug.albums.get...
Best regards
Adam
Adam is spot on. For the kallasoft SmugMug Java API I went through quite a few different ways of approaching this issue and discussing things with David, until with the Beta 3 release I was able to finally abstract out everything into the more common groupings... in my case, ini the form of entity classes.
I don't know if this will help you guys out, but so far it's been working great, and these are the entities I found I needed to cover all of 1.2.0 and some of 1.2.1 so far:
http://www.kallasoft.com/resources/smugmug_java_api/documentation/api/com/kallasoft/smugmug/api/json/entity/package-summary.html
Hope that helps.
kallasoft | The "Break It Down" Blog
SmugMug API Developer
My Photos