popcorn_api 1.1.5

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new54

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 packages get

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

Version Uploaded Documentation Archive
1.1.5 Nov 1, 2018 Go to the documentation of popcorn_api 1.1.5 Download popcorn_api 1.1.5 archive
1.1.3 Nov 1, 2018 Go to the documentation of popcorn_api 1.1.3 Download popcorn_api 1.1.3 archive
1.1.2 Nov 1, 2018 Go to the documentation of popcorn_api 1.1.2 Download popcorn_api 1.1.2 archive
1.1.1 Nov 1, 2018 Go to the documentation of popcorn_api 1.1.1 Download popcorn_api 1.1.1 archive
1.1.0 Nov 1, 2018 Go to the documentation of popcorn_api 1.1.0 Download popcorn_api 1.1.0 archive
1.0.0 Nov 1, 2018 Go to the documentation of popcorn_api 1.0.0 Download popcorn_api 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
9
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
54
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.6

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.

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
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.6
path 1.6.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6