MagicTheGathering / mtg-sdk-go

Magic: The Gathering SDK - Go
MIT License
25 stars 17 forks source link

fixed some unmarshal errors, probably due to some changes of the API #4

Closed iuculanop closed 5 years ago

iuculanop commented 5 years ago

It seems that the API changed the type of three fields of a card entity: cmc is produced as a float number(4.0) instead of a uint32 loyalty is produced as a string("4") instead of a uint32 variations is produced as an array of string instead of a uint32

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 90f4ab019d865224299a991650c48bdd89ba52f9 on iuculanop:unmarshal_fix into a26d8bb30b1fd67c4760b868640187c1e1fbe249 on MagicTheGathering:master.

boombuler commented 5 years ago

Do you think its ready to merge? I currently have no time to test this.

iuculanop commented 5 years ago

Do you think its ready to merge? I currently have no time to test this.

The travis tests went fine, i'm also using it in my local enviroment and it works perfectly. The only one thing is that i modified one of the urls present in the query_test.go because now the query params are sorted alphabetically(this is my supposition), so the older url https://api.magicthegathering.io/v1/cards?colors=red&orderBy=cmc&rarity=rare&page=2 was changed to https://api.magicthegathering.io/v1/cards?colors=red&orderBy=cmc&page=2&rarity=rare