Hierarchy

  • RestManager

Constructors

Properties

emitter: TypedEventEmitter<RestManagerEvents> = ...

Logging emitter

options: RestOptions
proxyURL: undefined | string = ...

The proxy url if it was set.

router: GuildedRouter = ...

Utility router

token: string = ...

The bot token to be used for making requests.

version: 1 = ...

The version of the API to be used for making requests. By default, this will use the latest version that the library supports.

Accessors

  • get obfuscatedToken(): string
  • Generate obfuscated token. It replaces every char in a non-even index with X. I'm not very creative.

    Returns string

Methods

  • Type Parameters

    Parameters

    • path: string
    • Optional body: B
    • authenticated: boolean = true

    Returns Promise<T>

  • Type Parameters

    Parameters

    • path: string
    • Optional query: Q
    • authenticated: boolean = true

    Returns Promise<T>

  • Type Parameters

    Parameters

    • data: MakeOptions<B, Q>
    • authenticated: boolean = true
    • retryCount: number = 0
    • options: {
          bodyIsJSON?: boolean;
          returnAsText?: boolean;
      } = {}
      • Optional bodyIsJSON?: boolean
      • Optional returnAsText?: boolean

    Returns Promise<[Response, Promise<string | T>]>

  • Type Parameters

    Parameters

    • path: string
    • Optional body: B
    • authenticated: boolean = true

    Returns Promise<T>

  • Type Parameters

    Parameters

    • path: string
    • Optional body: B
    • authenticated: boolean = true

    Returns Promise<T>

Generated using TypeDoc