Problem fetching publisher info

Avatar image for mvhaen
mvhaen

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Using the API to fetch information on a specific publisher based on the ID is giving me problems. I've tried other ID's, but am getting the same issue (timeout or Bad Gateway).

http://www.comicvine.com/api/publisher/4010-31/?api_key=*****&format=json

similar urls for a story arc or a volume do work for me

http://www.comicvine.com/api/story_arc/56674/?api_key=*****&format=json

http://www.comicvine.com/api/volume/4050-73420/?api_key=*****&format=json

Anyone have any idea what the problem might be?

Avatar image for spikie
spikie

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#2  Edited By spikie

I'm having the same problem with the publisher (that story arc and volume link works fine for me)

after some investigating it seems to be the Characters field that's the problem.

this throws either http 500 or http 502

http://www.comicvine.com/api/publisher/4010-31/?api_key=*****

this works fine

http://www.comicvine.com/api/publisher/4010-31/?api_key=***&field_list=aliases,api_detail_url,date_added,date_last_updated,deck,description,id,image,location_address,location_city,location_stat,name,site_detail_url,story_arcs,teams,volumes

this contains all the fields except Characters. could it be that the collection is too big? (this publisher is Marvel, they have quite a few characters :) )

Avatar image for donfelipe
DonFelipe

2373

Forum Posts

129833

Wiki Points

0

Followers

Reviews: 6

User Lists: 8

That's definitely timing out because of the 18k characters and the extra content. For each character the API returns the ID, the name, and two additional URLs which is a lot of data. Try using another publisher's ID, for instance 20 for Harvey, and you'll see how much data that already is, and Harvey has less than 500 characters associated with it.

Best practice would be using the field_list to fetch the publisher's basic data first, and then loop through characters/teams/people/etc. whatever you need then.