Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

cache: Dict<number, Egg>
client: PteroApp
meta: PaginationMeta = ...

Accessors

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

Methods

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

    Parameters

    • data: any

      The resolvable egg object(s).

    Returns any

    The resolved egg object(s).

  • adminURLFor(id: number): string
  • Fetches an egg from the API by its ID. This will check the cache first unless the force option is specified.

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

    Parameters

    • nest: number

      The ID of the nest.

    • id: number

      The ID of the egg.

    • Optional options: Include<FetchOptions>

    Returns Promise<Egg>

    The fetched egg.

  • Fetches a list of eggs from the API by its ID. This will check the cache first unless the force option is specified.

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

    Parameters

    Returns Promise<Dict<number, Egg>>

    The fetched eggs.

  • 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