tmdb_api library
Client library for themoviedb
-
Import it Now in your Dart code, you can use:
import 'package:tmdb_api/tmdb_api.dart';
-
Create Instance
Now you need to create instance for
TMDB
andApiKeys
with your api keys.final tmdbWithCustomLogs = TMDB( //TMDB instance ApiKeys('Your API KEY', 'apiReadAccessTokenv4'),//ApiKeys instance with your keys, );
-
Configuring console logs
There are 3 logconfigs presets avaliable.
ConfigLogger.showAll()
: development use.ConfigLogger.showRecommended()
: development use.ConfigLogger.showNone()
: production use.
You can add any off this presets to
logConfig
named parameter ofTMDB
instance Custom Logsfinal tmdbWithCustomLogs = TMDB( ApiKeys('Your API KEY', 'apiReadAccessTokenv4'), logConfig: ConfigLogger( showLogs: true,//must be true than only all other logs will be shown showErrorLogs: true, ), );
Example
For getting Trending movies
Map result = await tmdb.v3.trending.getTrending(mediaType = MediaType.all,timeWindow = TimeWindow.day);
For more API documentation
Classes
- Account
- AccountV4
- ApiKeys
- Auth
- AuthV4
-
Category<
V extends Version> - Base calss of Categorys
- Certification
- Changes
- Collections
- Companies
- ConfigLogger
- Configure the logs
- Credit
- Discover
- Find
- Geners
- Genres
- GuestSession
- Images
- ImageSizes
- Keywords
- ListItem
- Lists
- ListsV4
- Logger
- Movies
- Networks
- People
- Reviews
- Search
- TMDB
- TMDB.org API
- Trending
- Tv
- TvEpisodeGroup
- TvEpisodes
- TvSeasons
- V3
- V4
- Version
- Base class of Versions
- WatchProviders
- Watch Providers
Enums
- ExternalId
- FilterTvShowsByStatus
- FilterTvShowsByType
- HttpMethod
- Http request methods
- MediaType
- SortBy
- Sort the results.
- SortListBy
-
lists.Dart
account.dart
- SortMoviesBy
- SortTvShowsBy
- TimeWindow
Exceptions / Errors
- TMDBDioError
-
TMDBException<
T> - Base exception
- TMDBOtherException