MotoRecall

Find vehicle recall info by manufacturer and VIN.

Installation

Add this line to your application's Gemfile:

gem 'moto_recall'

And then execute:

$ bundle

Or install it yourself as:

$ gem install moto_recall

Usage

Find vehicle recall data by make and VIN.

MotoRecall.find(:chevrolet, "1G1ZC5E14BF265574")

NOTE: Toyota/Lexus/Scion are not supported right now because they require a CAPTCHA to be solved.

Maintenance and Sampling

The problem of presenting uniform data from a disparate set of remote services is difficult—particularly from the perspective of maintenance, considering that breaking changes are likely to occur without warning. To help with monitoring the parity of the code and the remotes, we have included a rake task to aid in sampling responses from each of the remotes.

$ bundle exec rake samples

Defining Samples

This task uses a data in the file data/sample_queries.yml as input with the following format:

---
chevrolet: 2011 Chevrolet Malibu
ford: 2013 Ford Explorer XLT
chrysler: 2013 Chrysler 300
# make: vehicle-description
# ...

Each row in this file has two components: a make name, and a vehicle description. The vehicle description is used to find a set of VINs for that vehicle, each VIN is then passed to MotoRecall.find along with the make to get a list of recalls for that VIN.

Because finding recalls are directly coupled to a specific VIN, it can be tedious to find appropriate VINs to use for testing. This setup is designed to minimize friction when needing to test MotoRecall with a particular manufacturer's service.

Examining Samples

The samples task will write output to a file called samples.csv, which will contain a table of attributes for each of the found recalls. See samples-example.csv for an example.

Adding New Samples

When you want to test MotoRecall with a new manufacturer, it is recommended to start by identifying a class of vehicle with recently announced recalls. Head to Google with something like "volkswagen recalls". Somewhere in the first handful of results, you are likely to come across an article announcing that VW has announced recalls for some set of it's lineup. For example, let's say this set includes the 2014 Passat. You would want to add a line to data/sample_queries.yml which looks like

volkswagen: 2014 Volkswagen Passat

NOTE: The description component of the entry (the part after the make) is freeform text. This text is used to identify sample VINs to be tested.

Now the next time you run the samples task, some VINs will be tested which belong to 2014 Passats. If no recalls are found for your query, try another class of vehicle.