Skip to content

arex388/Arex388.NhtsaVpic

Repository files navigation

Arex388.NhtsaVpic

A VIN decoding library using the National Highway Traffic Safety Administration (NHTSA) vPIC API.

NOTE: The API is only minimally implemented because the project that spawned this library does not have a need for anything but the year, make and model of a vehicle. I will revisit and complete this library in the future, I just wanted to separate it out as a NuGet package for now.

To use create a new instance of NhtsaVpicClient and pass in an instance of HttpClient. The original API documentation can be found here.

For dependency injection use the Arex388.NhtsaVpic.Extensions.Microsoft.DependencyInjection. NuGet package with the AddNhtsaVpic() extension method. This will register INhtsaVpicClient to NhtsaVpicClient. Use INhtsaVpicClient interface in your code.

Available as a NuGet package here.

var nhtsaVpic = new NhtsaVpicClient(
    httpClient,
    //	debug = true/false
);

Decode

var response = await nhtsaVpic.DecodeAsync(
    "VIN"
);

Decode Batch

var response = await nhtsaVpic.DecodeBatchAsync(
    "VIN1",
    "VIN2",
    ...
);

About

A C# client for the NHTSA vPIC API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages