Any request involving Objects: 301 error moved permanently

Avatar image for redhawkxx
redhawkxx

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By redhawkxx

I have been trying request objects, ideally with a query that returns guns. I’ve had success finding these objects through the search function on the site and have been trying to replicate the results with API requests. Here’s what I’ve tried so far:

Return Objects:

http://www.giantbomb.com/api/objects?api_key=[MY KEY]&format=json&limit=10

Return results from query for objects limiting scope by resource or resource_type:

http://www.giantbomb.com/api/search?api_key=[MY KEY]&resources=object&format=json&limit=10

http://www.giantbomb.com/api/search?api_key=[MY KEY]&resource_type=object&format=json&limit=10

http://www.giantbomb.com/api/search?api_key=[MY KEY]&resource_type=object&resources=object&format=json&limit=10

I’ve also tried searching for different objects. Often there would be a count of items returned, but never any results in the results array.

No Caption Provided

Or if I searched by resource_type: objects, I would get results but none of them would be the resource_type of objects (it would return mainly games).

**I realized that the actual URL for Objects on both the Comic Zine and GiantBomb websites have been changed from “Objects” to “Things”, which is likely the source of the “301 moved permanently” message.**

Not sure if devs are regularly on this forum. If not, any idea who I should contact? Or has anyone solved this problem?

Avatar image for laika
laika

148

Forum Posts

1

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

I think the source of your 301s is actually that the API endpoints should have a trailling '/' before the query string (yes, it's weird). The bad results are just a bug. 'Thing' is just a label.

The search API is kind of an odd duck. You might get better results by using the /objects endpoint this type of request:

http://www.giantbomb.com/api/objects/?filter=name:gun&limit=10&api_key=key&format=json