Game-hub Project/ Screenshots

Hi every one
In react course part 2 we add screenshots of game to the game details page. in the site when we check screenshots we see this:

as we see in the pic for end point we need game_pk which I have no idea what is it and the type of this is string.

but when we are codeing, we replace pK with id which is a number like this:

does anyone know the reason?

It’s hard to tell from the screenshot, i think it may be the wrong documentation. I assume you’d want to call a single endpoint and get screenshot, text, and slug data and handle it all at once rather than call 4 endpoints for 4 kinds of data.

Traditionally when there are a large list of items you call the endpoint/id to only be sent the data for one game. Then it looks like it’s handling the <screenshot prop as data.

I would look at another documentation for the endpoint /id and see if there is a screenshot property there, that would probably explain, if it’s working of course.

Documentation is often notorious for leaving out key details cause the people who made the endpoints know their apps so well they assume others will understand easily, but it’s often not the case.

As devs we usually have to look at the network tab in dev tools and view the data of a response, then we can piece together how to handle the data or realize if we are using the wrong endpoint.

Game Hub makes storing and managing your DRM-free game collection easier. Download installers, DLCs and bonus content and Game Hub will save your downloads. Game love language test Details Page: Dive deeper into your favorite games with a dedicated Game Details page, featuring rich information, trailers, screenshots , …