Unofficial client gem for FIPE vehicle table.
Add this line in your Gemfile:
gem 'fipextractor', '~> 1.0'
$ bundle
Or
$ gem install fipextractor
response = FipExtractor::ReferenceTable.new.call
response.all # array of reference tables id
response = FipExtractor::Brand.new(vehicle_type: :car, reference_table_id: 66).call
response.all # array of vehicle brands
response = FipExtractor::Model.new(vehicle_type: :car, reference_table_id: 66, brand_id: 44).call
response.all # array of model and years
response.models # array of model hashes
response.years # array of year designated
response = FipExtractor::ModelYear.new(vehicle_type: :car, reference_table_id: 66, brand_id: 44, model_id: 1878).call
response.all # array of models with aging
response = FipExtractor::ModelThroughYear.new(vehicle_type: :car, reference_table_id: 66, brand_id: 44, year: 1999, fuel: 1).call
response.all # array of models ordered by year, and/or fuel filter
response = FipExtractor::Vehicle.new(vehicle_type: :car, reference_table_id: 237, brand_id: 59, model_id: 2365, year: 1999, fuel: 3).call
response.details # detailed fipe information of vehicle
{ car: 1, motorcycle: 2, truck: 3 }
rake spec
bundle console
The gem is available as open source under the terms of the MIT License.