Class STAsyncAbstract

Base class for classes that can asynchronously fetch their data from the API.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

fetched: boolean = false

True if the class was fetched

Methods

  • fetch(): Promise<any>
  • Fetches the data from the API, filling out the current object. This should be an asynchronous function.

    Returns

    This object after fetching

    Returns Promise<any>

  • isFetched(): boolean
  • Returns

    True if this object is fetched

    Returns boolean

  • set(data: any): any
  • Sets properties based on the response sent from a request

    Returns

    This object after setting properties

    Parameters

    • data: any

      The response data from the API

    Returns any

Generated using TypeDoc