hvv
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

🏗 This project is under development!

Node.js API-wrapper for Public Transport in Hamburg

Build Status version MIT License

Installation

npm install hvv

Usage

import { HVVClient } from 'hvv';
 
const hvv = new HVVClient({
  key: 'secret',
  user: 'user'
});
 
hvv.getRoute({ start: { name: '...' }, dest: { name: '...' } }).then(result => console.log(result));

Documentation

HVVClientOptions

You can initialize a new instance by calling new HVVClient(HVVClientOptions). HVVClientOptions is an object with the following properties:

user

Required
Type: string

Represents geofox-auth-user header, provided by HBT GmbH.

key

Required
Type: string

Individual password, provided by HBT GmbH.

host

Type: string
Default: http://api-test.geofox.de

The API Host address.

contentType

Type: string
Value: application/json or application/xml
Default: application/json

The Content-Type HTTP-Header.

acceptEncoding

Type: string
Value: gzip or deflate
Default: no compression

Accept-Encoding HTTP-Header.

accept

Type: string
Value: application/json or application/xml
Default: application/json

Accept HTTP-Header.

platform

Type: string
Value: One of the following:

  • ios (for iOS Apps)
  • android (for Android Apps)
  • winphone (for Windows Phone Apps)
  • web (for desktop websites)
  • mobile (for mobile websites)

Default: platform not specified

Represents the clients platform.

Methods

init(InitRequest)
checkName(CNRequest)
getRoute(GRRequest)
departureList()
getTariff()
departureCourse()
listStations(LSRequest, LSCustomOptions)
listLines()
getAnnouncements(AnnouncementRequest)
checkPostalCode()
getVehicleMap()
getTrackCoordinates()
getIndividualRoute()
getStationInformation()

License

MIT © Lion Ralfs

Readme

Keywords

none

Package Sidebar

Install

npm i hvv

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

76 kB

Total Files

48

Last publish

Collaborators

  • lionralfs