I’m creating a Discord Bot for myself as a programming project. This discord bot is written and is helping me track information about my favorite roblox games. This is my first programming project.
The problem I’m having is that I tried using v1 game api and the information that I get from it about games is either outdated or doesn’t exist for new games that I know is public and played by many people. The thing i realized is that I can’t use the v1 api as it’s outdated and unreliable.
I tried using the v2 api, but I don’t get any data back from it even if the request response gives me the status of 200. The documentation for the v2 api is really bad and I don’t know what to do.
The information that I want on each game is:
- Name
- Description
- Current players
- Total visits
- Last updated
- Game thumbnail
I ran: curl -X 'GET' 'https://games.roblox.com/v1/games?universeIds=920587237' -H 'accept: application/json'
I got this response: { "data": [ { "id": 920587237, "rootPlaceId": 2574207693, "name": "morning", "description": "cool", "sourceName": "morning", "sourceDescription": "cool", "creator": { "id": 732675382, "name": "wormschicken", "type": "User", "isRNVAccount": false, "hasVerifiedBadge": false }, "price": null, "allowedGearGenres": [ "All" ], "allowedGearCategories": [], "isGenreEnforced": true, "copyingAllowed": false, "playing": 0, "visits": 719, "maxPlayers": 10, "created": "2018-11-16T19:29:39.017Z", "updated": "2018-11-17T19:14:24.513Z", "studioAccessToApisAllowed": false, "createVipServersAllowed": false, "universeAvatarType": "MorphToR15", "genre": "All", "isAllGenre": true, "isFavoritedByUser": false, "favoritedCount": 24 } ] }
But this is inaccurate for some of the most popular game ids.
I ran: curl -X 'GET' 'https://games.roblox.com/v2/games/920587237' -H 'accept: application/json'
I got this response: {"errors":[{"code":0,"message":"NotFound"}]}
I ran: curl -X 'GET' 'https://games.roblox.com/v2/games/920587237/media' -H 'accept: application/json'
This is the response: {"data":[]}
I would appreciate any help, thanks!