Giter VIP home page Giter VIP logo

Comments (9)

taycaldwell avatar taycaldwell commented on September 16, 2024

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.

Linnun avatar Linnun commented on September 16, 2024

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.

taycaldwell avatar taycaldwell commented on September 16, 2024

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.

Linnun avatar Linnun commented on September 16, 2024

Was the ChampionMastery endpoint even part of 3.9?

from riot-api-java.

taycaldwell avatar taycaldwell commented on September 16, 2024

It was the main update for that version.

https://github.com/rithms/riot-api-java/releases

from riot-api-java.

Linnun avatar Linnun commented on September 16, 2024

Anyways, I guess this request is obsolete then.

from riot-api-java.

briceambrosiak avatar briceambrosiak commented on September 16, 2024

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.

image

(BTW, why you closed the two Maven Central issues? I still can't find your library in it).

from riot-api-java.

Linnun avatar Linnun commented on September 16, 2024

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.

taycaldwell avatar taycaldwell commented on September 16, 2024

Reopened Maven issues for now.

from riot-api-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.