java.lang.Object
markets.alpaca.client.openapi.broker.api.OAuthApi

public class OAuthApi extends Object
Generated client for OAuthApi operations.

This class is generated from the configured OpenAPI spec. Operation method Javadocs include OAS summaries, descriptions, parameters, return types, response details, and external documentation links when present in the spec.

Operations

  • authorizeOAuthToken: Authorize an OAuth Token
  • getOAuthClient: Get an OAuth client
  • issueOAuthToken: Issue an OAuth token
  • Constructor Details

    • OAuthApi

      public OAuthApi()
    • OAuthApi

      public OAuthApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • authorizeOAuthTokenCall

      public okhttp3.Call authorizeOAuthTokenCall(@Nonnull OAuthTokenRequest oauthTokenRequest, ApiCallback _callback) throws ApiException
      Build call for authorizeOAuthToken
      Parameters:
      oauthTokenRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully issued a code. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • authorizeOAuthToken

      public AuthorizeOAuthTokenResponse authorizeOAuthToken(@Nonnull OAuthTokenRequest oauthTokenRequest) throws ApiException
      Authorize an OAuth Token The operation issues an OAuth code which can be used in the OAuth code flow.
      Parameters:
      oauthTokenRequest - (required)
      Returns:
      AuthorizeOAuthTokenResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully issued a code. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • authorizeOAuthTokenWithHttpInfo

      public ApiResponse<AuthorizeOAuthTokenResponse> authorizeOAuthTokenWithHttpInfo(@Nonnull OAuthTokenRequest oauthTokenRequest) throws ApiException
      Authorize an OAuth Token The operation issues an OAuth code which can be used in the OAuth code flow.
      Parameters:
      oauthTokenRequest - (required)
      Returns:
      ApiResponse<AuthorizeOAuthTokenResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully issued a code. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • authorizeOAuthTokenAsync

      public okhttp3.Call authorizeOAuthTokenAsync(@Nonnull OAuthTokenRequest oauthTokenRequest, ApiCallback<AuthorizeOAuthTokenResponse> _callback) throws ApiException
      Authorize an OAuth Token (asynchronously) The operation issues an OAuth code which can be used in the OAuth code flow.
      Parameters:
      oauthTokenRequest - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Successfully issued a code. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • getOAuthClientCall

      public okhttp3.Call getOAuthClientCall(@Nonnull UUID clientId, @Nullable String responseType, @Nullable String redirectUri, @Nullable String scope, ApiCallback _callback) throws ApiException
      Build call for getOAuthClient
      Parameters:
      clientId - (required)
      responseType - code or token (optional)
      redirectUri - Redirect URI of the OAuth flow (optional)
      scope - Requested scopes by the OAuth flow (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist or you do not have access to the client. -
    • getOAuthClient

      public OathClientResponse getOAuthClient(@Nonnull UUID clientId, @Nullable String responseType, @Nullable String redirectUri, @Nullable String scope) throws ApiException
      Get an OAuth client The endpoint returns the details of OAuth client to display in the authorization page.
      Parameters:
      clientId - (required)
      responseType - code or token (optional)
      redirectUri - Redirect URI of the OAuth flow (optional)
      scope - Requested scopes by the OAuth flow (optional)
      Returns:
      OathClientResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist or you do not have access to the client. -
    • getOAuthClientWithHttpInfo

      public ApiResponse<OathClientResponse> getOAuthClientWithHttpInfo(@Nonnull UUID clientId, @Nullable String responseType, @Nullable String redirectUri, @Nullable String scope) throws ApiException
      Get an OAuth client The endpoint returns the details of OAuth client to display in the authorization page.
      Parameters:
      clientId - (required)
      responseType - code or token (optional)
      redirectUri - Redirect URI of the OAuth flow (optional)
      scope - Requested scopes by the OAuth flow (optional)
      Returns:
      ApiResponse<OathClientResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist or you do not have access to the client. -
    • getOAuthClientAsync

      public okhttp3.Call getOAuthClientAsync(@Nonnull UUID clientId, @Nullable String responseType, @Nullable String redirectUri, @Nullable String scope, ApiCallback<OathClientResponse> _callback) throws ApiException
      Get an OAuth client (asynchronously) The endpoint returns the details of OAuth client to display in the authorization page.
      Parameters:
      clientId - (required)
      responseType - code or token (optional)
      redirectUri - Redirect URI of the OAuth flow (optional)
      scope - Requested scopes by the OAuth flow (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist or you do not have access to the client. -
    • issueOAuthTokenCall

      public okhttp3.Call issueOAuthTokenCall(@Nonnull OAuthTokenRequest oauthTokenRequest, ApiCallback _callback) throws ApiException
      Build call for issueOAuthToken
      Parameters:
      oauthTokenRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • issueOAuthToken

      public IssueOAuthTokenResponse issueOAuthToken(@Nonnull OAuthTokenRequest oauthTokenRequest) throws ApiException
      Issue an OAuth token The operation issues an OAuth code which can be used in the OAuth code flow.
      Parameters:
      oauthTokenRequest - (required)
      Returns:
      IssueOAuthTokenResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • issueOAuthTokenWithHttpInfo

      public ApiResponse<IssueOAuthTokenResponse> issueOAuthTokenWithHttpInfo(@Nonnull OAuthTokenRequest oauthTokenRequest) throws ApiException
      Issue an OAuth token The operation issues an OAuth code which can be used in the OAuth code flow.
      Parameters:
      oauthTokenRequest - (required)
      Returns:
      ApiResponse<IssueOAuthTokenResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -
    • issueOAuthTokenAsync

      public okhttp3.Call issueOAuthTokenAsync(@Nonnull OAuthTokenRequest oauthTokenRequest, ApiCallback<IssueOAuthTokenResponse> _callback) throws ApiException
      Issue an OAuth token (asynchronously) The operation issues an OAuth code which can be used in the OAuth code flow.
      Parameters:
      oauthTokenRequest - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
      HTTP Response Details:
      Response Details
      Status Code Description Response Headers
      200 Success. -
      401 Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect. -
      422 Redirect URI or scope is invalid. -