2 Documentation Bugs: smugmug.images.getImageInfo

luke_churchluke_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
  • int "AlbumID"
  • String "Caption"
  • int "Position"
  • int "Serial"
  • int "Size"
  • int "Width"
  • int "Height"
  • String "LastUpdated"
  • String "FileName"
    • Owner only
  • ...
XML analysis indicates it's only provided to the owner. Therefore it needs to be marked as an optional property in the return struct.

Issue 2: Documentation indicates that watermark is an int, however a string is returned:

int "Watermark"
  • Owner only
XML reponse for an anonymous session, not no LastUpdated.

[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&gt;
</value>
</member>
<member>
<name>LargeURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-L.jpg</string&gt;
</value>
</member>
<member>
<name>MediumURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-M.jpg</string&gt;
</value>
</member>
<member>
<name>SmallURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-S.jpg</string&gt;
</value>
</member>
<member>
<name>TinyURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-Ti.jpg</string&gt;
</value>
</member>
<member>
<name>ThumbURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747294-Th.jpg</string&gt;
</value>
</member>
<member>
<name>AlbumURL</name>
<value>
<string>http://SmugTools.smugmug.com/gallery/803520/1/35747294</string&gt;
</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&gt;
</value>
</member>
<member>
<name>LargeURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-L.jpg</string&gt;
</value>
</member>
<member>
<name>MediumURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-M.jpg</string&gt;
</value>
</member>
<member>
<name>SmallURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-S.jpg</string&gt;
</value>
</member>
<member>
<name>TinyURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-Ti.jpg</string&gt;
</value>
</member>
<member>
<name>ThumbURL</name>
<value>
<string>http://SmugTools.smugmug.com/photos/35747888-Th.jpg</string&gt;
</value>
</member>
<member>
<name>AlbumURL</name>
<value>
<string>http://SmugTools.smugmug.com/gallery/803534/1/35747888</string&gt;
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>


[/php]

Comments

Sign In or Register to comment.