Pandorax.Mot
0.0.0-alpha6
This is a prerelease version of Pandorax.Mot.
dotnet add package Pandorax.Mot --version 0.0.0-alpha6
NuGet\Install-Package Pandorax.Mot -Version 0.0.0-alpha6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pandorax.Mot" Version="0.0.0-alpha6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pandorax.Mot" Version="0.0.0-alpha6" />
<PackageReference Include="Pandorax.Mot" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pandorax.Mot --version 0.0.0-alpha6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Pandorax.Mot, 0.0.0-alpha6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Pandorax.Mot&version=0.0.0-alpha6&prerelease
#tool nuget:?package=Pandorax.Mot&version=0.0.0-alpha6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Mot
A C# Wrapper around the DVSA MOT History API. https://documentation.history.mot.api.gov.uk/
Installation
To install the package, use the following command:
dotnet add package Pandorax.Mot
Usage
To use the MOT History API in your application, you need to register the services in your IServiceCollection
. You can do this in your Startup.cs
or Program.cs
file:
using Microsoft.Extensions.DependencyInjection;
using Pandorax.Mot.DependencyInjection;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMotHistoryApi()
.ConfigureMotHistoryOptions(options =>
{
options.ApiKey = "your-api-key";
options.ClientId = "your-client-id";
options.ClientSecret = "your-client-secret";
options.TokenUrl = "your-token-url";
});
}
}
Services
The main service provided by this library is IMotHistoryService
. You can use it to fetch MOT history data:
using Pandorax.Mot.Services;
public class MotHistoryConsumer
{
private readonly IMotHistoryService _motHistoryService;
public MotHistoryConsumer(IMotHistoryService motHistoryService)
{
_motHistoryService = motHistoryService;
}
public async Task GetMotHistory(string registration)
{
var result = await _motHistoryService.GetMotTestsByRegistrationAsync(registration);
// Handle the result
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Duende.IdentityModel (>= 7.0.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.Options (>= 8.0.2)
-
net9.0
- Duende.IdentityModel (>= 7.0.0)
- Microsoft.Extensions.Caching.Memory (>= 9.0.3)
- Microsoft.Extensions.DependencyInjection (>= 9.0.3)
- Microsoft.Extensions.Http (>= 9.0.3)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Options (>= 9.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Pandorax.Mot:
Package | Downloads |
---|---|
Pandorax.Mot.DependencyInjection
Pandorax.Mot extensions for ASP.NET Core |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.0-alpha6 | 427 | a month ago |
0.0.0-alpha5 | 121 | a month ago |
0.0.0-alpha4 | 118 | a month ago |
0.0.0-alpha3 | 295 | 4/21/2022 |
0.0.0-alpha2 | 197 | 4/21/2022 |
0.0.0-alpha1 | 166 | 4/21/2022 |