skyscanner-promise-browse
v1.0.3
Published
JS Wrapper around the Skyscanner browse api
Downloads
2
Maintainers
Readme
Skyscanner Promise Browse
Usage
See examples. Three methods exposed:
getLocationCode
As per Skyscanner API docs:
Get a list of places that match a query string.
Takes one required argument query
which can be any place or address. Also takes three optional arguments (defaults in brackets):
- country ('UK')
- currency ('GBP')
- locale ('en-UK')
browseQuotes
As per Skyscanner API docs:
Retrieve the cheapest quotes from our cache prices.
Takes one required argument origin
which can be an airport, city or country.Also takes seven optional arguments (defaults in brackets):
- destinationAirport ('anywhere')
- outboundDate ('anytime')
- returnDate ('anytime')
- country ('UK')
- currency ('GBP')
- locale ('en-UK')
- maxNumberOfOptions (10)
browseRoutes
As per Skyscanner API docs:
Retrieve the cheapest routes from our cache prices. Similar to the Browse Quotes API but with the routes built for you from the individual quotes.
Takes one required argument origin
which can be an airport, city or country.
Also takes six optional arguments (defaults in brackets):
- destinationAirport ('anywhere')
- outboundDate ('anytime')
- returnDate ('anytime')
- country ('UK')
- currency ('GBP')
- locale ('en-UK')
- maxNumberOfOptions (10)
Commands
npm run clean
- Removelib/
directorynpm test
- Run tests with linting and coverage results.npm test:only
- Run tests without linting or coverage.npm test:watch
- You can even re-run tests on file changes!npm test:prod
- Run tests with minified code.npm run test:examples
- Test written examples on pure JS for better understanding module usage.npm run lint
- Run ESlint with airbnb-confignpm run cover
- Get coverage report for your code.npm run build
- Babel will transpile ES6 => ES5 and minify the code.npm run prepublish
- Hook for npm. Do all the checks before publishing your module.
Boiler plate ripped from flexdinesh/npm-module-boilerplate.