A little confused with the samples in the docs

Avatar image for thirteenpixels
thirteenpixels

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By thirteenpixels

I have a question about the example provided here:

http://api.comicvine.com/documentation/#list_resources

First, the data returned for gender is 1 or 2 for me, not M, F, or Other as the docs suggest.

Second, the filters don't seem to do anything for me either. `fields_list` works as advertised but changing anything else doesn't seem to affect the results.

Am I misunderstanding the example? Can I not find all volumes named 'Batman' by using:

http://api.comicvine.com/volumes/?api_key=<key>&field_list=name&name=Batman

If I'm supposed to use search that's fine, but it seems limiting not being able to filter by particular fields so I'm hoping I'm just missing something.

Thanks for any insight.

Avatar image for LordAndrew
LordAndrew

154

Forum Posts

951

Wiki Points

0

Followers

Reviews: 0

User Lists: 4

#2  Edited By LordAndrew

I had this issue back when Giant Bomb launched their API. They're the exact same examples, and what I said there still applies here too.
The problem is that the example used does not reflect what the API is actually capable of, or what returned data actually looks like. As it stands you cannot actually use those filters. If you want to do that, you'll have to build your own filters into the program. Andy (Lord Sedrik) said they'd get some filters up, and requested some suggestions for possible filters, but it's been three months and it still hasn't happened. :(

Avatar image for mabster
mabster

27

Forum Posts

5

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3  Edited By mabster

I see something similar when trying to get a list of issues. I know that there's a Silver Surfer volume with ID 3857, but this URL:

http://api.comicvine.com/issues/?api_key=...volume=3857

... gets me a list of issues in all sorts of volumes. Perhaps filtering doesn't work, which is fine, but how am I supposed to return a list of issues for a given title?

Avatar image for thirteenpixels
thirteenpixels

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#4  Edited By thirteenpixels

Yea it seems like using search for everything is pretty inefficient for simple things like filtering on a given property. IMO it should be easy and straightforward to look for "invincible #1" in one api call for example.

Avatar image for mabster
mabster

27

Forum Posts

5

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#5  Edited By mabster

Spot on, thirteenpixels. I want to be able to quickly grab the details for an issue, given its volume's ID and its issue number. Additionally I'd like to be able to grab superficial details (using field_list) for all the issues in a given volume.

Avatar image for zengei
zengei

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#6  Edited By zengei
thirteenpixels said:
Yea it seems like using search for everything is pretty inefficient for simple things like filtering on a given property. ... [more]
I agree.
Avatar image for mabster
mabster

27

Forum Posts

5

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#7  Edited By mabster

Any movement on filtering the resource lists? It seems to be broken right now. There doesn't seem to be any way, for example, to get a simple list of issues in a given volume, which is a pretty fundamental way I'd use the API.

Cheers,
Matt

Avatar image for perezmu
perezmu

31

Forum Posts

10156

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#8  Edited By perezmu
@mabster said:
" I see something similar when trying to get a list of issues. I know that there's a Silver Surfer volume with ID 3857, but this URL:

http://api.comicvine.com/issues/?api_key=...volume=3857... gets me a list of issues in all sorts of volumes. Perhaps filtering doesn't work, which is fine, but how am I supposed to return a list of issues for a given title? "

After many tries, I think that what you want to do can be accomplished with this url:

http://api.comicvine.com/volume/3857/?api_key=...yourAPIkey...&format=xml&field_list=name,count_of_issues

(note I filtered the output to show only the name and the issues)... Having this API is great, but the documentations is somewhat brief, and getting things done seems to require much trial and error!
Avatar image for mabster
mabster

27

Forum Posts

5

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#9  Edited By mabster

That looks pretty good, perezmu! I'll have a go using that instead. Ta!

Avatar image for perezmu
perezmu

31

Forum Posts

10156

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#10  Edited By perezmu

Glad I could help. I am trying to write a parser to get the info right to my database, so I will be around for a while asking for help myself!