UvA.TermTime.Client
2.0.0
dotnet add package UvA.TermTime.Client --version 2.0.0
NuGet\Install-Package UvA.TermTime.Client -Version 2.0.0
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="UvA.TermTime.Client" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UvA.TermTime.Client" Version="2.0.0" />
<PackageReference Include="UvA.TermTime.Client" />
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 UvA.TermTime.Client --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: UvA.TermTime.Client, 2.0.0"
#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.
#:package UvA.TermTime.Client@2.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UvA.TermTime.Client&version=2.0.0
#tool nuget:?package=UvA.TermTime.Client&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
TermTime Client
This package provides an API client for TermTime.
Usage
Each academic year has its own TermTime client. To configure the API keys, use the following options pattern:
{
"TermTime": {
"url": "https://ttportaluvadev.com/v1/api/",
"apiKeys": {
"2023": "<super-secret-2023>",
"2024": "<super-secret-2024>"
}
}
}
To use the TermTime client in your software, install the package. And apply the following steps:
- Register the TermTime client in your DI container, where
sectionNameis the name of the section containing the options:
services.AddTermTimeClient(sectionName);
- Use the
ITermTimeClientFactoryin your Service or Controller:
public class MyService
{
private readonly ITermTimeClientFactory _factory;
public MyService(ITermTimeClientFactory factory)
{
_factory = factory;
}
public async Task DoRequest(int academicYear)
{
// Will throw an exception if there is no TermTime client registered for the given year
var client = _factory.CreateClient(academicYear);
var pong = await client.Ping();
}
}
Validation
All requests support validation using DataAnnotations. To validate a request, use the following code:
var request = new DeleteCourse("oh:course:12345");
var context = new ValidationContext(request);
Validator.Validate(request, context); // Will throw a ValidationException if invalid
Exceptions
If requests fail for whatever reason, a TermTimeException is thrown.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Http (>= 10.0.1)
- Microsoft.Extensions.Http.Resilience (>= 10.1.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.1)
- Microsoft.Net.Http.Headers (>= 10.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 225 | 12/12/2025 |
| 1.14.15 | 796 | 12/3/2025 |
| 1.14.11 | 326 | 10/22/2025 |
| 1.14.9 | 236 | 10/9/2025 |
| 1.14.0 | 422 | 9/16/2025 |
| 1.13.3 | 756 | 7/22/2025 |
| 1.13.2-fix-offer-converter.1 | 422 | 7/21/2025 |
| 1.13.1 | 219 | 7/15/2025 |
| 1.13.1-fix-jsonconverters.1 | 153 | 7/15/2025 |
| 1.13.0-GLASS-4504.1 | 148 | 7/15/2025 |
| 1.12.0 | 221 | 7/2/2025 |
| 1.11.0 | 209 | 7/2/2025 |
| 1.10.1 | 207 | 7/2/2025 |
| 1.10.0 | 201 | 7/2/2025 |
| 1.9.0 | 213 | 7/1/2025 |
| 1.8.0 | 214 | 6/25/2025 |
| 1.7.1 | 202 | 6/25/2025 |
| 1.7.0 | 199 | 6/24/2025 |
| 1.6.1 | 203 | 6/24/2025 |
| 1.6.0 | 195 | 6/23/2025 |
Loading failed