@jeffe/tankille
    Preparing search index...

    Class Client

    Start using package by creating a new instance of the Client class and calling the login method.

    const client = new Client();
    await client.login({
    email: 'test@test.com',
    password: 'testpass'
    });

    Then you can start using the API by calling the getStations method.

    const stations = await client.getStations();
    console.log(stations);

    You can also get a single station by calling the getStation method.

    const station = await client.getStation('57468337076757d9a7acf610');
    console.log(station);

    Checkout API documentation for more methods.

    Index

    Constructors

    Properties

    tokenCache: AccessCache = ...

    Methods

    • Parameters

      • stationId: string
      • date: Duration = ...

      Returns Promise<Asema>

    • Parameters

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

      Returns Promise<Asema[]>

    • Login to the API

      Parameters

      Returns Promise<string>

      Access token

      If email or password is missing

      If user is already logged in

      If login fails