ShaggyTech / nhtsa-api-wrapper

Decode and Validate Vehicle VINs - Javascript Client Wrapper for the nhtsa.dot.gov VPIC Vehicles API.
https://vpic.shaggytech.com
MIT License
28 stars 8 forks source link

NHTSA Recall API support #539

Open amattu2 opened 10 months ago

amattu2 commented 10 months ago

Is your feature request related to a problem? Please describe.

NHTSA offers a recalls API which provides information on recalls associated with a year/make/model combination. It would be a great extension to this API wrapper to also support those related endpoints.

Describe the solution you'd like

Describe alternatives you've considered

N/A

Additional context

https://www.nhtsa.gov/nhtsa-datasets-and-apis

ShaggyTech commented 9 months ago

@amattu2 Thank you for the feedback and the link to the datasets. I was casually aware of the other APIs but haven't spent much time looking into them as I had no personal use for Recall or Safety Data.

I'll do some research on the other APIs and put it on my TODO list of features to add. I agree that it would be useful and offer a more complete wrapper for the NHTSA. At first glance It shouldn't be too difficult to implement those as they seem to use similar URL structure and return data as the VPIC API does.

ShaggyTech commented 7 months ago

@amattu2

I've been working on updating the package internals so I can add support for the different APIs and make sure their responses are correctly typed. This has been mostly completed.

It's slow going as I'm doing this in my spare time but I'm making good progress towards implementing your feature request.

I've decided to start with the Safety Ratings API and have a working wrapper function called safetyRatings(). You can check it out HERE on branch "next". I'll be working on adding wrappers for the other APIs (recalls, complaints, etc.) and then doing some other chores and refactors on my list.

Once completed it will be released as version 4.0.0, as there will be some major breaking changes. For example, I'll be changing the VPIC wrapper functions names to camelCase as opposed to PascalCase as they are now; ex: DecodeVin() --> decodeVin()