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 ofcards
,sets
,subtypes
, etc
Pagination
- Support
page
andpageSize
for requests - Support
page
,pageSize
,count
andtotalCount
in responses
Cards
- Replace
subtype
withsubtypes
array - Replace
ability
withabilities
array - Replace
nationalPokedexNumber
withnationalPokedexNumbers
array - Replace
imageUrl
andimageHiRes
withimages
object - Replace
text
withrules
- Add
legalities
object - Add
tcgplayer
object - Add
set
object - Add
flavorText
string - Add
evolvesTo
array
Sets
- Replace
standardLegal
andexpandedLegal
withlegalities
object - Replace
totalCards
withprintedTotal
- Replace
symbolUrl
andlogoUrl
withlogos
object - Add
total
number