Album thumbnail..

NitroDeskNitroDesk Registered Users Posts: 38 Big grins
Probably a dumb question.. Is there an easy way to get a thumbnail for each album when you get the album list?
thanks
-goutham
www.NitroDesk.com
A better way to manage your Online Photos

http://nitrodesk.blogspot.com

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited July 4, 2008
    You can grab it using the url below...

    [url]http://[/url][nickname].smugmug.com/photos/random.mg?AlbumID=[AlbumID]&Size=[Tiny|Thumb|Small|etc]&AlbumKey=[AlbumKey]&rand=[random number]

    rand can be excluded, but subsequent calls will most likely retrieve that last thumbnail from the cache.
    David Parry
    SmugMug API Developer
    My Photos
  • NitroDeskNitroDesk Registered Users Posts: 38 Big grins
    edited July 4, 2008
    devbobo wrote:
    You can grab it using the url below...

    [URL="http://"]http://[/URL][nickname].smugmug.com/photos/random.mg?AlbumID=[AlbumID]&Size=[Tiny|Thumb|Small|etc]&AlbumKey=[AlbumKey]&rand=[random number]

    rand can be excluded, but subsequent calls will most likely retrieve that last thumbnail from the cache.

    David,
    Thanks that answers my question. So i can assume none of the API methods actually returns it ?
    -g
    www.NitroDesk.com
    A better way to manage your Online Photos

    http://nitrodesk.blogspot.com
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited July 4, 2008
    NitroDesk wrote:
    David,
    Thanks that answers my question. So i can assume none of the API methods actually returns it ?
    -g
    if a image has been set as the highlight image for a gallery, it should be returned from smugmug.images.getInfo or smugmug.image.get with Heavy as...

    <Highlight id="" Key=""/>

    But if one has not been set (ie. a random image is displayed for the album image), you will need to use the url above.
    David Parry
    SmugMug API Developer
    My Photos
  • NitroDeskNitroDesk Registered Users Posts: 38 Big grins
    edited July 4, 2008
    devbobo wrote:
    if a image has been set as the highlight image for a gallery, it should be returned from smugmug.images.getInfo or smugmug.image.get with Heavy as...

    <Highlight id="" Key=""/>

    But if one has not been set (ie. a random image is displayed for the album image), you will need to use the url above.

    Thanks David,
    here is the problem i am grappling with.. I show a list of albums to the user when the user refreshes the album list, but i dont really like to get the list of pictures for the album unless the user really has drills into it. This means i wont know which image is set to be the highlight (without additional calls). Ideally, as in most other apis, the album's properties contain either a URL to the image or an indication of which image is set as the thumbnail.

    But i think the solution for me us to use the URL method. thanks for that pointer. Just a couple of clarifications though
    1. Can i assume everyone wil have the nickname.smugmug.com as valid host names (even those with custom domain names)?
    2. If a highlight image has been explicitly set, will the URL method return me that highlight image? (if i skip the random parameter)

    thanks!
    -g
    www.NitroDesk.com
    A better way to manage your Online Photos

    http://nitrodesk.blogspot.com
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited July 5, 2008
    NitroDesk wrote:
    1. Can i assume everyone wil have the nickname.smugmug.com as valid host names (even those with custom domain names)?
    yes, you could even request it from www.smugmug.com instead of nickname.smugmug.com and that would work fine.
    NitroDesk wrote:
    2. If a highlight image has been explicitly set, will the URL method return me that highlight image? (if i skip the random parameter)
    yes, even if the random parameter is sent, the highlight image will be returned for albums that have it set.
    David Parry
    SmugMug API Developer
    My Photos
  • blackgold9blackgold9 Registered Users Posts: 52 Big grins
    edited July 13, 2008
    devbobo wrote:
    yes, you could even request it from www.smugmug.com instead of nickname.smugmug.com and that would work fine.

    yes, even if the random parameter is sent, the highlight image will be returned for albums that have it set.

    I'm trying that, but for an album I know has a highlight image, a random image is being returned. Any ideas?
  • Ant177Ant177 Registered Users Posts: 4 Beginner grinner
    edited August 1, 2008
    devbobo wrote:
    if a image has been set as the highlight image for a gallery, it should be returned from smugmug.images.getInfo or smugmug.image.get with Heavy as...

    <Highlight id="" Key=""/>

    But if one has not been set (ie. a random image is displayed for the album image), you will need to use the url above.

    Can you confirm that this new Highlight structure should be in the image.getInfo function as stated above?
    I'm using the 1.2.2 API and I don't seem to be able to find this Highlight property in either the Album or Image properties.

    Any suggestions?
    Thanks
Sign In or Register to comment.