2 Documentation Bugs: smugmug.images.getImageInfo
luke_church
Registered Users Posts: 507 Major grins
Issue 1:
Documentation http://www.smugmug.com/hack/method-smugmug.images.getInfo states that LastUpdated will always be provided:
struct
Issue 2: Documentation indicates that watermark is an int, however a string is returned:
int "Watermark"
[php]
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>AlbumID</name>
<value>
<int>803520</int>
</value>
</member>
<member>
<name>Caption</name>
<value>
<string/>
</value>
</member>
<member>
<name>Size</name>
<value>
<int>2851186</int>
</value>
</member>
<member>
<name>Width</name>
<value>
<int>3264</int>
</value>
</member>
<member>
<name>Height</name>
<value>
<int>2448</int>
</value>
</member>
<member>
<name>Position</name>
<value>
<int>1</int>
</value>
</member>
<member>
<name>Serial</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>OriginalURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-O.jpg</string>
</value>
</member>
<member>
<name>LargeURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-L.jpg</string>
</value>
</member>
<member>
<name>MediumURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-M.jpg</string>
</value>
</member>
<member>
<name>SmallURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-S.jpg</string>
</value>
</member>
<member>
<name>TinyURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-Ti.jpg</string>
</value>
</member>
<member>
<name>ThumbURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-Th.jpg</string>
</value>
</member>
<member>
<name>AlbumURL</name>
<value>
<string>http://SmugTools.smugmug.com/gallery/803520/1/35747294</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
[/php]
XML Reponse for an authenticated session, note watermark is a string:
[php]
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>AlbumID</name>
<value>
<int>803534</int>
</value>
</member>
<member>
<name>FileName</name>
<value>
<string>DSC06424.JPG</string>
</value>
</member>
<member>
<name>Caption</name>
<value>
<string/>
</value>
</member>
<member>
<name>Keywords</name>
<value>
<string/>
</value>
</member>
<member>
<name>Position</name>
<value>
<int>1</int>
</value>
</member>
<member>
<name>Date</name>
<value>
<string>2005-09-12 08:08:06</string>
</value>
</member>
<member>
<name>Format</name>
<value>
<string>JPG</string>
</value>
</member>
<member>
<name>Serial</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>Watermark</name>
<value>
<string>0</string>
</value>
</member>
<member>
<name>Size</name>
<value>
<int>2851186</int>
</value>
</member>
<member>
<name>Width</name>
<value>
<int>3264</int>
</value>
</member>
<member>
<name>Height</name>
<value>
<int>2448</int>
</value>
</member>
<member>
<name>MD5Sum</name>
<value>
<string>sm-752f4b6dd01edd213ff636b8dc53d616-sm</string>
</value>
</member>
<member>
<name>LastUpdated</name>
<value>
<string>20050912083156</string>
</value>
</member>
<member>
<name>OriginalURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-O.jpg</string>
</value>
</member>
<member>
<name>LargeURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-L.jpg</string>
</value>
</member>
<member>
<name>MediumURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-M.jpg</string>
</value>
</member>
<member>
<name>SmallURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-S.jpg</string>
</value>
</member>
<member>
<name>TinyURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-Ti.jpg</string>
</value>
</member>
<member>
<name>ThumbURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-Th.jpg</string>
</value>
</member>
<member>
<name>AlbumURL</name>
<value>
<string>http://SmugTools.smugmug.com/gallery/803534/1/35747888</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
[/php]
Documentation http://www.smugmug.com/hack/method-smugmug.images.getInfo states that LastUpdated will always be provided:
struct
- int "AlbumID"
- String "Caption"
- int "Position"
- int "Serial"
- int "Size"
- int "Width"
- int "Height"
- String "LastUpdated"
- String "FileName"
- Owner only
- ...
Issue 2: Documentation indicates that watermark is an int, however a string is returned:
int "Watermark"
- Owner only
[php]
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>AlbumID</name>
<value>
<int>803520</int>
</value>
</member>
<member>
<name>Caption</name>
<value>
<string/>
</value>
</member>
<member>
<name>Size</name>
<value>
<int>2851186</int>
</value>
</member>
<member>
<name>Width</name>
<value>
<int>3264</int>
</value>
</member>
<member>
<name>Height</name>
<value>
<int>2448</int>
</value>
</member>
<member>
<name>Position</name>
<value>
<int>1</int>
</value>
</member>
<member>
<name>Serial</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>OriginalURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-O.jpg</string>
</value>
</member>
<member>
<name>LargeURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-L.jpg</string>
</value>
</member>
<member>
<name>MediumURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-M.jpg</string>
</value>
</member>
<member>
<name>SmallURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-S.jpg</string>
</value>
</member>
<member>
<name>TinyURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-Ti.jpg</string>
</value>
</member>
<member>
<name>ThumbURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-Th.jpg</string>
</value>
</member>
<member>
<name>AlbumURL</name>
<value>
<string>http://SmugTools.smugmug.com/gallery/803520/1/35747294</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
[/php]
XML Reponse for an authenticated session, note watermark is a string:
[php]
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>AlbumID</name>
<value>
<int>803534</int>
</value>
</member>
<member>
<name>FileName</name>
<value>
<string>DSC06424.JPG</string>
</value>
</member>
<member>
<name>Caption</name>
<value>
<string/>
</value>
</member>
<member>
<name>Keywords</name>
<value>
<string/>
</value>
</member>
<member>
<name>Position</name>
<value>
<int>1</int>
</value>
</member>
<member>
<name>Date</name>
<value>
<string>2005-09-12 08:08:06</string>
</value>
</member>
<member>
<name>Format</name>
<value>
<string>JPG</string>
</value>
</member>
<member>
<name>Serial</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>Watermark</name>
<value>
<string>0</string>
</value>
</member>
<member>
<name>Size</name>
<value>
<int>2851186</int>
</value>
</member>
<member>
<name>Width</name>
<value>
<int>3264</int>
</value>
</member>
<member>
<name>Height</name>
<value>
<int>2448</int>
</value>
</member>
<member>
<name>MD5Sum</name>
<value>
<string>sm-752f4b6dd01edd213ff636b8dc53d616-sm</string>
</value>
</member>
<member>
<name>LastUpdated</name>
<value>
<string>20050912083156</string>
</value>
</member>
<member>
<name>OriginalURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-O.jpg</string>
</value>
</member>
<member>
<name>LargeURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-L.jpg</string>
</value>
</member>
<member>
<name>MediumURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-M.jpg</string>
</value>
</member>
<member>
<name>SmallURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-S.jpg</string>
</value>
</member>
<member>
<name>TinyURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-Ti.jpg</string>
</value>
</member>
<member>
<name>ThumbURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-Th.jpg</string>
</value>
</member>
<member>
<name>AlbumURL</name>
<value>
<string>http://SmugTools.smugmug.com/gallery/803534/1/35747888</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
[/php]
0
Comments
Both bugs were against XML-RPC 1.1.0.
Behaviours verified against XML-RPC 1.1.1
Luke
SmugSoftware: www.smugtools.com
I didn't mention that there is extra data returned, not mentioned in the documentation (such as urls), as I presume that the extra data is considered experimental and hence shouldn't be used.
If this isn't the case, and is there to stay, please let me know...
Cheers,
Luke
SmugSoftware: www.smugtools.com