API Update - 27th January 2010
devbobo
Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
G'day Guys,
To support the release of dynamic galleries, there have been a few api modifications.
Method calls smugmug.images.get (with Heavy) and smugmug.images.getInfo for version 1.2.0, 1.2.1, 1.2.2 now return...
- Type, indicates the type of image. possible values are.. Album, Collected or Smart
- Album object, pointing to the originating album (Collected or Smart only)
- User object, point to the originating owner (Collected or Smart only)
For API 1.2.2, you can request this new content without a Heavy call by requesting Extra=Origin,Type with smugmug.images.get.
At this point, there are no methods for defining/retrieving smart rules or collecting images from other galleries via the API, but these should be arriving over the next few weeks.
There are also the following modifications to API 1.2.2...
New methods...
- smugmug.albums.comments.get
- smugmug.images.comments.get
- smugmug.users.getInfo (which replaces smugmug.users.getDisplayName, although it's still callable)
- smugmug.service.ping
- smugmug.users.getStats
- smugmug.albums.getStats
- smugmug.images.getStats
Changes...
- smugmug.categories.get, smugmug.subcategories.get, smugmug.albums.get, smugmug.albums.getInfo and smugmug.users.getTree now return NiceNames
- smugmug.categories.get now returns Type to determine if it's a SmugMug or user defined category
- smugmug.login.withPassword, smugmug.login.withHash, smugmug.auth.getAccessToken and smugmug.auth.checkAccessToken now returns URL to the user's homepage.
- a number of methods (like smugmug.albums.create) now have an Extras parameter so the response can be customised, check the documentation for the specific methods.
Let me know if you run into any issues.
Cheers,
David
To support the release of dynamic galleries, there have been a few api modifications.
Method calls smugmug.images.get (with Heavy) and smugmug.images.getInfo for version 1.2.0, 1.2.1, 1.2.2 now return...
- Type, indicates the type of image. possible values are.. Album, Collected or Smart
- Album object, pointing to the originating album (Collected or Smart only)
- User object, point to the originating owner (Collected or Smart only)
For API 1.2.2, you can request this new content without a Heavy call by requesting Extra=Origin,Type with smugmug.images.get.
At this point, there are no methods for defining/retrieving smart rules or collecting images from other galleries via the API, but these should be arriving over the next few weeks.
There are also the following modifications to API 1.2.2...
New methods...
- smugmug.albums.comments.get
- smugmug.images.comments.get
- smugmug.users.getInfo (which replaces smugmug.users.getDisplayName, although it's still callable)
- smugmug.service.ping
- smugmug.users.getStats
- smugmug.albums.getStats
- smugmug.images.getStats
Changes...
- smugmug.categories.get, smugmug.subcategories.get, smugmug.albums.get, smugmug.albums.getInfo and smugmug.users.getTree now return NiceNames
- smugmug.categories.get now returns Type to determine if it's a SmugMug or user defined category
- smugmug.login.withPassword, smugmug.login.withHash, smugmug.auth.getAccessToken and smugmug.auth.checkAccessToken now returns URL to the user's homepage.
- a number of methods (like smugmug.albums.create) now have an Extras parameter so the response can be customised, check the documentation for the specific methods.
Let me know if you run into any issues.
Cheers,
David
0
Comments
So album type has no bearing on how albums and images are retrieved?
All the images whether they be Album, Collected or Smart are returned by the same call smugmug.images.get.
And albums can contain all types of images in the same album.
Hope that make sense.
Let me know if you have any other questions.
Cheers,
David
SmugMug API Developer
My Photos
I just found error definitions in the documentation! Dreamy!!
The error stuff isn't fully implemented in all functions yet, will be soon hopefully.
SmugMug API Developer
My Photos
SmugMug API Developer
My Photos
Nice. It looks like the new Stats methods return the image level stats for at least the past full year (I didn't try to go back any further than that).
The new API functionality looks good. For the smugmug.albums.comments.get, it would be nice to have a Heavy option that would also return all the image level comments for the album.
To get comments from smugmug.images.get add Comments to the Extras parameter.
&Extras=Comments
SmugMug API Developer
My Photos
Is it part of the changes?
that's not intentional, I'll check.
Cheers,
David
SmugMug API Developer
My Photos
fixed internally, it should go live some time this week.
Thanks,
David
SmugMug API Developer
My Photos
Great. Thanks!
SWEET!
I'm using this to streamline code by removing extra API calls and/or "Heavy" to give me just the info I need in one call with less bandwidth.
clap
this fix is live now
SmugMug API Developer
My Photos
I've got the same in java.
I've also got an "invalid PrintVendor parameter" error when I've been trying to create new Album. Is that new?
I'm using v1.2.2 of the API.
My Photos | [highlight]SmugLoader[/highlight] | [highlight]Facebook[/highlight] | [highlight]Twitter[/highlight]
are you actually sending PrintVendor ? If so, what are you setting it to ?
SmugMug API Developer
My Photos
Nope. I've just checked the generated map of parameters.
That's why I'm asking. It is very odd, since that part of my code worked.
I've also retested my code with the version 1.2.1 of the SM API, and it worked. So there could be an new issue in v1.2.2
My Photos | [highlight]SmugLoader[/highlight] | [highlight]Facebook[/highlight] | [highlight]Twitter[/highlight]
I think I can say that the issue is related to the Strict Error Handling parameter being true, in v1.2.2. When I put it to false, the album gets created.
My Photos | [highlight]SmugLoader[/highlight] | [highlight]Facebook[/highlight] | [highlight]Twitter[/highlight]
Thanks guys
SmugMug API Developer
My Photos
You are welcome!
I've sent you some private emails. Will you have time to reply?
Claudiu
My Photos | [highlight]SmugLoader[/highlight] | [highlight]Facebook[/highlight] | [highlight]Twitter[/highlight]
smugmug.subcategories.create
when the subcategory I want to create already exists?
In the case of a category, not subcategory, the server returns an error
smugmug.categories.create
Is that a bug (in the case of subcategory)?
My Photos | [highlight]SmugLoader[/highlight] | [highlight]Facebook[/highlight] | [highlight]Twitter[/highlight]
My Photos | [highlight]SmugLoader[/highlight] | [highlight]Facebook[/highlight] | [highlight]Twitter[/highlight]
Hey Claudiu,
It's on my list to look at...the issue is more deep seeded than the API itself, so I have a work around I might put in place while I investigate.
Cheers,
David
SmugMug API Developer
My Photos
SmugMug API Developer
My Photos
Is this in relation to the invalid data (catExists) error? I'm receiving it with gallery2smugmug.