willemo / flightstats
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP client for the FlightStats API
v0.2.7
2017-09-01 12:41 UTC
Requires
- php: >=5.5
- guzzlehttp/guzzle: ~6.0
- symfony/options-resolver: ^3.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
PHP client for the FlightStats API.
This project is abandoned
This project is no longer supported.
Installation
Use Composer to install this package:
composer.phar install willemo/flightstats
Usage
Create a new Willemo\FlightStats\FlexClient and use that to make requests to the FlightStats API:
$client = new Willemo\FlightStats\FlexClient([ 'appId' => 'yourAppId', 'appKey' => 'yourAppKey', ]); // Get information about flight AA100 departing on September 5th: $response = $client->schedules()->getFlightByDepartureDate( 'AA', 100 new DateTime('2017-09-05') );
Available APIs
The following FlightStats APIs are currently available:
Flight Status API
Flight Status API documentation
getFlightStatusById
Get the flight status from a flight associated with provided Flight ID.
$client->flightStatus()->getFlightStatusById(123456, [ // Optional query parameters 'extendedOptions' => [ 'includeDeltas', ], ]);
getFlightStatusByArrivalDate
Get the flight status from a flight that's arriving on the given date.
$client->flightStatus()->getFlightStatusByArrivalDate('AA', 100, new DateTime('2017-09-05'), [ // Optional query parameters 'utc' => true, 'extendedOptions' => [ 'includeDeltas', ], ]);
getFlightStatusByDepartureDate
Get the flight status from a flight that's departing on the given date.
$client->flightStatus()->getFlightStatusByDepartureDate('AA', 100, new DateTime('2017-09-05'), [ // Optional query parameters 'utc' => true, 'extendedOptions' => [ 'includeDeltas', ], ]);
Schedules API
getFlightByArrivalDate
$client->schedules()->getFlightByArrivalDate('AA', 100, new DateTime('2017-09-05'), [ // Optional query parameters 'extendedOptions' => [ 'includeDeltas', ], ]);
getFlightByDepartureDate
$client->schedules()->getFlightByDepartureDate('AA', 100, new DateTime('2017-09-05'), [ // Optional query parameters 'extendedOptions' => [ 'includeDeltas', ], ]);
Note
Copyright of the name FlightStats and its API belong to FlightStats.