2017 © Pedro PelĂĄez
 

library skyscanner-php

Unofficial PHP SDK for Skyscanner's API

image

ozdemirburak/skyscanner-php

Unofficial PHP SDK for Skyscanner's API

  • Friday, January 12, 2018
  • by ozdemirburak
  • Repository
  • 3 Watchers
  • 19 Stars
  • 792 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 1 Open issues
  • 18 Versions
  • 4 % Grown

The README.md

Unofficial PHP SDK for Skyscanner API

Latest Version on Packagist ![Software License][ico-license] Build Status ![Total Downloads][ico-downloads], (*1)

This is an unofficial PHP SDK for the Skyscanner API to support Flights, Car Hire, Hotels, Localisation, and Places services., (*2)

Currently, all of the services are implemented. Also tested all off the services except the Hotels one since could not find any valid API keys, and had no luck with contacting anyone from Skyscanner., (*3)

Install

Via Composer, (*4)

``` bash $ composer require ozdemirburak/skyscanner-php, (*5)


For PHP 7.0 and below, use `~1.0` instead. ## Usage Please see the **[wiki](https://github.com/ozdemirburak/skyscanner-php/wiki)** for more detailed information about the methods and the parameters. You can find a simple demonstration of how to use the methods below, or check the [tests](tests/) for more advanced examples. ### Flights: Live Pricing ``` php use OzdemirBurak\SkyScanner\Travel\Flights\LivePricing; $pricing = new LivePricing($apiKey = 'your-api-key'); $pricing->setParameters([ 'adults' => 1, 'country' => 'GB', 'currency' => 'GBP', 'destinationPlace' => 'IST', 'locale' => 'en-GB', 'originPlace' => 'LHR', 'outboundDate' => date('Y-m-d', strtotime('+1 week')), 'stops' => 0 ]); $flights = $pricing->getFlights($onlyFirstAgentPerItinerary = true);

Flights: BrowseCache

``` php use OzdemirBurak\SkyScanner\Travel\Flights\BrowseCache;, (*6)

$cache = new BrowseCache($apiKey = 'your-api-key'); $cache->setParameters([ 'country' => 'TR', 'currency' => 'TRY', 'destinationPlace' => 'IST', 'locale' => 'tr-TR', 'originPlace' => 'LHR', 'outboundPartialDate' => date('Y-m-d', strtotime('+1 week')), ]); $quotes = $cache->getPrices()['Quotes'];, (*7)


### Car Hire: Live Pricing ``` php use OzdemirBurak\SkyScanner\Travel\CarHire\LivePricing; $pricing = new LivePricing($apiKey = 'your-api-key'); $pricing->setParameters([ 'country' => 'GB', 'currency' => 'GBP', 'dropoffplace' => 'ADB', 'dropoffdatetime' => date('Y-m-d\TH:i', strtotime('+2 week')), 'locale' => 'en-GB', 'pickupplace' => 'IST', 'pickupdatetime' => date('Y-m-d\TH:i', strtotime('+1 week')), 'driverage' => 21 ]); $cars = $pricing->getCars();

Hotels: Live Pricing

``` php use OzdemirBurak\SkyScanner\Travel\Hotels\LivePricing;, (*8)

$pricing = new LivePricing($apiKey = 'your-api-key'); $pricing->setParameters([ 'country' => 'TR', 'currency' => 'TRY', 'entity_id' => 27544008, 'checkin_date' => date('Y-m-d', strtotime('+1 week')), 'checkout_date' => date('Y-m-d', strtotime('+2 week')), 'locale' => 'tr-TR' ]); $hotels = $pricing->getHotels();, (*9)


### Localisation: Currency ``` php use OzdemirBurak\SkyScanner\Localisation\Currency; $currency = new Currency($apiKey = 'your-api-key'); $currencies = $currency->get();

Localisation: Locale

``` php use OzdemirBurak\SkyScanner\Localisation\Locale;, (*10)

$locale = new Locale($apiKey = 'your-api-key'); $locales = $locale->get();, (*11)


### Localisation: Market ``` php use OzdemirBurak\SkyScanner\Localisation\Market; $market = new Market($apiKey = 'your-api-key')); $market->setLocale('en-GB'); $countries = $market->get();

Places

``` php use OzdemirBurak\SkyScanner\PlacesService;, (*12)

$places = new PlacesService($apiKey = 'your-api-key'); $geoCatalog = $places->get(); $list = $places->getList('UK', 'GBP', 'en-GB', 'istanbul'); $information = $places->getInformation('UK', 'GBP', 'en-GB', 'CDG-sky'); $hotels = $places->getHotels('UK', 'EUR', 'en-GB', 'paris');, (*13)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING for details., (*14)

Credits

License

The MIT License (MIT). Please see License File for more information., (*15)

The Versions

12/01 2018

dev-master

9999999-dev https://github.com/ozdemirburak/skyscanner-php

Unofficial PHP SDK for Skyscanner's API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip skyscanner-api

14/12 2017

1.2.0

1.2.0.0 https://github.com/ozdemirburak/skyscanner-php

Unofficial PHP SDK for Skyscanner's API

  Sources   Download

MIT

The Requires

 

The Development Requires

flight travel skyscanner trip skyscanner-api

12/06 2017

1.1.3

1.1.3.0 https://github.com/ozdemirburak/skyscanner-php

Unofficial PHP SDK for Skyscanner's API

  Sources   Download

MIT

The Requires

 

The Development Requires

flight travel skyscanner trip

27/05 2017

1.1.2

1.1.2.0 https://github.com/ozdemirburak/skyscanner-php

Unofficial PHP SDK for Skyscanner's API

  Sources   Download

MIT

The Requires

 

The Development Requires

flight travel skyscanner trip

26/05 2017

1.1.1

1.1.1.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

26/05 2017

1.1.0

1.1.0.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

26/05 2017

1.0.1

1.0.1.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

26/05 2017

1.0.0

1.0.0.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

26/09 2016

0.3.3

0.3.3.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

26/09 2016

0.3.2

0.3.2.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

24/09 2016

0.3.1

0.3.1.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk flight travel skyscanner trip

22/09 2016

0.3

0.3.0.0 https://github.com/ozdemirburak/skyscanner-php

Unoffical SkyScanner PHP API

  Sources   Download

MIT

The Requires

 

The Development Requires

api php sdk skyscanner flights

15/09 2016
11/09 2016
14/07 2016
13/07 2016
13/07 2016
13/07 2016