RoyaleAPI / cr-api

Clash Royale Analytics, Profiles and Insights. We no longer publish a public API. Please use the official API from Supercell.
https://RoyaleAPI.com
166 stars 20 forks source link

RequiredForUpgrade has two data types #442

Closed akassharjun closed 5 years ago

akassharjun commented 5 years ago

Issue Report:

  1. Did you encounter this recently, or has this bug always been there? Recently
  2. Expected behaviour: Not sure on what I should put here
  3. Console logs (if applicable): com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "Maxed"
  4. Screenshots (if applicable):

Use the player tag of a player who has at least one max level card.

The attribute requiredForUpgrade inside the card object of a "Max Level" card will say "Maxed" while the rest of the cards will have an integer amount.

The attribute cannot be both integer & string.

Request Details:

GET
https://api.royaleapi.com/player/82RJJG902

Response Details:

I only get a throwable, which says `"com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "Maxed""`
selfish commented 5 years ago

Read the docs. :) This value is either a numeric amount, or a string "Maxed".