Invalid element names in smugmug.albums.get
peterparker
Registered Users Posts: 89 Big grins
I'm working on what appears to be at least the 2nd Aperture exporter plug-in for SmugMug. I ran into a problem with smugmug.albums.get because it has elements names that start with a number. Not allowed according to XML spec. Any chance this will be fixed in the REST API?
Thanks,
David
Thanks,
David
0
Comments
Actually, I think you might be the 3rd or 4th
Can you please post your request url and response.
Cheers,
David
SmugMug API Developer
My Photos
<rsp stat="ok">
<method>smugmug.albums.get</method>
<0><AlbumID>1991797</AlbumID><Title>Honeymoon</Title><CategoryID>20</CategoryID><Category>Travel</Category></0>
<1><AlbumID>2033148</AlbumID><Title>Rosi and Max</Title><CategoryID>23</CategoryID><Category>Weddings</Category></1>
<2><AlbumID>2064700</AlbumID><Title>Erica and Tyler</Title><CategoryID>23</CategoryID><Category>Weddings</Category></2>
><AlbumID>1991630</AlbumID><Title>Apple Stuff</Title><CategoryID>26</CategoryID><Category>Computers</Category></3>
<4><AlbumID>2000137</AlbumID><Title>Portraits</Title><CategoryID>27</CategoryID><Category>Photography</Category></4>
</rsp>
The indexing elements are not necessary and are not valid element names.
can u please also provide the url that you used to generate this response ?
As I think you might be using the wrong endpoint.
Cheers,
David
SmugMug API Developer
My Photos
http://api.smugmug.com/hack/rest/1.1.1/?method=smugmug.albums.get&SessionID=[snip]
and the response...
[php]
<rsp stat="ok">
<method>smugmug.albums.get</method>
<Albums>
<Album id="1197151">
<Title>Lorne</Title>
<Category id="13">
<Title>Landscapes</Title>
</Category>
</Album>
<Album id="1068138">
<Title>Yarra Glen</Title>
<Category id="13">
<Title>Landscapes</Title>
</Category>
</Album>
<Album id="1056102">
<Title>Melbourne</Title>
<Category id="13">
<Title>Landscapes</Title>
</Category>
</Album>
<Album id="1031195">
<Title>Barwon Heads</Title>
<Category id="13">
<Title>Landscapes</Title>
</Category>
</Album>
<Album id="929680">
<Title>Portland</Title>
<Category id="13">
<Title>Landscapes</Title>
</Category>
</Album></Albums></rsp> [/php]
SmugMug API Developer
My Photos
Odd, I can't get session IDs at the moment from smugmug.login.withPassword.
use /rest/1.1.1/ for all calls
are the sessionIDs coming back as blank or null ?
SmugMug API Developer
My Photos
Where are the REST versions documented?
try clearing your cookie
http://smugmug.jot.com/WikiHome
SmugMug API Developer
My Photos
Another question on this method: is the album list returned always sorted by date last updated? Or is it date last modified? Is there a parameter that can be passed to determine the sort order? I didn't see one in the Wiki so I guess not - but I was hoping maybe there was some undocumented features .
It would also be nice to have some additional meta information about the albums returned here. Date for instance. That way I could at least sort on my end without having to do an individual call for each album returned.
Thanks.