From e3840e18dc8e617b96e66956b30c5e20d6040a54 Mon Sep 17 00:00:00 2001 From: Wizard <55814558+official-wizard@users.noreply.github.com> Date: Sat, 20 Dec 2025 15:18:20 -0500 Subject: [PATCH] docs: add Kotlin example for API_GetUserSetRequests --- docs/v1/get-user-set-requests.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/v1/get-user-set-requests.md b/docs/v1/get-user-set-requests.md index 2409525..0c6a8cb 100644 --- a/docs/v1/get-user-set-requests.md +++ b/docs/v1/get-user-set-requests.md @@ -28,7 +28,30 @@ You must query the user by either their username or their ULID. Please note the ## Client Library -Not Yet Supported +::: code-group + +```kotlin [Kotlin] +val credentials = RetroCredentials("", "") +val api: RetroInterface = RetroClient(credentials).api + +val response: NetworkResponse = api.getUserSetRequests( + userId = "MaxMilyin" +) + +if (response is NetworkResponse.Success) { + // handle the data + val userSetRequests: GetUserSetRequests.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