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" />
                    
Directory.Packages.props
<PackageReference Include="Pandorax.Mot" />
                    
Project file
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
                    
#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
                    
Install Pandorax.Mot as a Cake Addin
#tool nuget:?package=Pandorax.Mot&version=0.0.0-alpha6&prerelease
                    
Install Pandorax.Mot as a Cake Tool

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 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.

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