v1.1.1 released, v1.2.0 in beta

onethumbonethumb Administrators Posts: 1,269 Major grins
I'm sure you already know by now, but the news is on the blog and the details are on the Wiki. :)

Don

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 21, 2006
    Please note that the REST responses have changed slightly to make parsing easier..

    REST 1.1.1 response
    <?xml version="1.0" encoding="utf-8" ?>
    <rsp stat="ok">
     <method>smugmug.images.get</method>
      <Images>
       <Image id="110912627">
        <Info>
         <Image id="110912627">
          <Album id="2140742" />
          <FileName>56193485-S-2.jpg</FileName>
    
          <Caption />
          <Keywords> 56193485</Keywords>
          <Position>1</Position>
          <Date>2006-11-16 21:46:12</Date>
          <Format>JPG</Format>
          <Serial>0</Serial>
    
          <Watermark>0</Watermark>
          <Size>19177</Size>
          <Width>200</Width>
          <Height>300</Height>
          <MD5Sum>962c182ec3ea63e83c6959f887b61111</MD5Sum>
          <LastUpdated>2006-11-16 22:13:13</LastUpdated>
    
          <OriginalURL>http://introversion.smugmug.com/photos/110912627-O.jpg</OriginalURL>
          <LargeURL>http://introversion.smugmug.com/photos/110912627-L.jpg</LargeURL>
          <MediumURL>http://introversion.smugmug.com/photos/110912627-M.jpg</MediumURL>
          <SmallURL>http://introversion.smugmug.com/photos/110912627-S.jpg</SmallURL>
          <TinyURL>http://introversion.smugmug.com/photos/110912627-Ti.jpg</TinyURL>
          <ThumbURL>http://introversion.smugmug.com/photos/110912627-Th.jpg</ThumbURL>
    
          <AlbumURL>http://introversion.smugmug.com/gallery/2140742/1/110912627</AlbumURL>
         </Image>
        </Info>
       </Image>
      </Images>
    
    </rsp>
    

    REST 1.2.0 response
    <?xml version="1.0" encoding="utf-8"?>
    <rsp stat="ok">
      <method>smugmug.images.get</method>
      <Images>
        <Image id="110912627" FileName="56193485-S-2.jpg" Caption="" Keywords=" 56193485" Position="1" Date="2006-11-16 21:46:12" Format="JPG" Serial="0" Watermark="0" Size="19177" Width="200" Height="300" MD5Sum="962c182ec3ea63e83c6959f887b61111" LastUpdated="2006-11-16 22:13:13" OriginalURL="http://introversion.smugmug.com/photos/110912627-O.jpg" LargeURL="http://introversion.smugmug.com/photos/110912627-L.jpg" MediumURL="http://introversion.smugmug.com/photos/110912627-M.jpg" SmallURL="http://introversion.smugmug.com/photos/110912627-S.jpg" TinyURL="http://introversion.smugmug.com/photos/110912627-Ti.jpg" ThumbURL="http://introversion.smugmug.com/photos/110912627-Th.jpg" AlbumURL="http://introversion.smugmug.com/gallery/2140742/1/110912627">
          <Album id="2140742"/>
        </Image>
      </Images>
    </rsp>
    
    David Parry
    SmugMug API Developer
    My Photos
  • javier.rinaldijavier.rinaldi Registered Users Posts: 210 Major grins
    edited November 21, 2006
    awesome, as for v1.2.1 I'd like to put in a request (if at all possible) for getting and posting customization fields (CSS, Header, Footer, Java, etc..) from API this would work great along with my extension :D
    Jav


    Creator of: SmugManager

    "There's no dark side or the moon, really. Matter of fact it's all dark..."
  • StardogStardog Registered Users Posts: 15 Big grins
    edited November 21, 2006
    I'm getting error 18, Invalid key when using the php endpoint, and version 1.2.0.

    Can anyone else confirm that it is working correctly with serialized PHP?

    Brian
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited November 21, 2006
    Stardog wrote:
    I'm getting error 18, Invalid key when using the php endpoint, and version 1.2.0.

    Can anyone else confirm that it is working correctly with serialized PHP?

    Brian

    What method are you calling? Seems to be working for me, but maybe I'm doing something different?
  • StardogStardog Registered Users Posts: 15 Big grins
    edited November 21, 2006
    onethumb wrote:
    What method are you calling? Seems to be working for me, but maybe I'm doing something different?

    Well, as I've said before, I had been using most methods on the unofficial 1.1.1 php endpoint. So when I saw 1.2.0 was released, I just changed the url to point to 1.2.0 version, and since my password for previous sessions have expired, I am doing smugmug.login.withPassword.
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited November 21, 2006
    Stardog wrote:
    Well, as I've said before, I had been using most methods on the unofficial 1.1.1 php endpoint. So when I saw 1.2.0 was released, I just changed the url to point to 1.2.0 version, and since my password for previous sessions have expired, I am doing smugmug.login.withPassword.

    Hmm, I just did "smugmug.login.withPassword" and it worked fine.

    You're getting an invalid API key error?
  • StardogStardog Registered Users Posts: 15 Big grins
    edited November 21, 2006
    onethumb wrote:
    Hmm, I just did "smugmug.login.withPassword" and it worked fine.

    You're getting an invalid API key error?

    Nevermind...After placeing some more debug messages in place, I noticed that it did indeed get a response from the login, but since the data returned has changed since the 1.1.1 (that I was previosly using), I was capturing the sessionID, which was causing the Invalid API key errors (which were actually coming from calls to other methods).

    False alarm...

    Brian
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited November 21, 2006
    Stardog wrote:
    Nevermind...After placeing some more debug messages in place, I noticed that it did indeed get a response from the login, but since the data returned has changed since the 1.1.1 (that I was previosly using), I was capturing the sessionID, which was causing the Invalid API key errors (which were actually coming from calls to other methods).

    False alarm...

    Brian

    Cool. Be sure to holler if we're doing something braindead with the new format - but everyone who we've passed it by so far loves it, so I'm hoping you do too. :)
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 21, 2006
    awesome, as for v1.2.1 I'd like to put in a request (if at all possible) for getting and posting customization fields (CSS, Header, Footer, Java, etc..) from API this would work great along with my extension :D

    Hey Javier,

    May i recommend that you look at using JSON instead of REST, it works like magic in javascript...so much easier to process, and reduces the response overhead.

    Holler if you have any questions.

    David
    David Parry
    SmugMug API Developer
    My Photos
  • StardogStardog Registered Users Posts: 15 Big grins
    edited November 21, 2006
    onethumb wrote:
    Cool. Be sure to holler if we're doing something braindead with the new format - but everyone who we've passed it by so far loves it, so I'm hoping you do too. :)

    I haven't had time to check all the methods, but so far it looks really nice. I did notice one thing. I used to do smugmug.albums.get with Heavy=1 to get all the info for all the albums. It appears to not be returning the album info.

    I'll let you know if I see any other problems.

    Brian
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 21, 2006
    Stardog wrote:
    I haven't had time to check all the methods, but so far it looks really nice. I did notice one thing. I used to do smugmug.albums.get with Heavy=1 to get all the info for all the albums. It appears to not be returning the album info.

    I'll let you know if I see any other problems.

    Brian

    Thanks Brian.

    We're on it thumb.gif
    David Parry
    SmugMug API Developer
    My Photos
  • javier.rinaldijavier.rinaldi Registered Users Posts: 210 Major grins
    edited November 21, 2006
    devbobo wrote:
    Hey Javier,

    May i recommend that you look at using JSON instead of REST, it works like magic in javascript...so much easier to process, and reduces the response overhead.

    Holler if you have any questions.

    David

    wow, no kidding this is easier, no need to parse .. just call an object thumb.gif
    Jav


    Creator of: SmugManager

    "There's no dark side or the moon, really. Matter of fact it's all dark..."
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 21, 2006
    wow, no kidding this is easier, no need to parse .. just call an object thumb.gif

    yeah....just use an eval statement on the result to turn it into an object, something like this...


    var result = eval('(' + xmlhttp.responseText + ')');
    David Parry
    SmugMug API Developer
    My Photos
  • javier.rinaldijavier.rinaldi Registered Users Posts: 210 Major grins
    edited November 21, 2006
    devbobo wrote:
    yeah....just use an eval statement on the result to turn it into an object, something like this...


    var result = eval('(' + xmlhttp.responseText + ')');

    sweet, that was so easy to implement. I love js object variables.
    Jav


    Creator of: SmugManager

    "There's no dark side or the moon, really. Matter of fact it's all dark..."
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 21, 2006
    sweet, that was so easy to implement. I love js object variables.

    15524779-Ti.gif
    David Parry
    SmugMug API Developer
    My Photos
  • TazzyTazzyTazzyTazzy Registered Users Posts: 32 Big grins
    edited November 28, 2006
    As far as features. I have the following requests for 1.2.1 (if there is a better place for requests, where should I put it?):

    1) Access to comments. Read, post, admister (edit/delete). Also, a way to see the last XX comments so comments can quickly be reviewed without going to all the pictures.

    2) Keywords.
    2a: Search/display by keyword - results being image ID's with keywords listed.
    2b: Show related words based on keywords displayed - much like smugmug does now. But, if 2b would take too much time, i'd settle for 2a. :D

    3) Last XX pictures (XX being an argument on the number of images to return). Result would be the last XX pictures uploaded to smugmug or (with an argument) to an album, subcategory, or category.

    4) Random XX pictures (XX being an argument on the number of images to return). Result would return random image ID's. Arguments would be to allow private or password protected image IDs to be displayed. Also, just random image from either an album, subcategory, or category.

    5) Search by description of images.

    That's all for now. rolleyes1.gif Heh

    Thanks smugmug peeps - your the best...est..
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited November 30, 2006
    TazzyTazzy wrote:
    As far as features. I have the following requests for 1.2.1 (if there is a better place for requests, where should I put it?):

    1) Access to comments. Read, post, admister (edit/delete). Also, a way to see the last XX comments so comments can quickly be reviewed without going to all the pictures.

    This is going to be tough, especially posting, because comment spam is a big deal. Easy to do logged in, difficult to do for someone who doesn't have an account.
    TazzyTazzy wrote:
    2) Keywords.
    2a: Search/display by keyword - results being image ID's with keywords listed.
    2b: Show related words based on keywords displayed - much like smugmug does now. But, if 2b would take too much time, i'd settle for 2a. :D

    You can already do 2a using feeds. I'm not inclined to add anything to the API right now that can't be accomplished using feeds, since I'd rather work on API things that you cannot do using them.

    2b's interesting. I'll think about it.
    TazzyTazzy wrote:
    3) Last XX pictures (XX being an argument on the number of images to return). Result would be the last XX pictures uploaded to smugmug or (with an argument) to an album, subcategory, or category.

    You can do this with feeds already.
    TazzyTazzy wrote:
    4) Random XX pictures (XX being an argument on the number of images to return). Result would return random image ID's. Arguments would be to allow private or password protected image IDs to be displayed. Also, just random image from either an album, subcategory, or category.

    This will be tough. We have customers with over 200,000 images. I can't easily get a random subset of them right now.
    TazzyTazzy wrote:
    5) Search by description of images.

    You can do this with feeds too.

    Don
  • StardogStardog Registered Users Posts: 15 Big grins
    edited November 30, 2006
    onethumb wrote:
    This is going to be tough, especially posting, because comment spam is a big deal. Easy to do logged in, difficult to do for someone who doesn't have an account.
    I woud certainly pass any comments through akismet before submitting them to smugmug. They have a great api, which I use for filtering out spam submitted on my blog.

    Brian
Sign In or Register to comment.