battle_net 0.1.0 copy "battle_net: ^0.1.0" to clipboard
battle_net: ^0.1.0 copied to clipboard

Dart wrapper client for [Battle.Net API](https://develop.battle.net/documentation). You can easily communicate with BattleNet service inside your Flutter/Dart application.

example/battle_net.dart

import 'package:battle_net/battle_net.dart';

/// This example shows how to fetch [TokenResponse] data with additional information
Future<void> main() async {
  /// Provide client id and client secret
  final BattleNet battleNet = BattleNet('clientId', 'clientSecret');

  /// Fetch access token providing region of the data to retrieve.
  final ClientCredentialsResponse clientCredentialsResponse =
      await battleNet.postClientCredentials();

  /// Fetch Token index price for EU region Retail version
  final TokenIndexResponse tokenIndex = await battleNet.getTokenIndex(
      clientCredentialsResponse.accessToken,
      BattleNetRegion.eu,
      BattleNetNamespace.dynamic,
      BattleNetLocale.enGB);
  print(tokenIndex);
}
1
likes
0
points
32
downloads

Publisher

verified publishervmpay.eu

Weekly Downloads

Dart wrapper client for [Battle.Net API](https://develop.battle.net/documentation). You can easily communicate with BattleNet service inside your Flutter/Dart application.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, meta

More

Packages that depend on battle_net