speedruncomorg / api

REST API Documentation for speedrun.com
349 stars 35 forks source link

Crash when embedding game.variables #95

Open Avasam opened 4 years ago

Avasam commented 4 years ago

Action: GET https://www.speedrun.com/api/v1/users/qjn1wzw8/personal-bests?embed=game.variables

Result: 500 Server Error: Internal Server Error

Excepted result: A JSON object representing the player's PBs with variables

Ultimately I wanted to do: GET https://www.speedrun.com/api/v1/users/qjn1wzw8/personal-bests?embed=level,game.levels,game.variables to massively reduce the amount of requests I do to the API.

AnInternetTroll commented 4 years ago

I think you used . instead of , because GET https://www.speedrun.com/api/v1/users/qjn1wzw8/personal-bests?embed=game,variables works for me with no error.

Avasam commented 4 years ago

@AnInternetTroll I did mean . this embeds resources in an embedded resource, see: Embedding#Recursion

dbeal-eth commented 4 years ago

possibly related, the following link returns 500: https://www.speedrun.com/api/v1/games/ldeolx63?embed=levels.variables,categories.variables,platforms,regions,developers,publishers,genres

altering the query to change levels.variables to just levels does not return an error:

https://www.speedrun.com/api/v1/games/ldeolx63?embed=levels,categories.variables,platforms,regions,developers,publishers,genres