Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RequestInterface

Hierarchy

  • RequestInterface

Callable

  • __call<T>(options: EndpointOptions): Promise<OctokitResponse<T>>
  • __call<R>(route: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise<Endpoints[R]["response"]> : Promise<OctokitResponse<any>>
  • Sends a request based on endpoint options

    Type parameters

    • T

    Parameters

    Returns Promise<OctokitResponse<T>>

  • Sends a request based on endpoint options

    Type parameters

    Parameters

    • route: keyof Endpoints | R

      Request method + URL. Example: 'GET /orgs/:org'

    • Optional options: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters

    Returns R extends keyof Endpoints ? Promise<Endpoints[R]["response"]> : Promise<OctokitResponse<any>>

Index

Properties

Properties

defaults

defaults: function

Returns a new endpoint with updated route and parameters

Type declaration

endpoint

Octokit endpoint API, see @octokit/endpoint

Generated using TypeDoc