AbgeordnetenWatchDotNet 2.0.0
dotnet add package AbgeordnetenWatchDotNet --version 2.0.0
NuGet\Install-Package AbgeordnetenWatchDotNet -Version 2.0.0
<PackageReference Include="AbgeordnetenWatchDotNet" Version="2.0.0" />
<PackageVersion Include="AbgeordnetenWatchDotNet" Version="2.0.0" />
<PackageReference Include="AbgeordnetenWatchDotNet" />
paket add AbgeordnetenWatchDotNet --version 2.0.0
#r "nuget: AbgeordnetenWatchDotNet, 2.0.0"
#:package AbgeordnetenWatchDotNet@2.0.0
#addin nuget:?package=AbgeordnetenWatchDotNet&version=2.0.0
#tool nuget:?package=AbgeordnetenWatchDotNet&version=2.0.0
Installation
dotnet add package AbgeordnetenWatchDotNet
Usage
using AbgeordnetenWatchDotNet.Generated;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
var authenticationProvider = new AnonymousAuthenticationProvider();
var adapter = new HttpClientRequestAdapter(authenticationProvider);
var client = new AbgeordnetenWatchApiClient(adapter);
var result = await client.Parliaments.GetAsync();
foreach (var parliament in result?.Data ?? [])
{
Console.WriteLine(parliament.Label);
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
Development
Setup
- You need to have .NET 9 or later installed
- You need to have corepack enabled
- This also requires Node 16.9 or later
Code generation
This project relies heavily on code generation.
API Spec
Since the API spec is not available as an OpenAPI specification, we generate our own using typespec.
The spec is generated using MSBuild and the typespec compiler in the
AbgeordnetenWatchDotNet.ApiSpec project.
Building it causes the the spec to get generated.
API Client
The actual API client is also generated using kiota. It consumes the API Spec to generate a C# API client that is fully type-safe.
Watch
To make developing this library as easy as possible, the whole toolchain supports using dotnet watch.
This means using
dotnet watch --project ./AbgeordnetenWatchDotNet.Example/AbgeordnetenWatchDotNet.Example.csproj -- build
you can work on any of the files (including the .tsp-files) and changes cause the spec and the API client to get updated.
You can also run dotnet watch in any of the project directories.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- JetBrains.Annotations (>= 2025.2.4)
- Microsoft.Kiota.Abstractions (>= 1.22.0)
- Microsoft.Kiota.Http.HttpClientLibrary (>= 1.22.0)
- Microsoft.Kiota.Serialization.Json (>= 1.22.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AbgeordnetenWatchDotNet:
| Package | Downloads |
|---|---|
|
AbgeordnetenWatchDotNet.Extensions.DependencyInjection
An API client for the abgeordnetenwatch.de website. |
GitHub repositories
This package is not used by any popular GitHub repositories.
# Unreleased
* BREAKING: converted extension methods for query option builders to extension properties
* Added more query filters in the spec (which you can now filter for)
* Support for AbgeordnetenWatch API 2.8.2
# 1.0.1
* No changes (just a version bump)
# 1.0.0
* Initial release
* Support for AbgeordnetenWatch API 2.7
* `Extensions.DependencyInjection`: Initial release