Skip to content

moviecollection/tv-maze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TVMaze API

Unofficial implementation of the TVMaze API for .NET

NuGet Version NuGet Downloads

Installation

You can install this package via the Package Manager Console in Visual Studio.

Install-Package MovieCollection.TVMaze -PreRelease

Configuration

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);

Schedule

You can get the tv schedule via the GetScheduleAsync method.

var results = await service.GetScheduleAsync(country: "GB");

Streaming Schedule

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.

Limitations

  • Premium capabilities has not been implemented.
  • Show Types, Genres, etc. are not strongly typed.

Notes

License

This project is licensed under the MIT License.