popcorn_api 1.1.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 32

PopcornApi #

An easy way to get data from the Popcorn Time API. Documentation is available at https://popcorn-api.js.org/

Usage #

Popcorn-API comes with 4 routes you can use: Anime, Shows, Movies Random To acess a route, you can use: Popcorn.route

Examples #

import "package:popcorn_api/src/Popcorn.dart";
Popcorn.random("movie").then((c)async{
 print(c.first.item);
});
  
// get animes with keyword ga, and get a random result
Popcorn.animes.search({
  "keywords":"ga"
}).then((c)async{
  print(c.random.item);
});

//Params to search() function
Popcorn.shows.search({
  "keywords":"keywords",
  "page":1,
  "sort":"rating",
  "genre":"all"
});

You can found more examples in Here

example/Main.dart

import "package:popcorn_api/src/Popcorn.dart";
int main(){
  // get a random movie
  Popcorn.random("movie").then((c)async{
     print(c.first.item);
  });
  // get animes with keyword ga, and get a random result
  Popcorn.animes.search({
    "keywords":"ga"
  }).then((c)async{
    print(c.random.item);
  });
  // the same process work with movies
  Popcorn.movies.search({
    "keywords":"ga"
  }).then((c)async{
    print(c.random.item);
  });
  //Get result of shows, and get it array
  Popcorn.shows.search({
    "keywords":"league"
  }).then((c)async{
    print(c.array);
  });
  //Params to search() function
  Popcorn.shows.search({
    "keywords":"keywords",
    "page":1,
    "sort":"rating",
    "genre":"all"
  });
  return 0;
}

Use this package as a library

1. Depend on it

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


dependencies:
  popcorn_api: ^1.1.5

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.

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
93
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
22
Overall:
Weighted score of the above. [more]
32
Learn more about scoring.

We analyzed this package on Jul 7, 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:popcorn_api/src/Popcorn.dartpackage:popcorn_api/src/structures/Routers.dartpackage:popcorn_api/src/utils/request.dartdart:io

Package not compatible with runtime web

Because of the import of dart:io via the import chain package:popcorn_api/src/Popcorn.dartpackage:popcorn_api/src/structures/Routers.dartpackage:popcorn_api/src/utils/request.dartdart:io

Health suggestions

Fix lib/src/Popcorn.dart. (-1.99 points)

Analysis of lib/src/Popcorn.dart reported 4 hints:

line 5 col 11: Unnecessary new keyword.

line 8 col 11: Unnecessary new keyword.

line 11 col 11: Unnecessary new keyword.

line 14 col 11: Unnecessary new keyword.

Fix lib/src/structures/Default.dart. (-1.99 points)

Analysis of lib/src/structures/Default.dart reported 4 hints:

line 3 col 15: Unnecessary new keyword.

line 4 col 17: Unnecessary new keyword.

line 8 col 40: Unnecessary new keyword.

line 10 col 16: Unnecessary new keyword.

Fix lib/src/structures/Routers.dart. (-1.49 points)

Analysis of lib/src/structures/Routers.dart reported 3 hints:

line 4 col 15: Unnecessary new keyword.

line 12 col 15: Unnecessary new keyword.

line 16 col 13: Unnecessary new keyword.

Fix lib/src/utils/request.dart. (-1.49 points)

Analysis of lib/src/utils/request.dart reported 3 hints:

line 5 col 12: Unnecessary new keyword.

line 40 col 12: Unnecessary new keyword.

line 46 col 12: Unnecessary new keyword.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: Documenting popcorn_api... Initialized dartdoc with 37 libraries in 34.6 seconds Validating docs... no issues found Documented 0 public libraries in 6.5 seconds stderr: Unhandled exception: dartdoc could not find any libraries to document #0 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:218:9)

Package is getting outdated. (-67.95 points)

The package was last published 87 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.63.0 <3.0.0
http ^0.12.0 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13
http_parser 3.1.4
meta 1.2.1
path 1.7.0
pedantic 1.9.1
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0