diff --git a/docs/v1/get-game-progression.md b/docs/v1/get-game-progression.md index b426f9e..1600da9 100644 --- a/docs/v1/get-game-progression.md +++ b/docs/v1/get-game-progression.md @@ -20,6 +20,33 @@ A call to this endpoint will retrieve information about the average time to unlo | `i` | Yes | The target game ID. | | `h` | | 1 to prefer players with more hardcore unlocks than non-hardcore unlocks. | +## Client Library + +::: code-group + +```kotlin [Kotlin] +val credentials = RetroCredentials("", "") +val api: RetroInterface = RetroClient(credentials).api + +val response: NetworkResponse = api.getGameProgression( + gameId = 228, +) + +if (response is NetworkResponse.Success) { + // handle the data + val gameProgression: GetGameProgression.Response = response.body + +} else if (response is NetworkResponse.Error) { + // if the server returns an error it be found here + val errorResponse: ErrorResponse? = response.body + + // if the api (locally) had an internal error, it'll be found here + val internalError: Throwable? = response.error +} +``` + +::: + ## Response ::: code-group