garygitton / psa-connected-car-sdk-php
dev-master
2018-08-21 15:36 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-08-23 07:52:20 UTC
README
这是我们连接汽车API的第一个版本。使用这个API,您可以访问汽车中超过89个信号。此API适用于标致、雪铁龙和DS汽车。
此PHP包由Swagger Codegen项目自动生成
- API版本:1.0.5
- 包版本:1.0.0
- 构建包:io.swagger.codegen.languages.PhpClientCodegen 更多信息请访问 https://developer.psa-peugeot-citroen.com/
要求
PHP 5.5及更高版本
安装与使用
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/garygitton/psa-connected-car-sdk-php.git"
}
],
"require": {
"garygitton/psa-connected-car-sdk-php": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/psa-connected-car-sdk-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请按照安装流程进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: Client ID $config = Psa\ConnectedCar\Configuration::getDefaultConfiguration()->setApiKey('client_id', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Psa\ConnectedCar\Configuration::getDefaultConfiguration()->setApiKeyPrefix('client_id', 'Bearer'); $apiInstance = new Psa\ConnectedCar\Api\DefaultApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $locale = ""; // string | Locale. For example : fr_FR for french $brand = ""; // string | Brand of the vehicle : C for Citroën or DS, P for Peugeot try { $result = $apiInstance->fetchAlertReferential($locale, $brand); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->fetchAlertReferential: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于 https://localhost/dev/connectedcar/v1
模型文档
- 主体
- 主体1
- 主体10
- 主体2
- 主体3
- 主体4
- 主体5
- 主体6
- 主体7
- 主体8
- 主体9
- CrashlistTotMileage
- EcodrivingevaluationlistDetailedEvaluation
- EcodrivingevaluationlistGlobalEvaluation
- EcodrivingevaluationlistGlobalEvaluationDrivingMarkLabel
- EcodrivingevaluationtripdaylistGlobalEvaluation
- EnvironmentlistInfoDayAndNight
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse20014
- InlineResponse20015
- InlineResponse20016
- InlineResponse20016GeoLocalisation
- InlineResponse20016Trips
- InlineResponse20017
- InlineResponse20018
- InlineResponse20019
- InlineResponse2001TotMileage
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2004GlobalEvaluation
- InlineResponse2005
- InlineResponse2006
- InlineResponse2006Fuel
- InlineResponse2006FuelFuelTankAlerteLabel
- InlineResponse2006Maintenance
- InlineResponse2007
- InlineResponse2007ListAlert
- InlineResponse2008
- InlineResponse2008ListAlert
- InlineResponse2009
- InlineResponse2009Latitude
- RunninglightstatuslistFogFront
- RunninglistInstFuelConsumption
- RunninglistModeBV
授权文档
客户端ID
- 类型:API密钥
- API密钥参数名:client_id
- 位置:URL查询字符串