pokeapi 1.0.1

pokeapi-dart #

Wrapper for Poke API, written in Dart. Supports PokeAPI v2.

Documentation #

Full API documentation can be found at Poke API.

Getting Started #

To use this plugin, add pokeapi as a dependency in your pubspec.yaml file.

import 'package:pokeapi/pokeapi.dart';

Endpoints #

Berries #

Berries

Get Berries #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Berry>(1, 1);

Get Berry #

Must pass an ID as Int as Int (e.g. 1).

  var response = PokeAPI.getObject<Berry>(1);
Berry Firmness

Get Berry Firmnesses #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<BerryFirmness>(1, 1);

Get Berry Firmness #

Must pass an ID as Int as Int (e.g. 1).

  var response = PokeAPI.getObject<BerryFirmness>(1);
Berry Flavors

Get Berry Flavors #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<BerryFlavor>(1, 1);

Get Berry Flavor #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<BerryFlavor>(1);

Contests #

Contest Types

Get Contest Types #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<ContestType>(1, 1);

Get Contest Type #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<ContestType>(1);
Contest Effects

Get Contest Effects #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<ContestEffect>(1, 1);

Get Contest Effect #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<ContestEffect>(1);
Super Contest Effects

Get Super Contest Effects #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<SuperContestEffect>(1, 1);

Get Super Contest Effect #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<SuperContestEffect>(1);

Encounters #

Encounter Methods

Get Encounter Methods #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<EncounterMethod>(1, 1);

Get Encounter Method #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<EncounterMethod>(1);
Encounter Conditions

Get Encounter Conditions #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<EncounterCondition>(1, 1);

Get Encounter Condition #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<EncounterCondition>(1);
Encounter Condition Values

Get Encounter Condition Values #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<EncounterConditionValue>(1, 1);

Get Encounter Condition Value #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<EncounterConditionValue>(1);

Evolution #

Evolution Chains

Get Evolution Chains #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<EvolutionChain>(1, 1);

Get Evolution Chain #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<EvolutionChain>(1);
Evolution Triggers

Get Evolution Triggers #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<EvolutionTrigger>(1, 1);

Get Evolution Trigger #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<EvolutionTrigger>(1);

Games #

Generations

Get Generations #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Generation>(1, 1);

Get Generation #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Generation>(1);
Pokedex

Get All Pokedex #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Pokedex>(1, 1);

Get Single Pokedex #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Pokedex>(1);
Versions

Get Versions #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Version>(1, 1);

Get Version #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Version>(1);
Version Groups

Get Version Groups #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<VersionGroup>(1, 1);

Get Version Group #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<VersionGroup>(1);

Items #

Items

Get Items #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Item>(1, 1);

Get Item #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Item>(1);
Item Attributes

Get Item Attributes #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<ItemAttribute>(1, 1);

Get Item Attribute #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<ItemAttribute>(1);
Item Categories

Get Item Categories #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<ItemCategory>(1, 1);

Get Item Category #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<ItemCategory>(1);
Item Fling Effects

Get Item Fling Effects #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<ItemFlingEffect>(1, 1);

Get Item Fling Effect #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<ItemFlingEffect>(1);
Item Pockets

Get Item Pockets #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<ItemPocket>(1, 1);

Get Item Pocket #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<ItemPocket>(1);

Locations #

Locations

Get Locations #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Location>(1, 1);

Get Location #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Location>(1);
Location Areas

Get Location Areas #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<LocationArea>(1, 1);

Get Location Area #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<LocationArea>(1);
Pal Park Areas

Get Pal Park Areas #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PalParkArea>(1, 1);

Get Pal Park Area #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PalParkArea>(1);
Regions

Get Regions #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Region>(1, 1);

Get Region #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Region>(1);

Machines #

Machines

Get Machines #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Machine>(1, 1);

Get Machine #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Machine>(1);

Moves #

Moves

Get Moves #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Move>(1, 1);

Get Move #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Move>(1);
Move Ailments

Get Move Ailments #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<MoveAilment>(1, 1);

Get Move Ailment #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<MoveAilment>(1);
Move Battle Styles

Get Move Battle Styles #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<MoveBattleStyle>(1, 1);

Get Move Battle Style #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<MoveBattleStyle>(1);
Move Categories

Get Move Categories #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<MoveCategory>(1, 1);

Get Move Category #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<MoveCategory>(1);
Move Damage Classes

Get Move Damage Classes #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<MoveDamageClass>(1, 1);

Get Move Damage Class #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<MoveDamageClass>(1);
Move Learn Methods

Get Move Learn Methods #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<MoveLearnMethod>(1, 1);

Get Move Learn Method #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<MoveLearnMethod>(1);
Move Targets

Get Move Targets #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<MoveTarget>(1, 1);

Get Move Target #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<MoveTarget>(1);

Pokemon #

Abilities

Get Abilities #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Ability>(1, 1);

Get Ability #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Ability>(1);
Characteristics

Get Characteristics #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Characteristic>(1, 1);

Get Characteristic #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Characteristic>(1);
Egg Groups

Get Egg Groups #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<EggGroup>(1, 1);

Get Egg Group #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<EggGroup>(1);
Genders

Get Genders #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Gender>(1, 1);

Get Gender #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Gender>(1);
Growth Rates

Get Growth Rates #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<GrowthRate>(1, 1);

Get Growth Rate #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<GrowthRate>(1);
Natures

Get Natures #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Nature>(1, 1);

Get Nature #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Nature>(1);
Pokeathlon Stats

Get Pokeathlon Stats #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PokeAthlon>(1, 1);

Get Pokeathlon Stat #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PokeAthlon>(1);
Pokemon

Get All Pokemon #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Pokemon>(1, 1);

Get Single Pokemon #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Pokemon>(1);
Pokemon Colors

Get Pokemon Colors #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PokemonColor>(1, 1);

Get Pokemon Color #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PokemonColor>(1);
Pokemon Forms

Get Pokemon Forms #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PokemonForm>(1, 1);

Get Pokemon Form #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PokemonForm>(1);
Pokemon Habitats

Get Pokemon Habitats #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PokemonHabitat>(1, 1);

Get Pokemon Habitat #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PokemonHabitat>(1);
Pokemon Shapes

Get Pokemon Shapes #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PokemonShape>(1, 1);

Get Pokemon Shape #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PokemonShape>(1);
Pokemon Species

Get All Pokemon Species #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<PokemonSpecie>(1, 1);

Get Single Pokemon Species #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<PokemonSpecie>(1);
Stats

Get Stats #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Stat>(1, 1);

Get Stat #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Stat>(1);
Types

Get Types #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Type>(1, 1);

Get Type #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Type>(1);

Utility #

Languages

Get Languages #

Must pass an offset and limit as Int (e.g. 1, 1).

  var response = PokeAPI.getObjectList<Language>(1, 1);

Get Language #

Must pass an ID as Int (e.g. 1).

  var response = PokeAPI.getObject<Language>(1);

[1.0.1] - complete all endpoints.

Use this package as a library

1. Depend on it

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


dependencies:
  pokeapi: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:pokeapi/pokeapi.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

2024 out of 2024 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and pokeapi.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
flutter 0.0.0
http ^0.12.0+1 0.12.0+2
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test