An open API service indexing awesome lists of open source software.

https://github.com/garygitton/psa-connected-car-sdk-php

PHP SDK for PSA Connected Car API
https://github.com/garygitton/psa-connected-car-sdk-php

citroen connected-car generated-code peugeot sdk-php

Last synced: about 1 month ago
JSON representation

PHP SDK for PSA Connected Car API

Awesome Lists containing this project

README

          

# psa-connected-car-sdk-php
This is the first release of our connected car API. With this API you can access more than 89 signals in a car. This API is available on Peugeot, Citroën and DS cars.

This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0.5
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
For more information, please visit [https://developer.psa-peugeot-citroen.com/](https://developer.psa-peugeot-citroen.com/)

## Requirements

PHP 5.5 and later

## Installation & Usage
### Composer

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
"repositories": [
{
"type": "git",
"url": "https://github.com/garygitton/psa-connected-car-sdk-php.git"
}
],
"require": {
"garygitton/psa-connected-car-sdk-php": "*@dev"
}
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
require_once('/path/to/psa-connected-car-sdk-php/vendor/autoload.php');
```

## Tests

To run the unit tests:

```
composer install
./vendor/bin/phpunit
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```php
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;
}

?>
```

## Documentation for API Endpoints

All URIs are relative to *https://localhost/dev/connectedcar/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**fetchAlertReferential**](docs/Api/DefaultApi.md#fetchalertreferential) | **GET** /referential/alert |
*DefaultApi* | [**fetchAllCrash**](docs/Api/DefaultApi.md#fetchallcrash) | **POST** /crash/list |
*DefaultApi* | [**fetchAllEcodrivingReferential**](docs/Api/DefaultApi.md#fetchallecodrivingreferential) | **GET** /referential/ecodriving |
*DefaultApi* | [**fetchAllEcoevaluation**](docs/Api/DefaultApi.md#fetchallecoevaluation) | **POST** /ecodriving/evaluation/list |
*DefaultApi* | [**fetchAllEcoevaluationPerDay**](docs/Api/DefaultApi.md#fetchallecoevaluationperday) | **POST** /ecodriving/evaluation/trip/day/list |
*DefaultApi* | [**fetchAllEcoevaluationPerMonth**](docs/Api/DefaultApi.md#fetchallecoevaluationpermonth) | **POST** /ecodriving/evaluation/trip/month/list |
*DefaultApi* | [**fetchAllEnvironmentData**](docs/Api/DefaultApi.md#fetchallenvironmentdata) | **POST** /environment/list |
*DefaultApi* | [**fetchAllLightStatus**](docs/Api/DefaultApi.md#fetchalllightstatus) | **POST** /running/lightstatus/list |
*DefaultApi* | [**fetchAllMaintenanceAlert**](docs/Api/DefaultApi.md#fetchallmaintenancealert) | **POST** /maintenance/list/alert |
*DefaultApi* | [**fetchAllMaintenanceData**](docs/Api/DefaultApi.md#fetchallmaintenancedata) | **POST** /maintenance/list |
*DefaultApi* | [**fetchAllRunningData**](docs/Api/DefaultApi.md#fetchallrunningdata) | **POST** /running/list |
*DefaultApi* | [**fetchAllRunningDataByVehicle**](docs/Api/DefaultApi.md#fetchallrunningdatabyvehicle) | **GET** /running/data/{vin} |
*DefaultApi* | [**fetchAllTrip**](docs/Api/DefaultApi.md#fetchalltrip) | **POST** /trip/list |
*DefaultApi* | [**fetchCrashByVehicle**](docs/Api/DefaultApi.md#fetchcrashbyvehicle) | **GET** /crash/get/{vin} |
*DefaultApi* | [**fetchEcoevaluationByVehicle**](docs/Api/DefaultApi.md#fetchecoevaluationbyvehicle) | **GET** /ecodriving/evaluation/get/{vin} |
*DefaultApi* | [**fetchEcoevaluationByVehicleAndTrip**](docs/Api/DefaultApi.md#fetchecoevaluationbyvehicleandtrip) | **GET** /ecodriving/evaluation/pertrip/{vin}/{tripid} |
*DefaultApi* | [**fetchEcoevaluationPerDayByVehicle**](docs/Api/DefaultApi.md#fetchecoevaluationperdaybyvehicle) | **GET** /ecodriving/evaluation/trip/day/{vin} |
*DefaultApi* | [**fetchEcoevaluationPerDaytripsByVehicle**](docs/Api/DefaultApi.md#fetchecoevaluationperdaytripsbyvehicle) | **GET** /ecodriving/evaluation/daytrips/{vin} |
*DefaultApi* | [**fetchEcoevaluationPerMonthByVehicle**](docs/Api/DefaultApi.md#fetchecoevaluationpermonthbyvehicle) | **GET** /ecodriving/evaluation/trip/month/{vin} |
*DefaultApi* | [**fetchEnvironmentDataByVehicle**](docs/Api/DefaultApi.md#fetchenvironmentdatabyvehicle) | **GET** /environment/get/{vin} |
*DefaultApi* | [**fetchFuelPriceReferenceByVehicle**](docs/Api/DefaultApi.md#fetchfuelpricereferencebyvehicle) | **GET** /trip/get/reference/fuelprice/{vin} |
*DefaultApi* | [**fetchLastDrivingAssistanceByVehicle**](docs/Api/DefaultApi.md#fetchlastdrivingassistancebyvehicle) | **GET** /safety/drivingassistance/{vin} |
*DefaultApi* | [**fetchLastPositionByVehicle**](docs/Api/DefaultApi.md#fetchlastpositionbyvehicle) | **GET** /place/lastposition/{vin} |
*DefaultApi* | [**fetchLastSafetyAssistanceByVehicle**](docs/Api/DefaultApi.md#fetchlastsafetyassistancebyvehicle) | **GET** /safety/safetyassistance/{vin} |
*DefaultApi* | [**fetchLastTripEcoevaluationByVehicle**](docs/Api/DefaultApi.md#fetchlasttripecoevaluationbyvehicle) | **GET** /ecodriving/evaluation/lasttrip/{vin} |
*DefaultApi* | [**fetchLastTripsByVehicle**](docs/Api/DefaultApi.md#fetchlasttripsbyvehicle) | **GET** /trip/last/{vin} |
*DefaultApi* | [**fetchLightStatusByVehicle**](docs/Api/DefaultApi.md#fetchlightstatusbyvehicle) | **GET** /running/data/lightstatus/{vin} |
*DefaultApi* | [**fetchMaintenanceAlertByVehicle**](docs/Api/DefaultApi.md#fetchmaintenancealertbyvehicle) | **GET** /maintenance/alert/{vin} |
*DefaultApi* | [**fetchMaintenanceDataByVehicle**](docs/Api/DefaultApi.md#fetchmaintenancedatabyvehicle) | **GET** /maintenance/{vin} |
*DefaultApi* | [**fetchMaintenanceReferential**](docs/Api/DefaultApi.md#fetchmaintenancereferential) | **GET** /referential/maintenance |
*DefaultApi* | [**fetchPictureByVehicleAndContract**](docs/Api/DefaultApi.md#fetchpicturebyvehicleandcontract) | **POST** /vehicle/picture/{vin}/{contract} |
*DefaultApi* | [**fetchPictureByVehicleAndContract2**](docs/Api/DefaultApi.md#fetchpicturebyvehicleandcontract2) | **GET** /vehicle/picture/{vin}/{contract} |
*DefaultApi* | [**fetchPositionPerTripByVehicle**](docs/Api/DefaultApi.md#fetchpositionpertripbyvehicle) | **GET** /place/positions/trip/{vin} |
*DefaultApi* | [**fetchReferenceTripByVehicle**](docs/Api/DefaultApi.md#fetchreferencetripbyvehicle) | **GET** /trip/get/referencetrip/{vin} |
*DefaultApi* | [**fetchTripByVehicleAndTrip**](docs/Api/DefaultApi.md#fetchtripbyvehicleandtrip) | **GET** /trip/id/{vin}/{tripid} |
*DefaultApi* | [**fetchTripPerPeridByVehicle**](docs/Api/DefaultApi.md#fetchtripperperidbyvehicle) | **GET** /trip/period/{vin} |
*DefaultApi* | [**fetchVehicleInformationByVehicle**](docs/Api/DefaultApi.md#fetchvehicleinformationbyvehicle) | **GET** /vehicle/information/{vin} |
*DefaultApi* | [**searchCrashByVehicle**](docs/Api/DefaultApi.md#searchcrashbyvehicle) | **GET** /crash/search/{vin} |
*DefaultApi* | [**searchDrivingAssistancePerDayByVehicle**](docs/Api/DefaultApi.md#searchdrivingassistanceperdaybyvehicle) | **GET** /safety/search/drivingassistance/day/{vin} |
*DefaultApi* | [**searchSafetyAssistancePerDayByVehicle**](docs/Api/DefaultApi.md#searchsafetyassistanceperdaybyvehicle) | **GET** /safety/search/safetyassistance/day/{vin} |
*DefaultApi* | [**updateFuelPriceForTripByVehicleAndTrip**](docs/Api/DefaultApi.md#updatefuelpricefortripbyvehicleandtrip) | **PUT** /trip/update/fuelprice/{vin}/{tripid} |
*DefaultApi* | [**updateFuelPriceReferenceByVehicle**](docs/Api/DefaultApi.md#updatefuelpricereferencebyvehicle) | **PUT** /trip/update/reference/fuelprice/{vin} |
*DefaultApi* | [**updateReferenceTripByVehicle**](docs/Api/DefaultApi.md#updatereferencetripbyvehicle) | **PUT** /trip/update/referencetrip/{vin} |

## Documentation For Models

- [Body](docs/Model/Body.md)
- [Body1](docs/Model/Body1.md)
- [Body10](docs/Model/Body10.md)
- [Body2](docs/Model/Body2.md)
- [Body3](docs/Model/Body3.md)
- [Body4](docs/Model/Body4.md)
- [Body5](docs/Model/Body5.md)
- [Body6](docs/Model/Body6.md)
- [Body7](docs/Model/Body7.md)
- [Body8](docs/Model/Body8.md)
- [Body9](docs/Model/Body9.md)
- [CrashlistTotMileage](docs/Model/CrashlistTotMileage.md)
- [EcodrivingevaluationlistDetailedEvaluation](docs/Model/EcodrivingevaluationlistDetailedEvaluation.md)
- [EcodrivingevaluationlistGlobalEvaluation](docs/Model/EcodrivingevaluationlistGlobalEvaluation.md)
- [EcodrivingevaluationlistGlobalEvaluationDrivingMarkLabel](docs/Model/EcodrivingevaluationlistGlobalEvaluationDrivingMarkLabel.md)
- [EcodrivingevaluationtripdaylistGlobalEvaluation](docs/Model/EcodrivingevaluationtripdaylistGlobalEvaluation.md)
- [EnvironmentlistInfoDayAndNight](docs/Model/EnvironmentlistInfoDayAndNight.md)
- [InlineResponse200](docs/Model/InlineResponse200.md)
- [InlineResponse2001](docs/Model/InlineResponse2001.md)
- [InlineResponse20010](docs/Model/InlineResponse20010.md)
- [InlineResponse20011](docs/Model/InlineResponse20011.md)
- [InlineResponse20012](docs/Model/InlineResponse20012.md)
- [InlineResponse20013](docs/Model/InlineResponse20013.md)
- [InlineResponse20014](docs/Model/InlineResponse20014.md)
- [InlineResponse20015](docs/Model/InlineResponse20015.md)
- [InlineResponse20016](docs/Model/InlineResponse20016.md)
- [InlineResponse20016GeoLocalisation](docs/Model/InlineResponse20016GeoLocalisation.md)
- [InlineResponse20016Trips](docs/Model/InlineResponse20016Trips.md)
- [InlineResponse20017](docs/Model/InlineResponse20017.md)
- [InlineResponse20018](docs/Model/InlineResponse20018.md)
- [InlineResponse20019](docs/Model/InlineResponse20019.md)
- [InlineResponse2001TotMileage](docs/Model/InlineResponse2001TotMileage.md)
- [InlineResponse2002](docs/Model/InlineResponse2002.md)
- [InlineResponse2003](docs/Model/InlineResponse2003.md)
- [InlineResponse2004](docs/Model/InlineResponse2004.md)
- [InlineResponse2004GlobalEvaluation](docs/Model/InlineResponse2004GlobalEvaluation.md)
- [InlineResponse2005](docs/Model/InlineResponse2005.md)
- [InlineResponse2006](docs/Model/InlineResponse2006.md)
- [InlineResponse2006Fuel](docs/Model/InlineResponse2006Fuel.md)
- [InlineResponse2006FuelFuelTankAlerteLabel](docs/Model/InlineResponse2006FuelFuelTankAlerteLabel.md)
- [InlineResponse2006Maintenance](docs/Model/InlineResponse2006Maintenance.md)
- [InlineResponse2007](docs/Model/InlineResponse2007.md)
- [InlineResponse2007ListAlert](docs/Model/InlineResponse2007ListAlert.md)
- [InlineResponse2008](docs/Model/InlineResponse2008.md)
- [InlineResponse2008ListAlert](docs/Model/InlineResponse2008ListAlert.md)
- [InlineResponse2009](docs/Model/InlineResponse2009.md)
- [InlineResponse2009Latitude](docs/Model/InlineResponse2009Latitude.md)
- [RunninglightstatuslistFogFront](docs/Model/RunninglightstatuslistFogFront.md)
- [RunninglistInstFuelConsumption](docs/Model/RunninglistInstFuelConsumption.md)
- [RunninglistModeBV](docs/Model/RunninglistModeBV.md)

## Documentation For Authorization

## Client ID

- **Type**: API key
- **API key parameter name**: client_id
- **Location**: URL query string

## Author

connectedcar@mpsa.com