Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract base class for REST datasources.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • new RESTSource(datasource: string, endpoint: string, filename?: string, headers?: {}[], auth?: string): RESTSource
  • Parameters

    • datasource: string

      Type of request: graphql or rest.

    • endpoint: string

      URL of the data source from where the JSON needs to be read.

    • Optional filename: string

      Name of the output file. Optional.

    • Optional headers: {}[]

      HTTP headers, e.g. [{"Content-Type":"application/json"}, {"Custom-Auth-Token":"xysazxklj4568asdf46a5sd4f"}]. Optional.

    • Optional auth: string

      Basic authentication i.e. 'user:password' to compute an Authorization header. Optional.

    Returns RESTSource

Properties

auth

auth: undefined | string

datasource

datasource: string

endpoint

endpoint: string

filename

filename: undefined | string

headers

headers: undefined | {}[]

Methods

asDict

  • asDict(): {}
  • The dict representation of this object

    Returns {}

    dict representation of this object

    • [key: string]: string | {}[]

Generated using TypeDoc