@gibme/starlink
    Preparing search index...

    Class StarlinkAPI

    Hierarchy

    • default
      • StarlinkAPI
    Index

    Constructors

    • Parameters

      • client_id: string
      • client_secret: string

      Returns StarlinkAPI

    Properties

    baseUrl: "https://starlink.com/api/public" = 'https://starlink.com/api/public'
    client_id: string
    client_secret: string

    Methods

    • Protected

      Performs an HTTP delete request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • params: Record<string, any> = {}

      Returns Promise<Type>

    • Fetches the account associated with the authenticated v2 service account.

      v2 service accounts are scoped to a single Starlink account, so this returns an array of one. The array shape is preserved so existing consumer code continues to work.

      Returns Promise<Account[]>

    • Protected

      Performs an HTTP get request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • params: Record<string, any> = {}

      Returns Promise<Type>

    • Protected

      Walks a paginated endpoint, returning every record.

      When all: false, fetches the single page given by page and returns its results. When all: true (default), walks pages until isLastPage, asserting that the total received matches totalCount from the wire response.

      Type Parameters

      • Record_

      Parameters

      • method: "GET" | "POST"
      • endpoint: string
      • opts: Partial<
            {
                all: boolean;
                body: object;
                filters: Record<string, any>;
                page: number;
            },
        > = {}

      Returns Promise<Record_[]>

    Protectedpost

    • post<Type extends Starlink.Response = any>(
          endpoint: string,
          payload?: object,
          params?: Record<string, any>,
      ): Promise<Type>
      Protected

      Performs an HTTP post request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • Optionalpayload: object
      • params: Record<string, any> = {}

      Returns Promise<Type>

    • Protected

      Performs an HTTP put request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • Optionalpayload: string | object

      Returns Promise<Type>

    • Disconnects the internal rate-limit cache and releases its resources

      Returns Promise<void>