GithubHelp home page GithubHelp logo

skyscanner-promise-browse's Introduction

Skyscanner Promise Browse

Build Status dependencies Status devDependencies Status License: MIT

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 - Remove lib/ directory
  • npm 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-config
  • npm 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.

skyscanner-promise-browse's People

Contributors

davidbenicekskyscanner avatar egantz avatar

Watchers

James Cloos avatar  avatar

Forkers

egantz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.