Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • 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
    • Optional region: US | EMEA

    Returns ForgeClient

Properties

Protected Optional auth

auth: undefined | AuthenticationClient

Protected axios

axios: AxiosInstance

Protected host

host: string

Protected region

region: Region

Protected root

root: string

Protected Optional token

token: undefined | string

Methods

Protected delete

  • delete(endpoint: string, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected fetch

  • fetch(config: AxiosRequestConfig): Promise<AxiosResponse<any>>
  • Parameters

    • config: AxiosRequestConfig

    Returns Promise<AxiosResponse<any>>

Protected get

  • get(endpoint: string, headers?: {}, scopes: string[], repeatOn202?: boolean): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]
    • repeatOn202: boolean = false

    Returns Promise<any>

Protected getBuffer

  • getBuffer(endpoint: string, headers?: {}, scopes: string[], repeatOn202?: boolean): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]
    • repeatOn202: boolean = false

    Returns Promise<any>

Protected getStream

  • getStream(endpoint: string, headers?: {}, scopes: string[], repeatOn202?: boolean): Promise<any>
  • Parameters

    • endpoint: string
    • headers: {} = ...
      • [name: string]: string
    • scopes: string[]
    • repeatOn202: boolean = false

    Returns Promise<any>

Protected patch

  • patch(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected post

  • post(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

Protected put

  • put(endpoint: string, data: any, headers?: {}, scopes: string[]): Promise<any>
  • Parameters

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

    Returns Promise<any>

reset

  • reset(auth?: { client_id: string; client_secret: string } | { token: string }, host?: string, region?: US | EMEA): void
  • Resets client to specific authentication method, Forge host, and availability region.

    Parameters

    • Optional auth: { client_id: string; client_secret: string } | { token: string }
    • Optional host: string
    • Optional region: US | EMEA

    Returns void

Protected setAuthorization

  • setAuthorization(options: any, scopes: string[]): Promise<void>
  • Parameters

    • options: any
    • scopes: string[]

    Returns Promise<void>

Generated using TypeDoc