Skip to content

🚆 🚍 ✈️ 🚗 A Node.js API for the GoEuro.com

Notifications You must be signed in to change notification settings

evgenTraytyak/goeuro-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm npm

GoEuro API

GoEuro API for Node.js.

Installation

npm install goeuro-api --save

How to use

import GoEuroAPI from 'goeuro-api';
const GoEuroClient = new GoEuroAPI();

// Init the search and get flights, trains and buses.
GoEuroClient.search(params)
  .then((response) => {
    GoEuroClient.flights()
      .then(flights => console.log(flights));

    GoEuroClient.trains()
      .then(trains => console.log(trains));

    GoEuroClient.buses()
      .then(buses => console.log(buses));
  })
  .catch((error) => console.log(error));

// Get buses by search_id
GoEuroClient
  .buses({ search_id: id })
  .then(buses => console.log(buses))
  .catch(error => console.log(error));

About

🚆 🚍 ✈️ 🚗 A Node.js API for the GoEuro.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published