Searching for a single game using id or guid

Avatar image for slynas
Slynas

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By Slynas

Hello Coders,

I have been working on a project of mine to practice React.js and I am having trouble making a fetch request for a single game.

I used `http://www.giantbomb.com/api/search/api_key=${process.env.API_KEY}&format=json&query="${title}"&resources=gam e` to get a list of games with the same titles.

Now I wanted to try getting a single game using the guid or id.

Ive been trying `http://www.giantbomb.com/api/${gameId}}/?api_key=${process.env.API_KEY}&format=json` but I have been getting no luck at all.

Avatar image for swystem
Swystem

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

I'm having a similar issue, but I think you're using the wrong URL for your request; getting a single game should be:

"https://www.giantbomb.com/api/game/{gameId}/?api_key={API KEY}&format=json"

If this works for you, please let me know because when I use Axios to make this request it gives me a 404 error but Postman returns the expected result.