Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Hierarchy

  • Client

Index

Constructors

constructor

Properties

Private refreshToken

refreshToken: string = ""

Private token

token: string = ""

Methods

Private #auth

  • #auth(): Promise<void>

Private #getRefreshToken

Private #getSessionToken

  • #getSessionToken(__namedParameters: { refreshToken: string }): Promise<string>
  • Parameters

    • __namedParameters: { refreshToken: string }
      • refreshToken: string

    Returns Promise<string>

getStation

  • getStation(stationId: string, date?: Duration): Promise<Asema>
  • Parameters

    • stationId: string
    • Default value date: Duration = { days: 14 }

    Returns Promise<Asema>

getStations

  • getStations(): Promise<Asema[]>

getStationsByLocation

  • getStationsByLocation(location: { lat: number; lon: number }, distance?: number): Promise<Asema[]>
  • Parameters

    • location: { lat: number; lon: number }
      • lat: number
      • lon: number
    • Default value distance: number = 15000

    Returns Promise<Asema[]>

login

Object literals

Private headers

headers: object

Content-Type

Content-Type: string = "application/json"

Host

Host: string = "api.tankille.fi"

User-Agent

User-Agent: string = "FuelFellow/3.6.2 (Android SDK built for x86_64; Android 9)"

Private options

options: object

device

device: string = "Android SDK built for x86_64 (03280ceb8a5367a6)"

userAgent

userAgent: string = "FuelFellow/3.6.2 (Android SDK built for x86_64; Android 9)"

tokenCache

tokenCache: object

data

data: any = <any>{}

lastFetch

lastFetch: number = 0

Generated using TypeDoc