Gem for connection to instaVIN and retrieving a report.
Add this line to your application's Gemfile:
gem 'instavin'
And then execute:
$ bundle
Or install it yourself as:
$ gem install instavin
To start, use a configuration block to set up your credentials:
InstaVIN.configure do |config|
config.user_id = "xxxx"
config.password = "xxxx"
config.api_key = "xxxx"
end
There are two ways to use the service. Through your own username and password, which are set in the configuration. Or, through an access_token generated by another user's user_id and password, and your API key.
To request an access token for another user:
InstaVIN.configure do |config|
config.api_key = "xxxx"
end
reports = InstaVIN::Reports.new
token = reports.access_token(username, password)
reports.set_auth_with_token(token)
reports.vtr_report("VIN")
or
InstaVIN.configure do |config|
config.api_key = "xxxx"
end
reports = InstaVIN::Reports.new(access_token)
reports.vtr_report("VIN")
There are two reports you can request through the API. VTR is a full report, SVC is a partial, Salvage and Vehicle Check report.
reports = InstaVIN::Reports.new
reports.vtr_report("VIN")
reports.svc_report("VIN")
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request