Detect Image or Album

56 views
Skip to first unread message

Julián Menéndez

unread,
Feb 19, 2014, 3:22:39 PM2/19/14
to im...@googlegroups.com
Hi,

How can I detect if a imgur id is a single image, an album, or an invalid id without having to make 2 api calls?

api.imgur.com/3/image/r8RaUXW  returns the image data
api.imgur.com/3/gallery/album/r8RaUXW returns error. the album doesn't exist

api.imgur.com/3/image/r8RaUXW  returns error. The image doesn't exist

both api calls fail...

What I'm trying to do is to reduce the number of API calls. 

Julian.

jsar...@mashable.com

unread,
Jan 6, 2016, 3:58:20 PM1/6/16
to Imgur
I have this same question - did you ever figure it out? It's sort of frustrating to have to do two api calls

grimaldi...@gmail.com

unread,
Jan 11, 2016, 9:21:32 AM1/11/16
to Imgur
album are 5 characters long, images 7

quentin...@gmail.com

unread,
Mar 1, 2016, 2:23:24 AM3/1/16
to Imgur
The gallery image data model has an is_album property : https://api.imgur.com/models/gallery_image
Reply all
Reply to author
Forward
0 new messages