Options

API v1.3 - Need help with finding into on a specific album

kujainkujain Registered Users Posts: 7 Big grins
hi there!

I was wondering if there's a faster and efficient way of doing this: I have the ID of a spacific album and I need to get its into and images to display on my external site.

Currently I use albums_get() to fetch all albums then I loop through to find the particular album byt checking each album's ID inside the loop. Once found I break and get its images.

This is very inefficient and slow as I need to load all album info just to find one. and it slows down the page load significantly. Could you let me know if there's a better way to do this? eg. album_get('$AMBUM_ID'| '$ALBUM_KEY) ?

Thanks very much!

Comments

  • Options
    David PLDavid PL Registered Users Posts: 80 Big grins
    edited June 14, 2014
    kujain wrote: »
    hi there!

    I was wondering if there's a faster and efficient way of doing this: I have the ID of a spacific album and I need to get its into and images to display on my external site.

    Currently I use albums_get() to fetch all albums then I loop through to find the particular album byt checking each album's ID inside the loop. Once found I break and get its images.

    This is very inefficient and slow as I need to load all album info just to find one. and it slows down the page load significantly. Could you let me know if there's a better way to do this? eg. album_get('$AMBUM_ID'| '$ALBUM_KEY) ?

    Thanks very much!

    If you already have the album id/key and just want the images for that album, just call smugmug.images.get directly.

    If you just want the album properties for that specific album, call smugmug.albums.getInfo with the album id/key.
Sign In or Register to comment.