@gibme/tablo.tv
    Preparing search index...

    Class Tablo

    See https://jessedp.github.io/tablo-api-docs/#tablo-api-introduction for an extensive list of device endpoints

    Note: this implementation is currently incomplete and is unlikely to have all endpoints implemented.

    Hierarchy

    • TabloAPI
      • Tablo
    Index

    Constructors

    • Constructs a new instance of the base API to interact with a Tablo device

      Parameters

      • hostOrUri: string
      • options: Partial<Options> & Credentials

      Returns Tablo

    Properties

    device_id: string
    timeout: number = 2000

    Accessors

    • get currentHour(): { end: number; now: number; start: number }
      Protected

      Returns the current hour timestamps

      Returns { end: number; now: number; start: number }

    Methods

    • Retrieves account subscription information from the device

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | AccountSubscription<Date>>

    • Returns the currently available airings

      Note: This method contains a loop that results in the method taking a bit of time to complete, you may specify a progress callback to help report the progress to the caller.

      Repeated calls to this method are cached for approximately 10 minutes.

      Parameters

      • all: boolean = false

        if true, will return all airings, otherwise will only return airings that are currently playing.

      • timeout: number = ...
      • force_refresh: boolean = false

        if set to true, will force a refresh of the cache.

      • Optionalprogress_callback: (total: number, received: number) => void

      Returns Promise<Tablo.Airing<Date>[]>

    • Protected

      Batch operations are much faster than a bunch of single operations. For example, instead of making 50 requests for the first 50 recordings returned by Recordings - Get Airings, you can take those 50 paths and make 1 request to /batch to receive all the same data.

      Type Parameters

      • ResponseType = any

      Parameters

      • endpoints: string[]
      • timeout: number = ...

      Returns Promise<Record<string, Root & ResponseType>>

    • Protected

      Calculates the end time based upon the specified start time and duration

      Parameters

      • start_time: string
      • duration: number

      Returns string

    • Retrieves the capabilities of the device.

      Parameters

      • timeout: number = ...

      Returns Promise<string[]>

    • Parameters

      • channel_id: string
      • timeout: number = ...

      Returns Promise<undefined | Tablo.Channel>

    • Returns a list of the available channels on the device.

      Parameters

      • timeout: number = ...

      Returns Promise<Tablo.Channel[]>

    • Retrieves information regarding the latest (or a specified) channel scan.

      Parameters

      • Optionalscan_idx: string | number

        if not specified, will pull the latest channel scan information

      • timeout: number = ...

      Returns Promise<undefined | ChannelScan<Date>>

    • Protected

      Performs a DELETE request against the Tablo device

      Parameters

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

      Returns Promise<boolean>

    • Deletes/stops an existing watch (streaming) session

      Parameters

      • tokenOrPlayerSession: string | PlayerSession<Date>
      • timeout: number = ...

      Returns Promise<boolean>

    • Retrieves device subscription information.

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | DeviceSubscription<Date>>

    • Protected

      Performs a GET request against the Tablo device

      Type Parameters

      • ResponseType = any

      Parameters

      • endpoint: string
      • params: Record<string, any> = {}
      • timeout: number = ...
      • json: boolean = true

      Returns Promise<undefined | ResponseType>

    • Retrieves the guide status from the device

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | GuideStatus<Date>>

    • Retrieves a list of the hard drives connected to the device.

      Parameters

      • timeout: number = ...

      Returns Promise<HardDrive[]>

    • Retrieves device information

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | Info>

    • Sends a watch (streaming) session keepalive request so that the session does not time out and stop

      Parameters

      • tokenOrPlayerSession: string | PlayerSession<Date>
      • timeout: number = ...

      Returns Promise<undefined | PlayerSession<Date>>

    • Retrieves device location information

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | Location>

    Protectedpost

    • post<ResponseType = any>(
          endpoint: string,
          params?: Record<string, any>,
          payload?: object,
          timeout?: number,
          json?: boolean,
      ): Promise<undefined | ResponseType>
      Protected

      Performs a PUT request against the Tablo device

      Type Parameters

      • ResponseType = any

      Parameters

      • endpoint: string
      • params: Record<string, any> = {}
      • Optionalpayload: object
      • timeout: number = ...
      • json: boolean = true

      Returns Promise<undefined | ResponseType>

    • Attempts to retrieve an existing watch (streaming) session

      Parameters

      • tokenOrPlayerSession: string | PlayerSession<Date>
      • timeout: number = ...

      Returns Promise<undefined | PlayerSession<Date>>

    • Retrieves the settings of the device.

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | Settings>

    • Retrieves the list of supported storage types.

      Parameters

      • timeout: number = ...

      Returns Promise<string[]>

    • Retrieves tuner information of the device.

      Parameters

      • timeout: number = ...

      Returns Promise<Tuner[]>

    • Retrieves device update information.

      Parameters

      • timeout: number = ...

      Returns Promise<undefined | UpdateInfo<Date>>

    • Retrieves device update progress information.

      Parameters

      • timeout: number = ...

      Returns Promise<unknown>

    • Initiates a channel watch (streaming) session on the device which must be managed via keepaliveSession and deleteSession

      Parameters

      • channel_id: string
      • device_info: Partial<Tablo.Client.Device> = {}
      • timeout: number = 30000

      Returns Promise<undefined | PlayerSession<Date>>

    • Attempts to discover the Tablo devices on the network from which this API is made.

      Parameters

      • timeout: number = 2000

      Returns Promise<Lighthouse.Device[]>