-
Notifications
You must be signed in to change notification settings - Fork 19
V2 Documentation
get_makes(state*, year*, view*) # Get the list of all makes
get_details_by_name(name, state*, year*, view*) # Get a make and its models by providing its name (ie: 'lexus')
get_count(state*, year*, view*) # Get count of all makes
get_models_by_make(make, state*, year*, view*, submodel*, category*) # Get models by vehicle make name
get_details_by_make_and_model(make, model, state*, year*, view*, submodel*, category*) # Get details by make and model names
get_count_by_make(make, state*, year*, view*, submodel*, category*) # Get model count by make name
get_model_years_by_make_model(make, model, state*, view*, submodel*, category*) # Get model years by make and model name
get_style_by_make_model_year(make, model, year, state*, view*, submodel*, category*) # Get style details by make name and model year
get_count_by_make_model(make, model, state*, view*, submodel*, category*) # Get count by make and model names
get_style_by_style_id(style_id, view*) # Get style by Edmunds style id
get_style_by_make_model_year(make, model, year, state*, view*, submodel*, category*) # Get style by make, model, and year
get_style_by_chrome_id(chrome_id) # Get style by Chrome ID
get_style_count(state*) # Get style count
get_style_count_by_make(make, state*) # Get style count by make
get_style_count_by_make_model(make, model, state*) # Get style count by make and model
get_style_count_by_make_model_year(make, model, year, state*) # Get style count by make, model, and year
http://developer.edmunds.com/docs/read/the_vehicle_api/Photos
find_by_style_id(style_id) # Get an array of photo detail objects for a particular vehicle style
find_sample_by_style_id(style_id) # Get a sample photo url for a particular vehicle style - tries to get a exterior front view image if available.
Note that the image arrays returned by the find_photos_by_style_id() method return an array of image links that will still need the base url attached to them in order to view the image.
The image base url can be accessed from any of the classes, for instance these all return the same image base url:
Edmunds::API.new.image_base_url
Edmunds::Make.new.image_base_url
Edmunds::Photo.new.image_base_url
or if you set the new instance to a variable:
p = Edmunds::Photo.new
p.image_base_url
Will both return the base url (url prefix) that must be prepended to the links returned by the Photo API method.
With this in mind, I added that last photo method to grab a sample url for an image of any style, then go ahead and add the image base url to the beginning, thus making a valid url that you can click on to see the image... it is not listed as an Edmunds API method, but I found it useful.
More documentation on the way...