Trakt.NET
1.4.0
dotnet add package Trakt.NET --version 1.4.0
NuGet\Install-Package Trakt.NET -Version 1.4.0
<PackageReference Include="Trakt.NET" Version="1.4.0" />
paket add Trakt.NET --version 1.4.0
#r "nuget: Trakt.NET, 1.4.0"
// Install Trakt.NET as a Cake Addin #addin nuget:?package=Trakt.NET&version=1.4.0 // Install Trakt.NET as a Cake Tool #tool nuget:?package=Trakt.NET&version=1.4.0
Trakt.NET
Overview
This is a .NET wrapper library with which developers can build .NET applications that integrate with the Trakt.tv API and access its features and data.
Some examples that Trakt.NET can be used for include:
- Retrieve information about movies and TV shows, including details such as titles, descriptions, ratings and release dates
- Tracking what TV shows and movies a user is watching, has watched or wants to watch
- Providing recommendations for TV shows and movies based on a user's watch history
- Building custom TV show and movie lists
To use Trakt.NET, you will need to obtain an API key from Trakt and follow the guidelines for using the API.
Features
- Full Trakt.tv API Coverage
- Authentication and Authorization Support (OAuth 2.0 and Device)
- Completely asynchronous
- API Environments (Production and Sandbox)
- Serialization Service
Supported Platforms
.NET >= 5 | .NET MAUI | .NET Framework >= 4.6.1 | .NET Core >= 2.0 |
Xamarin.Android >= 8.0 | Xamarin.iOS >= 10.14 | Xamarin.Mac >= 3.8 | |
Windows UWP >= 10.0.16299 | Mono >= 5.4 |
Quickstart
> dotnet add package Trakt.NET
using System;
using TraktNet;
using TraktNet.Exceptions;
using TraktNet.Objects.Get.Shows;
using TraktNet.Responses;
using TraktNet.Services;
var client = new TraktClient("Your Trakt Client ID");
try
{
TraktResponse<ITraktShow> showResponse = await client.Shows.GetShowAsync("the-last-of-us");
ITraktShow show = showResponse.Value;
Console.WriteLine($"Title: {show.Title}");
Console.WriteLine($"Year: {show.Year}");
Console.WriteLine();
string json = await TraktSerializationService.SerializeAsync(show, indentation: true);
Console.WriteLine(json);
}
catch (TraktException ex)
{
Console.WriteLine(ex);
}
Output:
Title: The Last of Us
Year: 2023
{
"title": "The Last of Us",
"year": 2023,
"ids": {
"trakt": 158947,
"slug": "the-last-of-us",
"tvdb": 392256,
"imdb": "tt3581920",
"tmdb": 100088
}
}
Documentation
https://henrikfroehling.github.io/Trakt.NET/docs/index.html
Examples
https://henrikfroehling.github.io/Trakt.NET/examples/index.html
Discussions and Issues
Do you have a question or suggestion? Start a discussion
Or do you want to report a bug? Create an issue
Contributions are welcome
Do want to contribute? See how you can contribute
License
The MIT License (MIT)
Copyright (c) 2016 - Current Henrik Fröhling and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Trakt.NET:
Repository | Stars |
---|---|
TheUltimateC0der/listrr
listrr.pro creates and maintains lists on trakt.tv completely automated based on your filters.
|