Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StreamEndpoint

Endpoint class represents an IoT-stack API Endpoint. For now just get(), but will support all http methods.

Hierarchy

  • StreamEndpoint

Index

Accessors

Methods

Accessors

url

  • get url(): string
  • Absolute url to use in requests

    Returns string

Methods

connect

  • Connects with this endpoint as an eventsource.

    Parameters

    • Optional options: StreamOptions

      StreamOptions to filter the stream.

    Returns Observable<any>

    Observable of TPage objects. Unsubscribe to manually close the stream.

Static create

  • Creates an Endpoint instance

    Parameters

    • client: ObeliskClient

      The client is used to add auth tokens to the request

    • uri: string

      The uri is a relative path starting after /api/. Examples are: /things/my_thing/metrics/my_metric/events?from=1530089953000 or /locations/my_loc/metrics/my_metric/stats/unit

    • Default value apiVersion: ApiVersion = "v1"

    Returns StreamEndpoint