Skip to content

Commit

Permalink
Release/0.1.2 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmpay authored Aug 31, 2023
2 parents 673dc45 + 67ec2d1 commit 5525b4a
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 109 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.1.2

* Test coverage increased
* Documentation examples extended
* README.md update
* Dependencies update

## 0.1.1

* Models unified
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ For general information about developing packages, see the Dart guide for
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
Dart wrapper client for [Battle.Net API](https://develop.battle.net/documentation)

![workflow](https://github.com/vmpay/battle_net_dart/actions/workflows/main.yml/badge.svg)
[![GitHub](https://img.shields.io/github/license/vmpay/battle_net_dart?color=salad&logo=github)](https://github.com/vmpay/battle_net_dart/blob/master/LICENSE)
[![Pub](https://img.shields.io/pub/v/battle_net.svg?logo=dart&logoColor=blue)](https://pub.dev/packages/battle_net)
[![package publisher](https://img.shields.io/pub/publisher/battle_net.svg?logo=dart&logoColor=blue)](https://pub.dev/packages/battle_net/publisher)
[![Pub Points](https://img.shields.io/pub/points/battle_net?logo=flutter&logoColor=lightblue)](https://pub.dev/packages/battle_net)


Dart wrapper client for [Battle.Net API](https://develop.battle.net/documentation)

You can easily communicate with BattleNet service inside your Flutter/Dart application.

## Available Features
Expand Down Expand Up @@ -87,7 +86,6 @@ final ConnectedRealmResponse connectedRealm = await battleNet.getConnectedRealm(
You can also fetch connected realm details by id using the example below:

```dart
const int connectedRealmId = 1301;
final ConnectedRealmSearchResponse result =
await battleNet.getConnectedRealmSearch(
accessToken: clientCredentialsResponse.accessToken,
Expand Down
5 changes: 2 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ linter:
- hash_and_equals
- implementation_imports
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
- iterable_contains_unrelated_type
- collection_methods_unrelated_type
# - join_return_with_assignment # not required by flutter style
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
# - lines_longer_than_80_chars # not required by flutter style
- list_remove_unrelated_type
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
# - missing_whitespace_between_adjacent_strings # not yet tested
- no_adjacent_strings_in_list
Expand Down Expand Up @@ -156,7 +155,7 @@ linter:
# - prefer_constructors_over_static_methods # far too many false positives
- prefer_contains
# - prefer_double_quotes # opposite of prefer_single_quotes
- prefer_equal_for_default_values
# - prefer_equal_for_default_values
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
- prefer_final_fields
- prefer_final_in_for_each
Expand Down
10 changes: 10 additions & 0 deletions example/battle_net.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ Future<void> main() async {
locale: BattleNetLocale.enGB);
print(tokenIndex);

/// Fetch Token index price for EU region Classic version
final TokenIndexResponse tokenIndexClassic = await battleNet
.postClientCredentials()
.then((ClientCredentialsResponse response) => battleNet.getTokenIndex(
accessToken: response.accessToken,
region: BattleNetRegion.eu,
namespace: BattleNetNamespace.dynamicClassic,
locale: BattleNetLocale.enGB));
print(tokenIndexClassic);

/// Fetch connected 'Outland' realm details
const int connectedRealmId = 1301;
final ConnectedRealmSearchData connectedRealm =
Expand Down
Loading

0 comments on commit 5525b4a

Please sign in to comment.