Skip to content

Some sets not found in V1 api #76

@TimGeel1998

Description

@TimGeel1998

Describe the bug
Crown-zenith sets not found:

When i use "CRZ" as a set name it responds with the following error:
pkm/parser.go:116 Invalid set code: CRZ

I think this happens because the V1 version of the api is used.
When i curl the V1 api and grep for "CRZ" i get 0 hits:
but when i use the V2 api:

curl "https://api.pokemontcg.io/v2/sets" | jq | grep -i crz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 51378 0 51378 0 0 40891 0 --:--:-- 0:00:01 --:--:-- 40906
"ptcgoCode": "CRZ",
"ptcgoCode": "CRZ",

Then i can see the sets.

I did a little bit of digging and i came across the following:

in "plugins/pkm/api.go" you import:
pokemontcgsdk "github.com/PokemonTCG/pokemon-tcg-sdk-go/src"

they do have a V2 version:
https://github.com/PokemonTCG/pokemon-tcg-sdk-go-v2

I tried to change it and build the gui version but it didn't work and i have never used go so i don't know how to fix it :)

To Reproduce
Steps to reproduce the behavior:

  1. start the gui with the -debug flag
  2. klick on the Pokemon tab
  3. in the text field input "1 Oddish CRZ 1"
  4. fill in a deck name
  5. klick generate
  6. look in terminal for error output

Expected behavior
I expected a deck file, Just like when you use other set names.

Screenshots
N/A

Desktop (please complete the following information):

  • Program: [GUI] "Tried both but mainly use the gui"
  • OS: [Linux: Ubuntu 22.04 LTS]
  • Version: [0.8]

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions