Unofficial implementation of the TVMaze API for .NET
You can install this package via the Package Manager Console
in Visual Studio.
Install-Package MovieCollection.TVMaze -PreRelease
Get or create a new static HttpClient
instance if you don't have one already.
// HttpClient lifecycle management best practices:
// https://learn.microsoft.com/dotnet/fundamentals/networking/http/httpclient-guidelines#recommended-use
private static readonly HttpClient httpClient = new HttpClient();
Then, you need to create the service.
// using MovieCollection.TVMaze;
var service = new TVMazeService(httpClient);
Alternatively, you can create a new TVMazeOptions
class to set your options.
var options = new TVMazeOptions
{
ApiKey = "your-api-key",
};
var service = new TVMazeService(httpClient, options);
You can get the tv schedule via the GetScheduleAsync
method.
var results = await service.GetScheduleAsync(country: "GB");
You can get the streaming schedule via the GetStreamingScheduleAsync
method.
var results = await service.GetStreamingScheduleAsync(country: "US");
Please see the demo project for more examples.
- Premium capabilities has not been implemented.
- Show Types, Genres, etc. are not strongly typed.
- Please read the TVMaze's API Licensing and terms of service before using their services.
This project is licensed under the MIT License.