2017 © Pedro Peláez
 

library edmunds-php-api

edmunds api bundle

image

rfink/edmunds-php-api

edmunds api bundle

  • Friday, February 27, 2015
  • by rfink
  • Repository
  • 3 Watchers
  • 9 Stars
  • 173 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

edmunds-php-api

Collection of API resources for the Edmunds vehicle API(s). The http client used is Guzzle (http://guzzlephp.org)., (*1)

Usage

You will first need an API key. You can go to http://developer.edmunds.com and apply for a developer API key. There are 4 different APIs that make up the entirety of the Edmunds API, you will have to apply for a key for each. I won't go into too much detail here about that process., (*2)

In the simplest form, you can use it as follows:, (*3)

In your composer.json, add the following dependency (replace {version} with latest version):

    "rfink/edmunds-php-api": "{version}"

Then run composer update from the command line.

Inside your app, you can bootstrap the guzzle client by adding the following code:

    $vehicleClient = \RF\Edmunds\Vehicle\Client::factory(array(
        'api_key' => '{your_api_key_here}',
        'base_url' => 'http://api.edmunds.com'
    ));

Then, you can run commands:

    $args = array('id' => '100533210');
    $command = $client->getCommand('modelYear.findById', $args);
    $response = $command->execute()->toArray();

Response will contain a plain php array representing the API response payload.

The best way to see how this works in action is to take a peek at the unit tests, as well as the API descriptions at the Edmunds developer website. The service description JSON files are also a good place to see required parameters for each call, and the response format., (*4)

A symfony2 bundle is being developed to wrap this as a service as well, see https://github.com/rfink/EdmundsBundle

** This API is still in heavy, heavy alpha mode. Use in production at your own risk.**, (*5)

The Versions

27/02 2015

dev-feature/apiv2

dev-feature/apiv2 https://www.github.com/rfink/edmunds-php-api

edmunds api bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ryan Fink

api edmunds

07/07 2013

dev-master

9999999-dev https://www.github.com/rfink/edmunds-php-api

edmunds api bundle

  Sources   Download

MIT

The Requires

 

by Ryan Fink

api edmunds

07/07 2013

v0.0.0

0.0.0.0 https://www.github.com/rfink/edmunds-php-api

edmunds api bundle

  Sources   Download

MIT

The Requires

 

by Ryan Fink

api edmunds

07/07 2013

v0.0.0-RC1

0.0.0.0-RC1 https://www.github.com/rfink/edmunds-php-api

edmunds api bundle

  Sources   Download

MIT

The Requires

 

by Ryan Fink

api edmunds

07/07 2013

dev-develop

dev-develop https://www.github.com/rfink/edmunds-php-client

edmunds api bundle

  Sources   Download

MIT

The Requires

 

by Ryan Fink

api edmunds