hots_dog_api 1.2.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 36

hots.dog API #

The hots.dog API provides Heroes of Storm statistical information. This package provides a Dart library for using those APIs.

Changelog #

1.2.3 #

  • Fix issues with Dart 2 type casting

1.2.2 #

  • Place an upper bound on Dart version support

1.2.1 #

  • Fixed an issue with type inference

1.2.0: #

  • Dart 2 support

example/example.dart

import 'package:hots_dog_api/hots_dog_api.dart';

main() async {
  try {
    BuildWinRates buildWinRates = await getBuildWinRates('2.30.0', 'Rehgar');
    print(buildWinRates);

  } catch (e) {
    print(e);
  }

  try {
    WinRates winRates = await getWinRates('2.30.0');
    print(winRates);

  } catch (e) {
    print(e);
  }

  try {
    GameInfo gameInfo = await getGameInfo();
    print(gameInfo);
  } catch (e) {
    print(e);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  hots_dog_api: ^1.2.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

We analyzed this package on Feb 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/model/build_win_rates.dart. (-5.84 points)

Analysis of lib/src/model/build_win_rates.dart reported 12 hints, including:

line 18 col 13: Unnecessary new keyword.

line 22 col 35: Unnecessary new keyword.

line 23 col 36: Unnecessary new keyword.

line 29 col 23: Unnecessary new keyword.

line 38 col 24: Unnecessary new keyword.

Fix lib/src/api.dart. (-4.89 points)

Analysis of lib/src/api.dart reported 10 hints, including:

line 19 col 34: Unnecessary new keyword.

line 22 col 19: Unnecessary new keyword.

line 37 col 11: Unnecessary new keyword.

line 45 col 13: Unnecessary new keyword.

line 52 col 10: Unnecessary new keyword.

Fix lib/src/model/win_rates.dart. (-3.45 points)

Analysis of lib/src/model/win_rates.dart reported 7 hints, including:

line 12 col 21: Unnecessary new keyword.

line 13 col 22: Unnecessary new keyword.

line 19 col 32: Unnecessary new keyword.

line 27 col 33: Unnecessary new keyword.

line 31 col 15: Unnecessary new keyword.

Fix additional 8 files with analysis or formatting issues. (-10.94 points)

Additional issues in the following files:

  • lib/src/model/game_info.dart (5 hints)
  • lib/src/model/win_loss_count.dart (4 hints)
  • lib/src/model/hero_info.dart (3 hints)
  • lib/src/model/talent.dart (3 hints)
  • lib/src/model/talent_win_rate.dart (3 hints)
  • lib/src/model/build_info.dart (2 hints)
  • lib/src/model/build_statistics.dart (2 hints)
  • lib/src/utils.dart (Run dartfmt to format lib/src/utils.dart.)

Maintenance suggestions

Package is getting outdated. (-21.92 points)

The package was last published 63 weeks ago.

The package description is too short. (-15 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 >=2.0.0 <3.0.0
collection ^1.14.11 1.14.12
http ^0.12.0 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.3
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6