trakt_api_client library
A comprehensive, type-safe, and highly optimized Dart/Flutter client for the Trakt.tv API.
This library provides access to all documented Trakt.tv API endpoints, including Movies, Shows, Seasons, Episodes, Users, Sync, Search, and more. It features automatic OAuth2 token management, advanced filtering, and a robust data model architecture.
Classes
- AuthenticationApi
- Access to authentication endpoints.
- CalendarsApi
- Access to calendar endpoints for all shows/movies.
- CertificationsApi
- Access to certification endpoints.
- CheckinApi
- Access to checkin endpoints.
- CommentsApi
- Access to comment endpoints.
- CountriesApi
- Access to country endpoints.
- EpisodesApi
- Access to episode endpoints.
- GenresApi
- Access to genre endpoints.
- LanguagesApi
- Access to language endpoints.
- ListsApi
- Access to list endpoints.
- MoviesApi
- Access to movie endpoints.
- NetworksApi
- Access to network endpoints.
- NotesApi
- Access to note endpoints.
- PeopleApi
- Access to people endpoints.
- RecommendationsApi
- Access to recommendation endpoints.
- ScrobbleApi
- Access to scrobble endpoints.
- SearchApi
- Access to search endpoints.
- SeasonsApi
- Access to season endpoints.
- ShowsApi
- Access to show endpoints.
- SyncApi
- Access to sync endpoints.
- TraktAirs
- Representation of when a show airs.
- TraktApiClient
- The main entry point for the Trakt.tv API.
- TraktApiClientConfig
- Configuration for the TraktApiClient.
- TraktBoxOfficeMovie
- Box office revenue information for a movie.
-
TraktCalendarEntry<
T> - Generic wrapper for calendar entries.
- TraktCalendarMovie
- Represents a movie entry in a calendar.
- TraktCalendarShow
- Represents a show entry in a calendar.
- TraktCast
- Represents a cast member.
- TraktCertification
- Content certification (e.g. PG-13).
- TraktCheckinResponse
- Represents a response to a checkin request.
- TraktComment
- Represents a comment on a media object.
- TraktCommentActivities
- Comment-specific last activities.
- TraktCountry
- Represents a country.
- TraktCredits
- Cast and crew information.
- TraktCrew
- Represents a crew member.
- TraktDateUtils
- Utility class for Trakt date operations.
- TraktDeletedPerson
- Information about a deleted person.
- TraktDeviceCode
- Represents a device code response from Trakt.
- TraktEpisode
- Represents a media episode (TV show).
- TraktEpisodeProgress
- Progress information for a single episode.
- TraktEpisodeState
- Progress state for a single episode.
- TraktFilters
- Common filters that can be applied to many Trakt API endpoints.
- TraktFollowRequest
- A follow request from another user.
- TraktGenre
- Represents a media genre.
- TraktIds
- IDs for any media object (Movie, Show, Season, Episode, Person).
- TraktImageUtils
- Helper class to generate TMDB image URLs.
- TraktLanguage
- Represents a language.
- TraktLastActivities
- Last activities for a user.
- TraktList
- Represents a Trakt list.
- TraktListActivities
- List-specific last activities.
- TraktListItem
- Represents an item within a Trakt list.
-
TraktListResponse<
T> - Generic response wrapper for lists.
- TraktMediaActivities
- Media-specific last activities.
- TraktMediaAlias
- Title alias for a media object.
- TraktMediaCertification
- Media-specific certification.
- TraktMediaEntity
- A universal container for any Trakt media object.
- TraktMediaMetadata
- Metadata about a media item's collection/playback state.
-
TraktMediaState<
T> - Generic model for user's watched/collected items.
-
TraktMetadata<
T> - Generic wrapper for metadata-heavy items (Trending, Most Played, etc.).
- TraktMovie
- Represents a movie.
- TraktMovieRelease
- Release information for a movie.
- TraktMovieTrailers
- Collection of trailer URLs for a movie.
- TraktNetwork
- Represents a TV network.
- TraktNote
- Represents a user note.
- TraktOAuthToken
- Represents an OAuth access token.
- TraktPagination
- Pagination info returned in headers.
- TraktPaginationParams
- Encapsulates pagination parameters for Trakt API requests.
- TraktPerson
- Represents a person (actor, crew member).
-
TraktPersonCredit<
T> - Generic credit information for a person.
- TraktPersonMovieCredits
- Movie credits for a person.
- TraktPersonShowCredits
- Show credits for a person.
- TraktPersonUpdate
- Information about a person's profile update.
- TraktRateLimit
- Rate limit information returned by Trakt.
- TraktRating
- Rating information for any object.
- TraktScrobbleResponse
- Response to a scrobble request.
- TraktSearchResult
- Represents a result from a Trakt search.
- TraktSearchUtils
- Utilities for escaping Trakt search queries.
- TraktSeason
- Represents a season of a TV show.
- TraktSeasonProgress
- Progress information for a single season.
- TraktSeasonState
- Progress state for a single season.
- TraktServiceConnection
- OAuth connection details for a single service.
- TraktSharing
- Represents social sharing settings.
- TraktSharingText
- Sharing text templates for different media types.
- TraktSharingTextTemplate
- Template strings for a specific media type.
- TraktShow
- Represents a TV show.
- TraktShowProgress
- Progress information for a TV show.
- TraktStats
- General statistics for a media object.
- TraktStudio
- Represents a production studio.
- TraktSyncCount
- Count of items in a sync operation.
- TraktSyncEpisode
- Episode entry for sync requests.
- TraktSyncHistory
- History entry for sync requests.
- TraktSyncMovie
- Movie entry for sync requests.
- TraktSyncNotFound
- Items not found during a sync operation.
- TraktSyncPerson
- Person entry for sync requests.
- TraktSyncPlayback
- Playback progress item for sync requests.
- TraktSyncRating
- Rating entry for sync requests.
- TraktSyncRequest
- Request payload for synchronization.
- TraktSyncResponse
- Response from a sync operation.
- TraktSyncSeason
- Season entry for sync requests.
- TraktSyncShow
- Show entry for sync requests.
- TraktTranslation
- Translation for a media object.
- TraktUser
- Represents a user profile on Trakt.tv.
- TraktUserAccount
- Account settings from /users/settings endpoint.
- TraktUserConnection
- A connection between two users (follower/friend).
- TraktUserConnections
- Collection of all social service connections.
- TraktUserEpisodeStats
- User episode statistics.
- TraktUserImages
- Avatar images for a user profile.
- TraktUserMovieStats
- User movie statistics.
- TraktUserNetworkStats
- User network statistics (friends, followers).
- TraktUserRatingStats
- User rating statistics.
- TraktUserSettings
- User account settings.
- TraktUserShowStats
- User show statistics.
- TraktUserSocialIds
- Social IDs for a user.
- TraktUserStats
- Comprehensive statistics for a user profile.
- TraktVideo
- Represents a video related to a movie or show (e.g. trailer, teaser).
- UsersApi
- Access to user endpoints.
Enums
- TraktCommentSort
- Sort types for comments.
- TraktCommentType
- Types of comments that can be filtered.
- TraktExtendedInfo
- Amount of information returned by the API.
- TraktIdType
- Specific ID types that can be looked up.
- TraktLastActivity
- Types of last activity to filter progress.
- TraktListSort
- Sort types for lists.
- TraktMediaClass
- High-level media classes (movies or shows).
- TraktMediaType
- Supported media types in Trakt.
- TraktPeriod
- Time periods for filtering trends and stats.
- TraktPrivacy
- Privacy settings for lists and notes.
- TraktReportReason
- Reasons for reporting content.
- TraktSearchField
- Specific fields that can be searched.
- TraktSortHow
- Sort direction for Trakt list responses.
- TraktWatchlistSort
- Sort types for watchlists.
Exceptions / Errors
- TraktApiException
- Custom exception thrown when a Trakt API request fails.