Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

railway-api

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

railway-api

An API with various functionalities for indian railways

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

railway

An API with various functionalities for indian railways

Installation

npm install railway

##Usage

var railway = require('railway-api')
  • set API key (MANDATORY)
railway.setApikey('<API key>')

You may register for a key at http://www.railwayapi.com/pricing/

  • Check PNR status

Get PNR status using 10 digit PNR No.

railway.checkPnr('<10 digit pnr>', function (err, res) {})
  • Station name to Code

Get station details of given station and nearby stations using station name with automatic name completion.

railway.stationCode('<station name>', function (err, res) {})
  • Station Code to Name

Get passed railway station and nearby stations details using station code.

railway.stationName('<station code>', function (err, res) {})
  • LIVE train status

Get live train status.

railway.liveTrainStatus('<train number>', function (err, res) {})
  • Train route information

Get train’s route information like the list of stoppages,their locations etc.

railway.trainRoute('<train number>', function (err, res) {})
  • Trains between stations

Get all trains(numbers) running between a source station and destination.

railway.trainBetweenStations('<source>', '<destination>', function (err, res) {})
  • Train name/number

Get train name using number and vice versa.

railway.name_number('<train name or number>', function (err, res) {})
  • Seat Availability

Get Train Seat Availability.

railway.seatAvailability = ('<trainNo>', '<source>', '<destination>', '<date>', '<class>', '<quota>', function (err, res) {})

class: valid class code can be fetched from http://www.indianrail.gov.in/class_Code.html

quota(optional: defaults to GN): valid quota code can be fetched from http://www.indianrail.gov.in/quota_Code.html

Keywords

FAQs

Package last updated on 18 Sep 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc