Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 2.54 KB

UserBansApi.md

File metadata and controls

76 lines (57 loc) · 2.54 KB

UserBansApi

All URIs are relative to https://api.gmodstore.com/v2

Method HTTP request Description
listUserBans GET /users/{user_id}/bans Fetch all active bans associated with this user

listUserBans

UserBanListResponse listUserBans(userId)

Fetch all active bans associated with this user

Example

// Import classes:
import no.everyday.gmodstore_sdk.ApiClient;
import no.everyday.gmodstore_sdk.ApiException;
import no.everyday.gmodstore_sdk.Configuration;
import no.everyday.gmodstore_sdk.auth.*;
import no.everyday.gmodstore_sdk.models.*;
import no.everyday.gmodstore_sdk.api.UserBansApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.gmodstore.com/v2");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    UserBansApi apiInstance = new UserBansApi(defaultClient);
    Long userId = 56L; // Long | Id of the user
    try {
      UserBanListResponse result = apiInstance.listUserBans(userId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling UserBansApi#listUserBans");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
userId Long Id of the user

Return type

UserBanListResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully processed the request. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
429 Too many requests * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset - The UNIX timestamp at which your rate limit quota will reset.
0 Something went wrong * X-RateLimit-Limit -
* X-RateLimit-Remaining -