Documentation + Inconsistency Bug: smugmug.users.getTree

luke_churchluke_church Registered Users Posts: 507 Major grins
Issue: Documentation implies album IDs will be integers, as categoryID and SubCategoryIDs are. XML-RPC 1.1.1 returns strings.

Documentation: http://www.smugmug.com/hack/method-smugmug.users.getTree

Array of structs (Categories):
  • int "CategoryID"
  • String Title
    • Array of structs: (SubCategories, if present)
      • SubCategoryID
      • Title
        • Array of structs: (Albums, if present)
          • struct: (Album Info, if Heavy set)
From Album page: http://www.smugmug.com/hack/method-smugmug.albums.get

Array of structs: [empty arrary if no albums]
  • int "AlbumID"
  • String "Title"
  • String "Category"
  • int "CategoryID"
  • String "SubCategory"
  • int "SubCategoryID"

Sample XML:

[php]

<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>CategoryID</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>Title</name>
<value>
<string>Other</string>
</value>
</member>
<member>
<name/>
<value>
<struct>
<member>
<name>SubCategoryID</name>
<value>
<int>111083</int>
</value>
</member>
<member>
<name>Title</name>
<value>
<string>ImagesTest</string>
</value>
</member>
<member>
<name/>
<value>
<struct>
<member>
<name>AlbumID</name>
<value>
<string>804780</string>
</value>
</member>
<member>
<name>Title</name>
<value>
<string>DeleteTest</string>

[/php]

Applies to XML-RPC 1.1.1 BETA. Not testable against 1.1.0
Sign In or Register to comment.