Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
prepare 0.1.1+1
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Roux committed Aug 24, 2020
1 parent b58d3e1 commit 2ffd1e9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.1+1

* Made more class public

# 0.1.1

* Updated `temtem_api_location.dart`
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.1"
version: "0.1.1+1"
term_glyph:
dependency: transitive
description:
Expand Down
24 changes: 12 additions & 12 deletions lib/src/model/temtem_api_location.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class _Location {
class Location {
final String name;
final String wikiUrl;
final String type;

_Location({this.name, this.wikiUrl, this.type});
Location({this.name, this.wikiUrl, this.type});

factory _Location.fromJson(Map<String, dynamic> json) => _Location(
factory Location.fromJson(Map<String, dynamic> json) => Location(
name: json['name'],
wikiUrl: json['wikiUrl'],
type: json['type'],
Expand All @@ -20,9 +20,9 @@ class TemTemApiLocation {
final String type;
final String imageWikiThumbnail;
final String imageWikiFile;
final List<_Location> routes;
final List<_Location> townsAndVillages;
final List<_Location> landmarks;
final List<Location> routes;
final List<Location> townsAndVillages;
final List<Location> landmarks;
final List<String> temtem;
final List<String> trivia;

Expand Down Expand Up @@ -50,17 +50,17 @@ class TemTemApiLocation {
type: json['type'],
imageWikiThumbnail: json['imageWikiThumbnail'],
imageWikiFile: json['imageWikiFile'],
routes: List<_Location>.generate(
routes: List<Location>.generate(
json['routes'] == null ? 0 : json['routes'].length,
(index) => _Location.fromJson(json['routes'][index])),
townsAndVillages: List<_Location>.generate(
(index) => Location.fromJson(json['routes'][index])),
townsAndVillages: List<Location>.generate(
json['townsAndVillages'] == null
? 0
: json['townsAndVillages'].length,
(index) => _Location.fromJson(json['townsAndVillages'][index])),
landmarks: List<_Location>.generate(
(index) => Location.fromJson(json['townsAndVillages'][index])),
landmarks: List<Location>.generate(
json['landmarks'] == null ? 0 : json['landmarks'].length,
(index) => _Location.fromJson(json['landmarks'][index])),
(index) => Location.fromJson(json['landmarks'][index])),
temtem: List<String>.from(json['temtem']),
trivia: List<String>.from(json['trivia']),
);
Expand Down
18 changes: 9 additions & 9 deletions lib/src/model/temtem_api_saipark.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class _Place {
class Place {
final String temtem;
final int lumaRate;
final int minSvs;
final int eggMoves;

_Place({this.temtem, this.lumaRate, this.minSvs, this.eggMoves});
Place({this.temtem, this.lumaRate, this.minSvs, this.eggMoves});

factory _Place.fromJson(Map<String, dynamic> json) => _Place(
factory Place.fromJson(Map<String, dynamic> json) => Place(
temtem: json['temtem'],
lumaRate: json['lumaRate'],
minSvs: json['minSvs'],
Expand All @@ -18,8 +18,8 @@ class TemTemApiSaipark {
final String dateRange;
final String startDate;
final String endDate;
final List<_Place> land;
final List<_Place> water;
final List<Place> land;
final List<Place> water;

TemTemApiSaipark({
this.dateRange,
Expand All @@ -34,11 +34,11 @@ class TemTemApiSaipark {
dateRange: json['dateRange'],
startDate: json['startDate'],
endDate: json['endDate'],
land: List<_Place>.generate(
land: List<Place>.generate(
json['land'] == null ? 0 : json['land'].length,
(index) => _Place.fromJson(json['land'][index])),
water: List<_Place>.generate(
(index) => Place.fromJson(json['land'][index])),
water: List<Place>.generate(
json['water'] == null ? 0 : json['water'].length,
(index) => _Place.fromJson(json['water'][index])),
(index) => Place.fromJson(json['water'][index])),
);
}
10 changes: 5 additions & 5 deletions lib/src/model/temtem_api_technique.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class _SynergyEffect {
class SynergyEffect {
final String effect;
final String type;
final int damage;

_SynergyEffect({this.effect, this.type, this.damage});
SynergyEffect({this.effect, this.type, this.damage});

factory _SynergyEffect.fromJson(Map<String, dynamic> json) => _SynergyEffect(
factory SynergyEffect.fromJson(Map<String, dynamic> json) => SynergyEffect(
effect: json['effect'],
type: json['type'],
damage: json['damage'],
Expand All @@ -24,7 +24,7 @@ class TemTemApiTechnique {
final String priority;
final String priorityIcon;
final String synergy;
final List<_SynergyEffect> synergyEffects;
final List<SynergyEffect> synergyEffects;
final String targets;
final String description;

Expand Down Expand Up @@ -59,7 +59,7 @@ class TemTemApiTechnique {
priorityIcon: json['priorityIcon'],
synergy: json['synergy'],
synergyEffects: (json['synergyEffects'] as List)
.map<_SynergyEffect>((item) => _SynergyEffect.fromJson(item))
.map<SynergyEffect>((item) => SynergyEffect.fromJson(item))
.toList(),
targets: json['targets'].toString(),
description: json['description'].toString().replaceAll('\n', ''),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: temtem_api_wrapper
description: Wrapper for all the methods of the unofficial Temtem REST API.
version: 0.1.1
version: 0.1.1+1
homepage: https://github.com/TesteurManiak
repository: https://github.com/TesteurManiak/temtem_api_wrapper/

Expand Down

0 comments on commit 2ffd1e9

Please sign in to comment.