Socket
Socket
Sign inDemoInstall

node-imhdsk

Package Overview
Dependencies
61
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-imhdsk

An unofficial API for grabbing data from imhd.sk


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

node-imhdsk

npm version

This is a nodejs port of python-imhdsk-api

Installation

$ npm i node-imhdsk

Usage

Search for a route from point A to point B

const imhdsk = require('node-imhdsk');
var options = {'from': 'mlyny',
               'to': 'patronka',
               'time': '23:00',
               'date': '25.9.2019'}
imhdsk.get_routes(options).then(function(res) {
    console.log(res)
});
Available options
parametertypedescription
citystringCity in Slovakia supported by imhd.sk. Defaults to ba
fromstringStarting point (required).
tostringDestination (required).
timestringDeparture time. Defaults to current time.
datestringDeparture date. Defaults to current date.

Get real-time information from particular stop

The function get_livetable takes the stop ID as a parameter. These IDs can be found at imhd.sk. Open the page with the stop information, then open the livetable in new window. The parameter st in the url should be the stop's ID.

const imhdsk = require('node-imhdsk');
imhdsk.get_livetable(93).then(function(res) {
    console.log(res);
});

Beware that by using this you might be violating imhd.sk ToS

Keywords

FAQs

Last updated on 13 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc