pubgapi 0.1.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 0

pubgapi #

A PUBGAPI Framework

Usage #

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.

0.0.1 #

  • 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

Alternatively, your editor might support pub 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';
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 Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.7.0.
 Because pubgapi requires SDK version >=1.20.1 <=2.0.0, version solving failed.

Health suggestions

Format lib/pubgapi.dart.

Run dartfmt to format lib/pubgapi.dart.

Format lib/src/models/match.dart.

Run dartfmt to format lib/src/models/match.dart.

Format lib/src/models/player.dart.

Run dartfmt to format lib/src/models/player.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • 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.)
  • lib/src/pubgapi_base.dart (Run dartfmt to format lib/src/pubgapi_base.dart.)

Maintenance issues and suggestions

Support future stable Dart 2 SDKs in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow future stable Dart 2.x SDK releases.

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

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

Dependencies were not resolved.

Package is getting outdated. (-69.59 points)

The package was last published 88 weeks ago.

The package description is too short. (-8 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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <=2.0.0