ridesafety / sdk
RideSafety Developer API SDK
v0.1.1
2026-02-10 21:26 UTC
Requires
- php: >=8.1
This package is not auto-updated.
Last update: 2026-03-25 20:08:07 UTC
README
Install
composer require ridesafety/sdk
Publish (Packagist)
- Push this repo to GitHub.
- Create a release tag (e.g.
v0.1.0). - Add the repo to Packagist.
Usage
<?php use RideSafety\RideSafetyClient; $client = new RideSafetyClient( apiKey: 'YOUR_API_KEY', baseUrl: 'https://ridesafety.app' ); $recalls = $client->getRecalls(['vin' => '1HGBH41JXMN109186']); $diagnostics = $client->runDiagnostics([ 'vin' => '1HGBH41JXMN109186', 'symptoms' => 'Rough idle and engine misfire', 'dtc_codes' => ['P0300'], ]); $safety = $client->getSafetyRatings('Honda', 'Civic', 2020);
Smoke test (all APIs)
cd sdk/php
composer install
php smoke_test.php
Edit smoke_test.php to set your API key. Diagnostics may return 402 on free plan.
Auth modes
By default the SDK uses Authorization: Bearer <key>. To use x-api-key instead:
$client = new RideSafetyClient(apiKey: 'KEY', authMode: 'x-api-key');