Class ForgeClientAbstract

Hierarchy (view full)

Constructors

  • Initializes new client with specific authentication method.

    Parameters

    • root: string

      Root path for all endpoints (must not contain any slashes at the beginning nor end).

    • auth: IAuthOptions

      Authentication object, containing either client_id and client_secret properties (for 2-legged authentication), or a single token property (for 2-legged or 3-legged authentication with pre-generated access token).

    • Optional host: string

      Forge API host (must not contain slash at the end).

    • Optional region: Region

      Forge availability region ("US" or "EMEA").

    Returns ForgeClient

Properties

axios: AxiosInstance
host: string
region: Region
root: string
token?: string

Methods

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • config: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<any, any>>

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • data: any
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • data: any
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • data: any
    • headers: {
          [name: string]: string;
      } = {}
      • [name: string]: string
    • scopes: string[]

    Returns Promise<any>

  • Resets client to specific authentication method, Forge host, and availability region.

    Parameters

    • Optional auth: IAuthOptions

      Authentication object, containing either client_id and client_secret properties (for 2-legged authentication), or a single token property (for 2-legged or 3-legged authentication with pre-generated access token).

    • Optional host: string

      Forge API host.

    • Optional region: Region

      Forge availability region ("US" or "EMEA").

    Returns void

  • Parameters

    • options: any
    • scopes: string[]

    Returns Promise<void>

Generated using TypeDoc