Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

cache: Dict<number, Nest>
client: PteroApp

Accessors

  • get FILTERS(): readonly never[]
  • get INCLUDES(): readonly string[]
  • get SORTS(): readonly never[]

Methods

  • _patch(data: any): any
  • Transforms the raw nest object(s) into typed objects.

    Parameters

    • data: any

      The resolvable nest object(s).

    Returns any

    The resolved nest object(s).

  • adminURLFor(id: number): string
  • fetch(id: number, include?: string[]): Promise<Nest>
  • fetch(include?: string[]): Promise<Dict<number, Nest>>
  • Fetches a nest from the API with the given options (default is undefined).

    example
    app.nests.fetch(1).then(console.log).catch(console.error);
    

    Parameters

    • id: number

      The ID of the nest.

    • Optional include: string[]

    Returns Promise<Nest>

    The fetched nest.

  • Fetches a list of nests from the API with the given options (default is undefined).

    example
    app.nests.fetch()
    .then(nests => nests.forEach(n => console.log(n)))
    .catch(console.error);

    Parameters

    • Optional include: string[]

    Returns Promise<Dict<number, Nest>>

    The fetched nest.

  • getFetchAll<T, K>(...options: unknown[]): Promise<Dict<T, K>>
  • getQueryOptions(): { filters: readonly string[]; includes: readonly string[]; sorts: readonly string[] }
  • Gets the allowed query options from the inherited manager.

    internal

    Returns { filters: readonly string[]; includes: readonly string[]; sorts: readonly string[] }

    The query options.

    • filters: readonly string[]
    • includes: readonly string[]
    • sorts: readonly string[]

Generated using TypeDoc