tmdb_api 1.2.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

Dart pub analyser Run Tests CI pub package

tmdb_api #

A Dart client-side API package for TMDB API. To know more about TMDB visit TMDB

Avaliable features #

v3( 🎊✨ Completed 🎉🎉) #

Supports all the functions of version 3 of tmdb API
- [X] Auth
- [X] Account
- [X] Guest Sessions
- [x] Movies
- [x] Tv shows
- [x] Tv Seasons
- [x] Tv Episodes 
- [X] People
- [X] Credits
- [X] Certification
- [X] Changes
- [X] Collections
- [X] Find
- [X] Genres
- [X] Keywords
- [X] Companies
- [X] Trending
- [X] Search
- [X] Discover
- [X] Networks
- [X] Reviews
- [X] Versions
- [X] Lists

v4(🎊✨ Completed 🎉🎉) #

- [X] Image URL Constructor
- [X] auth
- [X] account
- [X] lists

v5(is currently in beta) #

More will be added soon


Version 1.1.0 #

Getting Started #

🎉Now This package supports both v3 and v4 of TMDB API

changes #

previous version was causing unwanted console logs so i removed it. but you can still access those logs using logConfig parameter in TMDB class.


1) Import package #

//import package
import 'package:tmdb_api/tmdb_api.dart';

2) Create a instance of ApiKeys and TMDB class #

//create a instance of ApiKeys with V3 and V4 keys
ApiKeys keys = ApiKeys('Your API KEY V3', 'API READ ACCESS TOKEN V4');

//create a instance of TMDB with keys instance
TMDB tmdb = TMDB(keys,
                //shows api logs in console can be used for debug
                logConfig: ConfigLogger.showAll());

You can get your API key from themoviedb.org API

3) Thats all it takes now you can access all the features avaliable using tmdb instance. #

Example #

For getting Trending movies

Map result = await tmdb.v3.trending.getTrending(mediaType = MediaType.all,timeWindow = TimeWindow.day);

For more documentation #

visit TMDB

1.2.3 #

  • Fixed append to response bug. #16

1.2.2 #

bug fix

1.2.1 #

  • Bug fix by @Arley011 with PR #13

1.2.0 #

There are some breaking changes

  • All the exceptions now implements TMDBException
  • Throw TMDBSocketException if internet connection is not avaliable.

1.1.0 #

previous version was causing unwanted console logs so i removed it.

but you can still access those logs using logConfig parameter in TMDB class.

1.0.0-stable #

Out of beta

1.0.0-beta.1 #

Updated ReadMe

1.0.0-beta #

Almost all the features are added
(*if any features are missing you can create a issue*)

**There are some breaking changes to be noted**

 ## Avaliabe features

   v3( 🎊✨ Completed 🎉🎉)
    - [X] Auth
    - [X] Account
    - [X] Guest Sessions
    - [x] Movies
    - [x] Tv shows
    - [x] Tv Seasons
    - [x] Tv Episodes 
    - [X] People
    - [X] Credits
    - [X] Certification
    - [X] Changes
    - [X] Collections
    - [X] Find
    - [X] Genres
    - [X] Keywords
    - [X] Companies
    - [X] Trending
    - [X] Search
    - [X] Discover
    - [X] Networks
    - [X] Reviews
    - [X] Versions
    - [X] Lists

   v4(🎊✨ Completed 🎉🎉)
    - [X] Image URL Constructor
    - [X] auth
    - [X] account
    - [X] lists

0.3.1-alpha #

support for v3 API

added - [X] Discover - [X] Networks - [X] Reviews - [X] Versions

 Refer [README.md](https://github.com/Arunnaidu3470/tmdb_api/blob/master/README.md) for more info

Avaliable features (0.2.1-alpha) #

  • [x] Trending
  • Updated README.md

Avaliable features (0.2.0-alpha) #

  • [x] Movies
  • [x] Tv shows
  • [x] Tv Seasons
  • [x] Tv Episodes
  • [X] People
  • [X] Credits
  • [X] Certification
  • [X] Changes
  • [X] Collections
  • [X] Find
  • [X] Genres
  • [X] Keywords
  • [X] Companies

example/tmdb_api.dart

import 'package:tmdb_api/tmdb_api.dart';

main(List<String> args) async {
  //api with out console logs
  TMDB tmdb = TMDB(ApiKeys('Your API KEY', 'apiReadAccessTokenv4'));
  print(await tmdb.v3.movies.getPouplar());

  //api with showing all console logs
  TMDB tmdbWithLogs = TMDB(
    ApiKeys('Your API KEY', 'apiReadAccessTokenv4'),
    logConfig: ConfigLogger.showAll(),
  );
  print(await tmdbWithLogs.v3.movies.getPouplar());

  //api with showing all console logs
  TMDB tmdbWithCustomLogs = TMDB(
    ApiKeys('Your API KEY', 'apiReadAccessTokenv4'),
    logConfig: ConfigLogger(
      //must be true than only all other logs will be shown
      showLogs: true,
      showErrorLogs: true,
    ),
  );
  print(await tmdbWithCustomLogs.v3.movies.getPouplar());
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tmdb_api: ^1.2.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tmdb_api/tmdb_api.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
58
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because of the import of dart:io via the import chain package:tmdb_api/tmdb_api.dart → dart:io

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:tmdb_api/tmdb_api.dart → dart:io

Health suggestions

Fix lib/versions/v4.dart. (-1 points)

Analysis of lib/versions/v4.dart reported 2 hints:

line 70 col 11: DO use curly braces for all flow control structures.

line 72 col 11: DO use curly braces for all flow control structures.

Fix lib/versions/v3/category/lists.dart. (-0.50 points)

Analysis of lib/versions/v3/category/lists.dart reported 1 hint:

line 192 col 9: DO use curly braces for all flow control structures.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
colorize ^2.0.0 2.0.0
http ^0.12.0+4 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13
http_parser 3.1.4
meta 1.1.8
path 1.7.0
pedantic 1.9.0 1.9.1
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0
Dev dependencies
test ^1.14.2