pubgapi 0.1.5

  • Example
  • Installing
  • Versions
  • 46


A PUBGAPI Framework


A simple usage example:

import 'package:pubgapi/pubgapi.dart';

main() {
  var api = PUBGAPI($APIKEY);

  await api.getPlayerByName($name);
  await api.getSeasonInfo();
  await api.getSeasonByPlayerId();
  await api.getMatchById($matchID);

Player matches also support fetching the telemetry data for that match. So if you have a match object you can simply

var match = await api.getMatchById($matchID);
await match.loadTelemetryData(// Pass the PUBGAPI Instance);


If you're uncertain how to use the API, feel free to browse the unit tests. Also to run the tests just provide your own API key to the tests.

Features and bugs

Please file feature requests and bugs in the issues.


  • Initial version, created by Stagehand


import 'package:pubgapi/pubgapi.dart';

main() {
    .then((player) {
    .catchError((e) => print(e));

Use this package as a library

1. Depend on it

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

  pubgapi: ^0.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.

3. Import it

Now in your Dart code, you can use:

import 'package:pubgapi/pubgapi.dart';
Version Uploaded Documentation Archive
0.1.5 May 17, 2018 Go to the documentation of pubgapi 0.1.5 Download pubgapi 0.1.5 archive
0.1.4 May 15, 2018 Go to the documentation of pubgapi 0.1.4 Download pubgapi 0.1.4 archive
0.1.3 May 15, 2018 Go to the documentation of pubgapi 0.1.3 Download pubgapi 0.1.3 archive
0.1.2 May 15, 2018 Go to the documentation of pubgapi 0.1.2 Download pubgapi 0.1.2 archive
0.1.1 May 15, 2018 Go to the documentation of pubgapi 0.1.1 Download pubgapi 0.1.1 archive
0.1.0 May 15, 2018 Go to the documentation of pubgapi 0.1.0 Download pubgapi 0.1.0 archive
0.0.8 May 15, 2018 Go to the documentation of pubgapi 0.0.8 Download pubgapi 0.0.8 archive
0.0.7 May 15, 2018 Go to the documentation of pubgapi 0.0.7 Download pubgapi 0.0.7 archive
0.0.6 May 15, 2018 Go to the documentation of pubgapi 0.0.6 Download pubgapi 0.0.6 archive
0.0.5 May 15, 2018 Go to the documentation of pubgapi 0.0.5 Download pubgapi 0.0.5 archive

All 14 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
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


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:pubgapi/pubgapi.dart.

Health issues and suggestions

Fix lib/src/pubgapi_base.dart. (-44.03 points)

Analysis of lib/src/pubgapi_base.dart failed with 2 errors, 1 hint:

line 53 col 19: Undefined name 'JSON'.

line 75 col 19: Undefined name 'JSON'.

line 2 col 8: Unused import: 'dart:convert'.

Fix lib/src/models/match.dart. (-0.50 points)

Analysis of lib/src/models/match.dart reported 1 hint:

line 17 col 3: This function declares a return type of 'Future<bool>', but doesn't end with a return statement.

Format lib/pubgapi.dart.

Run dartfmt to format lib/pubgapi.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/models/player.dart (Run dartfmt to format lib/src/models/player.dart.)
  • lib/src/models/season.dart (Run dartfmt to format lib/src/models/season.dart.)
  • lib/src/models/telemetry.dart (Run dartfmt to format lib/src/models/telemetry.dart.)
  • lib/src/models/telemetry.g.dart (Run dartfmt to format lib/src/models/telemetry.g.dart.)

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <=2.0.0
http ^0.11.3+16 0.11.3+17 0.12.0
json_annotation ^0.2.3 0.2.9+1 2.0.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
Dev dependencies
build_runner ^0.8.8
json_serializable ^0.5.0
test ^0.12.0