PokemonTCG / pokemon-tcg-sdk-php

Pokémon TCG SDK - PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path to v2.0

bkintanar opened this issue · comments

We'll try do detail specific things to that needed to be done here for the package to support v2.0 of the API.

We can talk about what new technology that we can use and how to improve the current sdk. Talking about using a framework or a library to hasten the development is welcome as well.

Overview

In order to support v2, the following changes must be supported. See the official documentation for more details. I propose the architecture remains the same while v2 is implemented.

General

  • Update PHP requirement to supported versions - 7.4 & 8.0
  • Add support for X-Api-Key header
  • Response data now lives inside a data field instead of cards , sets, subtypes, etc

Pagination

  • Support page and pageSize for requests
  • Support page, pageSize, count and totalCount in responses

Cards

  • Replace subtype with subtypes array
  • Replace ability with abilities array
  • Replace nationalPokedexNumber with nationalPokedexNumbers array
  • Replace imageUrl and imageHiRes with images object
  • Replace text with rules
  • Add legalities object
  • Add tcgplayer object
  • Add set object
  • Add flavorText string
  • Add evolvesTo array

Sets

  • Replace standardLegal and expandedLegal with legalities object
  • Replace totalCards with printedTotal
  • Replace symbolUrl and logoUrl with logos object
  • Add total number