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

#24 - PKMItemHolderPokemonVersionDetail class Change DTO data type #25

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

QuaRang1225
Copy link

@QuaRang1225 QuaRang1225 commented Dec 1, 2023

Of the data in the class PKMitemHolderPokemonVersionDetail, the "rarity" data actually gives a value of Int form, but the "jsonParsingError" error appears when trying to decode it as string within the package.
I want to contribute after solving this problem Thank you.

held_Items

"version_details": [
      {
          "rarity": 5,    //this data
          "version": {
              "name": "ruby",
              "url": "https://pokeapi.co/api/v2/version/7/"
          }
      }
]
open class PKMItemHolderPokemonVersionDetail: Codable {
    
    open var rarity: String?    //data is not correct
    
    open var version: PKMNamedAPIResource<PKMVersion>?
}

- DTO 구조를 변경하여 PKMVersion 클래스 추가
- name -> pokedex
- 제대로 sprite 필드의 데이터를 받지 않는 듯함
- 필요한 부분 형식에 맞춰 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant