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
167 stars 20 forks source link

The attributes `requiredForUpgrade` and `leftToUpgrade` are wrong for Epics and Legendaries cards. #451

Closed GleipnirYmir closed 5 years ago

GleipnirYmir commented 5 years ago

Describe the bug When getting any player info by GET https://api.royaleapi.com/player/#TAG the requiredForUpgrade and leftToUpgrade are wrong for Epics and Legendaries cards.

To Reproduce For example with my profile (happens with any): GET https://api.royaleapi.com/player/G2JR0882

Check wathever Epic or Legendary card. Example (Legendary): Sparky

 {
    "name": "Sparky",
    "id": 26000033,
    "level": 3,
    "maxLevel": 5,
    "count": 7,
    "rarity": "Legendary",
    "requiredForUpgrade": -1,
    "leftToUpgrade": -8,
    "minLevel": 9,
    "icon": "https://api-assets.clashroyale.com/cards/300/2GKMkBrArZXgQxf2ygFjDs4VvGYPbx8F6Lj_68iVhIM.png",
    "key": "sparky",
    "elixir": 6,
    "type": "Troop",
    "arena": 11,
    "description": "Sparky slowly charges up, then unloads MASSIVE area damage. Overkill isn't in her vocabulary."
  }

Example (Epic): Goblin Barrel

{
    "name": "Goblin Barrel",
    "id": 28000004,
    "level": 7,
    "maxLevel": 8,
    "count": 143,
    "rarity": "Epic",
    "requiredForUpgrade": 4,
    "leftToUpgrade": -139,
    "minLevel": 6,
    "icon": "https://api-assets.clashroyale.com/cards/300/CoZdp5PpsTH858l212lAMeJxVJ0zxv9V-f5xC8Bvj5g.png",
    "key": "goblin-barrel",
    "elixir": 3,
    "type": "Spell",
    "arena": 1,
    "description": "Spawns three Goblins anywhere in the Arena. It's going to be a thrilling ride, boys!"
  }

Expected behavior For the examples provided, the expected values are: Sparky:

    "requiredForUpgrade": 10,
    "leftToUpgrade": 3,

Goblin Barrel:

    "requiredForUpgrade": 200,
    "leftToUpgrade": 57,

Screenshots Not applicable. It is an API problem. If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Not applicable. It is an API problem.

Smartphone (please complete the following information): Not applicable. It is an API problem.

Additional context Seems to be happenning from 18 December 2018.

GleipnirYmir commented 5 years ago

I would add that for Rares cards happens the same.