Comments (9)
These types mirror the types defined in the official Riot Games API documentation.
A lot of the underlying services that power the API are owned by different teams across Riot. In the past that has been their explanation for little type and naming inconsistencies across endpoints like this.
IIRC, in the past we addressed this to make the library more consistent, but I guess we overlooked these specific endpoints. (or maybe a thread was made to ask Riot why this inconsistency exists, but we never really did anything about it on our end? idr.)
Either way, its a simple change. The GSON conversion should still work if we change the champion ID type to int instead of long in the necessary DTOs.
from riot-api-java.
Are you sure you are using the latest version of this API? ChampionMastery.getChampionId()
returns an integer value since 7 months now (February 2016) (reference: a9f76b1)
from riot-api-java.
Ah, I knew we changed that.
The latest available release is still 3.9.0 on GitHub (unless developers export their own JAR from the source), which was released before these changes were made.
Hm... It's been a while, maybe we should release 4.0 LOL.
from riot-api-java.
Was the ChampionMastery endpoint even part of 3.9?
from riot-api-java.
It was the main update for that version.
https://github.com/rithms/riot-api-java/releases
from riot-api-java.
Anyways, I guess this request is obsolete then.
from riot-api-java.
Guys, the inconsistency is on method :
Class RiotAp
=> public net.rithms.riot.dto.Static.Champion getDataChampion(Region region, int id, String locale, String version, ChampData... champData) throws RiotApiException
It takes an int
for the champion id, whereas it should be a long like ChampionMastery.getChampionId()
is returning. I am in v3.9.0.
(BTW, why you closed the two Maven Central issues? I still can't find your library in it).
from riot-api-java.
ChampionMastery.getChampionId() returns an int.
getDataChampion() returns net.rithms.riot.dto.Static.Champion, and Champion.getId() also returns an int.
All Champion IDs currently have up to 3 digits, and even if Riot one day has champion IDs with 4 or even 5 digits, int will be more than enough to cover those IDs.
Please note that 3.9.0 still contains this inconsistency, but the current up-to-date branch doesn't. If you don't use the latest developer branch, please wait for the next release version to get this fix.
(About the Maven thing, I can't comment on that. Maven is rithms' thing)
from riot-api-java.
Reopened Maven issues for now.
from riot-api-java.
Related Issues (20)
- How to separate TeamStats for each team?
- Gradle build not updated to V4?
- getLeagueById throws RiotApiException HOT 1
- GetGameDuration in Android Studio HOT 3
- get Summoner ID in champ select HOT 1
- Asking about the api HOT 3
- Endpoints for V4 not updated HOT 2
- Support for ACS
- getDataChampion returning 403 HOT 2
- Summoner is in game
- How do I import this in a Scala IntelliJ Project
- get runes pages by summoner
- NumberFormatException when trying to call getMatch() HOT 1
- 403: Forbidden HOT 2
- TeamFightTactics
- Add Tournament Stub
- 403 Forbidden HOT 2
- getDataChampion returns 403 Forbidden
- Cant get the name of a champion
- TFT API Data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riot-api-java.