aviasales

2.0.9 • Public • Published

Aviasales

It is a Node.js implementation of TravelPayouts Flights Search API for make it easy send requests and get response

For more information see https://www.travelpayouts.com

Install

npm install aviasales

Usage

  • Search:
const aviasales = require('aviasales')
 
aviasales.search(
    {
        lang: 'ru',
        class: 'E',
        travelers: {
            adult: 1,
            child: 0,
            infant: 0
        },
        routes: [
            {
                from: 'MOW',
                to: 'LON',
                date: '2018-05-17'
            }
        ]
    },
    {
        marker: {MARKER},
        token: {TOKEN}
    },
    (error, solutions) => {
 
        console.log(JSON.stringify(error || solutions, null, 2))
 
    })
  • Redirect:
const aviasales = require('aviasales')
 
aviasales.redirect(
    {SOLUTION},
    null,
    (error, redirect) => {
 
        console.log(JSON.stringify(error || redirect, null, 2))
 
    })

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i aviasales

Weekly Downloads

17

Version

2.0.9

License

none

Unpacked Size

11.9 kB

Total Files

12

Last publish

Collaborators

  • anagorsky