A simple Node.js SDK to access the Edmunds Developer API.
Before you can use this SDK you'll need to register for a key at the Edmunds Developer site.
Clone the repository Include the Module:
// require the module
var edmSDK = require('./edmunds-node-sdk/index');
NOTE: You may have to alter the path depending on where you test app is, and where you have cloned the repository
This version only supports the following APIs:
'use strict';
var edmSDK = require('../edmunds-node-sdk/index');
// Your KEY HERE
edmSDK.setKey(<YOUR KEY HERE>);
// Parameter Description Possible Values
// state state of the car new, used, future
// year The year of the car 1990-current year
// view response details basic, full
var opt = {
view: 'basic',
year: "1996"
// state: "used"
};
var genericCB = function(response) {
console.log(response);
};
// All calls can be made without the 'opt' parameter
// Spec: Make Calls
var getMake = new edmSDK.makeInfo();
getMake.getTotalMakeCounts(genericCB, opt);
getMake.getSpecificMakeInfo(genericCB, "lexus", opt);
getMake.getListCarMakes(genericCB, opt);
// Spec: Model Calls
var getModel = new edmSDK.modelInfo();
getModel.getModelStyleDetails(genericCB, "lexus", "LS 400", opt);
getModel.getListCarModels(genericCB, "lexus", opt);
getModel.getModelCountByMake(genericCB, "lexus", opt);
This release does NOT have automated testing. All testing was validating with a simple app as shown above.
If you'd like to help just fork and pull.
The following still needs to get done:
- Finish the complete Vehicle API implementation
- Include a better application that shows the API being used