tmdb_api 2.1.3 tmdb_api: ^2.1.3 copied to clipboard
Dart client-side API package for TMDB.org API (https://www.themoviedb.org/).
import 'package:tmdb_api/tmdb_api.dart';
Future<void> main(List<String> args) async {
//api with out console logs
final tmdb = TMDB(ApiKeys('Your API KEY', 'apiReadAccessTokenv4'));
print(await tmdb.v3.movies.getPopular());
//api with showing all console logs
final tmdbWithLogs = TMDB(
ApiKeys('Your API KEY', 'apiReadAccessTokenv4'),
logConfig: const ConfigLogger.showAll(),
);
print(await tmdbWithLogs.v3.movies.getPopular());
//api with showing all console logs
final tmdbWithCustomLogs = TMDB(
ApiKeys('Your API KEY', 'apiReadAccessTokenv4'),
logConfig: const ConfigLogger(
//must be true than only all other logs will be shown
showLogs: true,
showErrorLogs: true,
),
);
print(await tmdbWithCustomLogs.v3.movies.getPopular());
}