@vinka/engine-client

1.3.0 • Public • Published

HTTP Engine Client

Installation

npm install @vinka/engine-client

Example usage:

const EngineHttpClient = require('@vinka/engine-client');

const HOST = process.env.ES_URL || 'http://localhost:7878';
const USER = process.env.ES_USER || 'xxxx';
const PASS = process.env.ES_PASS || 'xxxx';

class EngineClient {
    constructor(host, user, pass) {
        this.http = new EngineHttpClient(host, user, pass, log);
    }

    async getRoute(id) {
        return this.http.get(`route/${id}`);
    }

    async addTrip(trip) {
        return this.http.post('trip', trip);
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @vinka/engine-client

Weekly Downloads

1

Version

1.3.0

License

MIT

Unpacked Size

16.6 kB

Total Files

7

Last publish

Collaborators

  • rami-vinka
  • verneri_95
  • janne.kuuskeri