Download the PHP package coderstephen/edmunds-sdk without Composer
On this page you can find all versions of the php package coderstephen/edmunds-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coderstephen/edmunds-sdk
More information about coderstephen/edmunds-sdk
Files in coderstephen/edmunds-sdk
Package edmunds-sdk
Short Description An implementation of an Edmunds SDK for PHP
License Apache-2.0
Informations about the package edmunds-sdk
Edmunds SDK
A simple but native implementation of a PHP SDK for the Edmunds API. Provides local object representations of remote data.
Installation
Install with Composer, obviously:
Usage
First, create an ApiClient
instance of the type that corresponds to the desired Edmunds API, which connects to the Edmunds server:
All available APIs extend from the ApiClient
base class and are created in the same way. Pass in your Edmunds API key as the first argument. If you do not already have an API key, you will need to register with Edmunds first.
You can now access almost all of the Edmunds API with the client object. Currently, only the Vehicle API has object wrappers. To make a raw request to any endpoint, use the ApiClient::makeCall()
method:
See the Edmunds API documentation for details on what endpoints are available and their usage.
Vehicle API
A vehicle API client is provided to access Edmunds' extensive vehicle knowledge database. To use it, first create a VehicleApiClient
object:
The VehicleApiClient
class extends ApiClient
and provides several easy-to-use wrapper methods for accessing data objects. Below is a short example of some of the things you can do with the SDK:
Caching
The application that this library was originally created for required making thousands of API calls while processing artificial intelligence instructions. To lighten the heavy load, this library provides a really simple API call caching solution using the filesystem. To use the caching mechanism, pass an ApiCache
object when creating an API client:
Every time specific data about an entity is requested, the cache is checked first. If no cached data is found, an API call is made as normal, and the result is written to the cache for later.
License
Licensed under the Apache Public License 2.0. See the license file for details.