How to user 'field_list' when wanting to limit 1 level down?

Avatar image for tuy
tuy

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By tuy

Hi,

How can I use field_list to limit the fields returned when I want to limit a sub value.

f.e. on the search call I only want to get 'name' on the 'volume' tag of the results. When I specify 'volume' it returns the complete node (as expected), but I only need the name. So how can I limit the node 1 level down?

Thanks,

Avatar image for matthewlupo
matthewlupo

29

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Hello @tuy,

You should be able to add &field_list= to your query with the fields that you'd like, separated by commas. So if you just need the name something like this should work:

http://www.comicvine.com/api/search/?api_key=YOUR_API_KEY&query=the%20AND%20walking%20AND%20dead&resources=volume&field_list=name

Or, if you need some more info:

http://www.comicvine.com/api/search/?api_key=YOUR_API_KEY&query=the%20AND%20walking%20AND%20dead&resources=volume&field_list=name,image,start_year

Is this something that you were looking for?

Avatar image for tuy
tuy

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3  Edited By tuy

Hi @matthewlupo Thanks for replying.

That I know, but I'm having a problem with nested fields. f.e. Issue get a volume tag returned, and that tag has a name, but a lot of other stuff to. I only want that name field of the field volume, not the rest. How can I achieve this?

Avatar image for matthewlupo
matthewlupo

29

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

No problem @tuy,

Ahh, gotcha. Unless there's something I'm not seeing, I don't think there's a way to restrict fields one one level down. So if you want info on the Volume, you'll get some additional stuff to show some basic info about the object you are requesting.

Avatar image for tuy
tuy

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

ok, thanks