Simple way to get a thumbnail image

pearsonartphotopearsonartphoto Registered Users Posts: 34 Big grins
I'm trying to do an API call to get a thumbnail image representing each album/gallery, but the only way I've found is to call smugmug.images.get() for each album, which would be more calls then I'd like to make. Is there a way to do one of the following:

1) Get a thumbnail for each image.
2) Get one representative image without getting all images (IE, smugmug.images.get(1) or something like that to just get 1 image).

Thanks for your help!

Comments

  • DsweetDsweet Registered Users Posts: 81 Big grins
    edited August 13, 2010
    I'm trying to do an API call to get a thumbnail image representing each album/gallery, but the only way I've found is to call smugmug.images.get() for each album, which would be more calls then I'd like to make. Is there a way to do one of the following:

    1) Get a thumbnail for each image.
    2) Get one representative image without getting all images (IE, smugmug.images.get(1) or something like that to just get 1 image).

    Thanks for your help!

    I dont see anything in the api for the "featured" image in an album, either at the image or album level. Looks like you are stuck calling albums.get and images.get. Images.get can be slow if there are hundreds of images in an album, so it will be slow. There is a similar problem when trying to get a list of all the keywords.
  • DsweetDsweet Registered Users Posts: 81 Big grins
    edited August 23, 2010
    Dsweet wrote: »
    I dont see anything in the api for the "featured" image in an album, either at the image or album level. Looks like you are stuck calling albums.get and images.get. Images.get can be slow if there are hundreds of images in an album, so it will be slow. There is a similar problem when trying to get a list of all the keywords.

    I take this back, see "Highlight struct" in the smugmug.albums.getInfo documentation.
  • pearsonartphotopearsonartphoto Registered Users Posts: 34 Big grins
    edited August 23, 2010
    Thanks, I knew there had to be something... I was going crazy trying to find it myself. I owe you;-)
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited August 23, 2010
    If you are using API 1.2.2, you can add the following to smugmug.albums.get or smugmug.users.getTree to return the Highlight image.

    ...&Extras=Highlight,[Size]URL where [Size] can be Tiny,Thumb,Small, Medium, Large, etc

    Hope this helps.

    David
    David Parry
    SmugMug API Developer
    My Photos
  • pearsonartphotopearsonartphoto Registered Users Posts: 34 Big grins
    edited August 23, 2010
    devbobo,

    You just made my day:-) Thanks so much, that's exactly what I was looking for, and now, well, I'm really excited to release my next version of my Android Portfolio program!
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited August 24, 2010
    glad I could help :D
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.