API call for all images in album

ShizamShizam Registered Users Posts: 418 Major grins
An API call to get at least the urls if not all the info for all the images in an album would be nice. As it is I have to get a list of image IDs, then for each ID make another call, if there are 100 images in an album thats 100 requests! Or at least make it so that

smugmug.images.getInfo

Can accept multiple ImageID arguments, so I could get back like 10 at a time...
Ever hear of Optimus Zoom? Me either.
SmugMug iOS Sorcerer

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited May 13, 2007
    Sizam wrote:
    An API call to get at least the urls if not all the info for all the images in an album would be nice. As it is I have to get a list of image IDs, then for each ID make another call, if there are 100 images in an album thats 100 requests! Or at least make it so that

    smugmug.images.getInfo

    Can accept multiple ImageID arguments, so I could get back like 10 at a time...

    Hi Sizam,

    Welcome to dgrin wave.gif

    by calling smugmug.images.get with the Heavy option set...it returns all the info for the images contained with that album. I am pretty sure you will find that a lot easier than having to call smugmug.images.getInfo.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • ShizamShizam Registered Users Posts: 418 Major grins
    edited May 13, 2007
    Thanks,
    and thanks for the quick reply. I just tried with &heavy=1 and with &heavy=true and both only returned the same lite info:

    <rsp stat="ok">
    <method>smugmug.images.get</method><images></images>
    </rsp>
    <#rsp stat="ok">
    <#method>smugmug.images.get
    <#Images>
    <#Image id="122357310"/>
    <#/Images>
    <#/rsp>

    This is for:

    smugmug.images.get


    UPDATE: Heh, nm, I had to spec it as Heavy not heavy :)

    Sam
    devbobo wrote:
    Hi Sizam,

    Welcome to dgrin <img src="https://us.v-cdn.net/6029383/emoji/wave.gif&quot; border="0" alt="" >

    by calling smugmug.images.get with the Heavy option set...it returns all the info for the images contained with that album. I am pretty sure you will find that a lot easier than having to call smugmug.images.getInfo.

    Cheers,

    David
    Ever hear of Optimus Zoom? Me either.
    SmugMug iOS Sorcerer
  • ShizamShizam Registered Users Posts: 418 Major grins
    edited May 14, 2007
    Great, that worked! Not sure if this is the right place to post it but is it possible to get write access to the API WiKi? I didn't find doco on that heavy bit and it'd be real easy to just add a little bit o' info as I go along...
    Ever hear of Optimus Zoom? Me either.
    SmugMug iOS Sorcerer
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited May 14, 2007
    Hi Sizam,

    I'm glad you got it working.

    I am actually in the process of writing a heap of new functionality for API 1.2.1, as part of that process I am going to totally overhaul the API documentation, so don't worry for the moment.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.