Image Gallery

Avatar image for risseless
risseless

578

Forum Posts

40649

Wiki Points

0

Followers

Reviews: 1

User Lists: 10

#1  Edited By risseless

I'm new to this GB API thing (very awesome by the way), but I don't see a way in the documentation to get a list of galleries for a game, or see what galleries an image is in, etc. Nothing to do with galleries whatsoever. Any plans for this? Did I miss it in the docs?

Avatar image for mosdl
mosdl

3422

Forum Posts

2951

Wiki Points

0

Followers

Reviews: 3

User Lists: 5

#2  Edited By mosdl

You do get a list of images, but it doesn't contain all images

Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#3  Edited By LordAndrew

You can only get the default image, plus 10 of the most recent images if the resource is a game. That's probably best, actually. You really don't want to run into copyright problems with images you can't even control. You could probably claim fair use for the default image and ten screenshots. Anything more may be risking it.
 
If you really want to grab all the images from a gallery, maybe you could try scraping.

Avatar image for risseless
risseless

578

Forum Posts

40649

Wiki Points

0

Followers

Reviews: 1

User Lists: 10

#4  Edited By risseless

I was going to use it to make a list of games that are missing box art, by looking in each game's "Box Art" gallery. But I can make the assumption that the primary image is the box art. It's not quite as accurate, but good enough.

Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#5  Edited By LordAndrew
@risseless: Even without knowing whether it's box art, that would be a very useful list. Myself, I've thought about using the API to generate various types of lists for maintenance purposes. Have you ever seen the database reports on Wikipedia? I love those things. Of course we don't have database access like toolserver users do, but the API is a decent alternative.
 
For these kinds of things, perhaps the API could at least provide metadata about images. Even if we can't access the images directly, knowing whether what galleries exist and how many images are in a gallery would be very useful. You could check whether a game has box art, or you could get a list of games that have galleries for platforms that the game wasn't actually released on. More valuable information could be made available if they opened up the API a bit more.
 
Of course, since that information's not available, getting what you want is more difficult. You could get a list of games from the API, and assume that games without images are also without box art. For games with images, you would have to fetch the actual gallery page and grep for the Box Art gallery. If there are no images in that gallery, then you can assume it is a game without box art. Unfortunately, since the image counts aren't completely reliable, you would probably want to fetch the contents of the Box Art gallery too and actually check for the presence of images. It's a bit cumbersome, but it can get you the information you want.
Avatar image for risseless
risseless

578

Forum Posts

40649

Wiki Points

0

Followers

Reviews: 1

User Lists: 10

#6  Edited By risseless
@LordAndrew:  I had not seen the Wikipedia database reports, but that kind of maintenance/status statistics are why I am interested in the API. I'm thinking about using it to compile a list of places that need work -- games with no releases, people with no associated game, etc. This would allow me (and anyone else) to know where the work needs to be done without having to take stabs in the dark. The API is fantastic, but doesn't quite give the same level of queriability as SQL, and unfortunately not all parts of the site are available it seems. Doubt the staff will give me database access though, so I'll make due with browsing games looking for conditions that match. =)
 
No idea how soon I'd get to something like this. I was just tossing around the idea in my head and playing with the API to see what's possible.