Using API to retrieve the ID of a specific platform

Avatar image for downeysyndrome
downeysyndrome

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By downeysyndrome

Hello,

I am attempting to use the API system to query the ID of a platform by name, then use that platform id to filter my query results. I cannot seem to get anything but the full list of platforms using my search.

Platform search:

http://www.giantbomb.com/api/platforms/?api_key=[MYAPIKEY]&format=xml&field_list=id,name&query=Genesis

Game search:

http://www.giantbomb.com/api/search/?api_key=[MYAPIKEY]&format=xml&query=%22rocket%20knight%20adventures%22&resources=game&filter=id:[IDFROMSEARCH]

Also, is there a way to only retrieve a certain section of the data from the game search, such as description? If not, I can always just retrieve the data I want via code.

Thank you!

Avatar image for audioslaver756
audioslaver756

5

Forum Posts

112

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

You can get a specific platform by adding &filter=field:value to your request. For example:

http://www.giantbomb.com/api/platforms/?api_key=[KEY]&filter=name:Genesis

You can grab a certain section of data by adding &field_list=field1,field2 to the URL. Example again:

http://www.giantbomb.com/api/platforms/?api_key=[KEY]&filter=name:Genesis&field_list=id,name

Avatar image for downeysyndrome
downeysyndrome

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0