It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
mrkgnao: Yes. This is the non-redirected link. A redirected link would look something like:
https://www.gog.com/downloads/80_days/en1installer0

How to enable redirection depends on the language you are using. I don't know NodeJS.

I googled "nodejs get redirect url" and found a couple of links that might be relevant:
https://www.tutorialspoint.com/redirecting-requests-in-node-js
https://www.tutorialkart.com/nodejs/node-js-redirect-url/
https://stackoverflow.com/questions/16687618/how-do-i-get-the-redirected-url-from-the-nodejs-request-module

Hope this helps.
Yep, I searched a bit before you sent so I think I get it now. Thanks a lot!

If anything good comes out of it I will share with the community ;)
Is there any API function to query if a game is part of a game collection?

Example:
When I look up Hitman I would like to get IOI Collection (and maybe other collections?) as the result.
avatar
eiii: Is there any API function to query if a game is part of a game collection?

Example:
When I look up Hitman I would like to get IOI Collection (and maybe other collections?) as the result.
open:
- https://api.gog.com/v2/games/1207658996 (Hitman)
then look for:
- isIncludedInGames:
and find:
- "https://api.gog.com/v2/games/1608424141?locale=en-US" (IOI Collection)
but you also find:
- "https://api.gog.com/v2/games/1207665493?locale=en-US" (Ultra Pack Deluxe Turbo HD Remix vol.2, a weird 715-game bundle)

P.S. The same information can be found on gogdb under the "References" tab.
Post edited April 24, 2021 by mrkgnao
avatar
mrkgnao: open:
- https://api.gog.com/v2/games/1207658996 (Hitman)
then look for:
- isIncludedInGames:
and find:
- "https://api.gog.com/v2/games/1608424141?locale=en-US" (IOI Collection)
Thank you! That looks like the info I want. Now I only have to grab the game ID from the store page. Or is there also an API function which maps the game name from the store URL ("hitman") to the game ID?

avatar
mrkgnao: but you also find:
- "https://api.gog.com/v2/games/1207665493?locale=en-US" (Ultra Pack Deluxe Turbo HD Remix vol.2, a weird 715-game bundle)
Interesting game collection. GOG's data are always fun to explore. :D
At least that record can be filtered out easily as it has no store URL.
avatar
mrkgnao: open:
- https://api.gog.com/v2/games/1207658996 (Hitman)
then look for:
- isIncludedInGames:
and find:
- "https://api.gog.com/v2/games/1608424141?locale=en-US" (IOI Collection)
avatar
eiii: Thank you! That looks like the info I want. Now I only have to grab the game ID from the store page. Or is there also an API function which maps the game name from the store URL ("hitman") to the game ID?

avatar
mrkgnao: but you also find:
- "https://api.gog.com/v2/games/1207665493?locale=en-US" (Ultra Pack Deluxe Turbo HD Remix vol.2, a weird 715-game bundle)
avatar
eiii: Interesting game collection. GOG's data are always fun to explore. :D
At least that record can be filtered out easily as it has no store URL.
I don't know of any name-to-id API. You can get it from the game page, but assuming you want it for more than one game, it's more efficient to get it from the catalogue (you get 48 ids with one query, rather than just one).