popcorn_api 1.1.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

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]
20
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
98
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Nov 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No libraries.

Health suggestions

Format lib/src/Popcorn.dart.

Run dartfmt to format lib/src/Popcorn.dart.

Format lib/src/structures/Default.dart.

Run dartfmt to format lib/src/structures/Default.dart.

Format lib/src/structures/Routers.dart.

Run dartfmt to format lib/src/structures/Routers.dart.

Format lib/src/utils/request.dart.

Run dartfmt to format lib/src/utils/request.dart.

Maintenance suggestions

Package is getting outdated. (-1.64 points)

The package was last published 53 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.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6