Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a search parameter on getCards() #8

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update lib/src/pokemon_tcg.dart
Co-authored-by: Bart Ribbers <bribbers@disroot.org>
  • Loading branch information
JayHors and PureTryOut authored May 23, 2023
commit b12759b89c8c5a7ed00cf0c67431f225c2d85d4b
2 changes: 1 addition & 1 deletion lib/src/pokemon_tcg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class PokemonTcgApi {

JsonMap json = jsonDecode(response.body);
if (json.containsKey("error")) {
throw RemoteError('Invalid search parameter', json['error']);
throw RemoteError('Invalid search parameter', json['error']['message']);
}
final cards = <PokemonCard>[];
List<dynamic> cardsJson = json['data'];
Expand Down