API V2 dotnet library

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
Post Reply
a-jackson
Posts: 2
Joined: Sun Sep 17, 2017 3:38 am

Sun Sep 17, 2017 3:43 am

I was recently updating my project to use the new Json API and thought I'd make it a separate library.

I've pushed it to Nuget here https://www.nuget.org/packages/TheTvdbDotNet/

It's written for dotnet standard 2.0 so requires Dotnet Core 2.0 or .Net Framework 4.6.1.

I only implemented the API methods that I needed but if there's any interest I'll look at adding more. Or accepting pull requests on Github https://github.com/a-jackson/TheTvdbDotNet
ghentsch
Posts: 1
Joined: Wed Nov 15, 2017 8:20 am

Wed Nov 15, 2017 8:23 am

Do you have sample code showing how to authenticate and get data such as a series? It wasn't clear to me looking at the interface.
a-jackson
Posts: 2
Joined: Sun Sep 17, 2017 3:38 am

Thu Nov 16, 2017 3:38 am

It'll automatically authenticate when required. Just inject the type you need, e.g. ITvdbSearch and then use it. There's an example here https://github.com/a-jackson/tvsorter/b ... bV2.cs#L29 it's not my best work since I was just updating an old project for the new API.

When configuring the DI container, the Authenticator takes your API key which is used to automatically login before the first request. See the Ninject module here for an example. https://github.com/a-jackson/TheTvdbDot ... tModule.cs

I guess it should work with most DI frameworks, just I used Ninject.

If I get time this weekend, I'll try to write a sample usage in the README or something.
Post Reply