Options

Inconsistent album.getInfo response (login.anonymously vs. withPassword)

darryldarryl Registered Users Posts: 997 Major grins
So, as I was messing with the API (1.2.0), I discovered a small little difference in the format of the response you get back from album.getInfo depending on if you've logged in anonymously or withPassword. Namely, the Album id is not returned as an attribute when you login anonymously.

Anonymously:
<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok">
  <method>smugmug.albums.getInfo</method>
  <Album Position="18" ImageCount="16" Title="Foo" Description="Bar" LastUpdated="2007-09-24 16:49:01">
    <Album id="1234567"/>
    <Highlight id="0"/>
    <Category id="123456"/>
    <SubCategory id="0"/>
  </Album>
</rsp>

With Password:
<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok">
  <method>smugmug.albums.getInfo</method>
  <Album id="1234567" Position="18" ImageCount="16" Title="Foo" Description="Bar" Keywords="" Public="1" Password="" PasswordHint="" Printable="1" Filenames="1" Comments="1" External="1" Originals="1" EXIF="1" Share="1" SortMethod="Position" SortDirection="0" LastUpdated="2007-09-24 16:49:01" FamilyEdit="0" FriendEdit="0" HideOwner="0" CanRank="0" Clean="0" Geography="1" SmugSearchable="1" WorldSearchable="0" Larges="1" Protected="0" Watermarking="0" DefaultColor="0" ProofDays="0" Backprinting="" Header="1">
    <Highlight id="0"/>
    <Category id="123456"/>
    <SubCategory id="0"/>
    <Community id="0"/>
    <Watermark id="0"/>
    <Template id="0"/>
  </Album>
</rsp>

Sure, you get lots more info when you're logged in. I understand that.

But why does the format change? And sure, it's unlikely that you'll be logging in differently in the same code, but it's kind of annoying if you've got two different apps, or if you're just trying to learn the darned API. :-{

Comments

  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 14, 2007
    G'day Darryl,

    Looks like it could be a bug. I will have a closer look tomorrow.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited October 15, 2007
    the bug fix for this issue is now live.
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    darryldarryl Registered Users Posts: 997 Major grins
    edited October 16, 2007
    Da, is good. Thanks!

    --Darryl
Sign In or Register to comment.