iansltx/flightaware-php-client
FlightAware的FlightXML v2 API的基于curl的API客户端
v0.2
2017-07-10 01:57 UTC
Requires
- php: >=5.5.0
- ext-curl: *
This package is auto-updated.
Last update: 2024-09-06 17:54:05 UTC
README
此类允许快速与FlightAware的FlightXML REST API的(小)子集进行交互。更多信息请参见http://flightaware.com/commercial/flightxml/explorer/。
需求
- PHP 5.5+
- curl
- FlightAware API账户
安装
您可以通过Composer安装此库
composer require iansltx/flightaware-php-client
或者下载仓库并require FlightAwareClient.php。
用法
首先,按以下方式实例化客户端类
$faClient = new iansltx\FlightAwareClient\Client('username', 'api_key');
以下方法可用;所有方法都返回未包装的结果数组
$inFlightInfo = $faClient->inFlightInfo($ident); // reformats waypoints with distinct latitude and longitude array keys $flightInfoEx = $faClient->flightInfoEx($ident, $how_many, $offset); $flightId = $faClient->getFlightId($ident, $departure_time); $historicalTrack = $faClient->getHistoricalTrack($flight_id); $lastTrack = $faClient->getLastTrack($ident); $endpoint = $faClient->registerAlertEndpoint($url,$format); $getAlertResults = $faClient->getAlerts() $newAlertID = $faClient->setAlert($alert_id, $ident, $origin, $destination, $aircrafttype, $date_start, $date_end, $channels, $enablede, $max_weekly); $foo = $faClient->deleteAlert($alert_id);
贡献
欢迎贡献和PR。此代码是MIT许可的。
其他说明
此库最初是为http://limitless-horizons.org的使用而构建的。