Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractHTTP

Abstract implementation of the TwitarrHTTP interface meant to be extended by a concrete class.

implements

ITwitarrHTTP

Hierarchy

Implements

Index

Constructors

constructor

  • Create a new HTTP instance.

    constructor

    Parameters

    • Optional server: TwitarrServer

      A server object for immediate configuration.

    • Optional timeout: number

      How long to wait until timing out requests.

    Returns AbstractHTTP

Properties

Private __computed

__computed: TwitarrHTTPOptions = new TwitarrHTTPOptions()

Accessors

options

server

Methods

Abstract get

Protected getData

  • getData(response: any): any

getKey

  • getKey(): string

Protected getOptions

getPassword

  • getPassword(): string

Protected getServer

getUsername

  • getUsername(): string

Abstract httpDelete

Protected onSetServer

  • onSetServer(): void
  • Implementers should override this method if they have actions that need to be performed (like clearing a cache) when server settings change.

    Returns void

Abstract post

Abstract postFile

Abstract put

setKey

setPassword

  • setPassword(password: string): this

setUsername

  • setUsername(username: string): this

Protected transformJSON

  • transformJSON(data: any): any
  • A convenience method for implementers to use to turn JSON into a javascript object. Use this to process a JSON response before returning it in an TwitarrResult object.

    Parameters

    • data: any

    Returns any

Generated using TypeDoc