Skip to content

.NET Client for TheTVDB API integrated with IHttpClientFactory and IServiceCollection.

License

Notifications You must be signed in to change notification settings

TrackSeries/TrackSeries.TheTVDB.Client

Repository files navigation

TrackSeries TheTVDBClient

.NET Client for TheTVDB API integrated with IHttpClientFactory and IServiceCollection.

Build NuGet

Installing via NuGet

dotnet add package TrackSeries.TheTVDB.Client
Install-Package TrackSeries.TheTVDB.Client

Getting Started

The best way of using the client is adding the dependencies to the ServiceCollection and resolving ITVDBClient where you'd like to use it:

services.AddTVDBClient(options => 
{
    options.ApiKey = "Set here your API-KEY for TheTVDB";
});

The client will automatically manage tokens for you so you don't need to worry about it. In case you would like to authenticate to run actions over an specific TheTVDB user you can use the following:

await client.Authentication.AuthenticateAsync("Username", "UserKey");

Now you will be able to use the endpoints under Users:

var userFavoriteSeries = await client.Users.GetFavoritesAsync();

It's possible to share the context between all the instances of the client (token and language):

services.AddTVDBClient(options => 
{
    options.ApiKey = "Set here your API-KEY for TheTVDB";
    options.ShareContextBetweenClients = true;
});

Acknowledgements

Big thanks to HristoKolev for his awesome work on TvDbSharper.

About

.NET Client for TheTVDB API integrated with IHttpClientFactory and IServiceCollection.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages