pubgapi 0.1.5

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

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);

print(match.telemetry.logPlayerKills.length);

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

example/pubgapi_example.dart

import 'package:pubgapi/pubgapi.dart';

main() {
  var api = PUBGAPI(API_KEY: "ASDASDAD");
  
    api.getPlayerByName("PanicIsReal")
    .then((player) {
      print(player.data[0].attributes.name);
    })
    .catchError((e) => print(e));
}

Use this package as a library

1. Depend on it

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


dependencies:
  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';
  
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...

Popularity:
Describes how popular the package is relative to other packages. [more]
12
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
42
Overall:
Weighted score of the above. [more]
15
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

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.2.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

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Support the latest stable Dart SDK in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow the latest stable Dart SDK release.

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

Dependencies were not resolved.

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.

Dependencies

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