Comments (9)
getRankedStats should return information for a summoner in their placements.
Can you provide a code snippet?
Here is an example of a summoner currently in their placements, and the data returned:
{
"modifyDate": 1456041435000,
"champions": [
{
"id": 103,
"stats": {
"totalDeathsPerSession": 38,
"totalSessionsPlayed": 4,
"totalDamageTaken": 84403,
"totalQuadraKills": 0,
"totalTripleKills": 0,
"totalMinionKills": 516,
"maxChampionsKilled": 9,
"totalDoubleKills": 2,
"totalPhysicalDamageDealt": 52060,
"totalChampionKills": 22,
"totalAssists": 22,
"mostChampionKillsPerSession": 9,
"totalDamageDealt": 390010,
"totalFirstBlood": 0,
"totalSessionsLost": 3,
"totalSessionsWon": 1,
"totalMagicDamageDealt": 236988,
"totalGoldEarned": 38554,
"totalPentaKills": 0,
"totalTurretsKilled": 2,
"mostSpellsCast": 0,
"maxNumDeaths": 11,
"totalUnrealKills": 0
}
},
{
"id": 0,
"stats": {
"totalDamageTaken": 84403,
"totalTripleKills": 0,
"totalMinionKills": 516,
"maxChampionsKilled": 9,
"maxLargestCriticalStrike": 0,
"totalChampionKills": 22,
"totalPhysicalDamageDealt": 52060,
"rankedPremadeGamesPlayed": 0,
"totalSessionsLost": 3,
"totalNeutralMinionsKilled": 8,
"totalSessionsWon": 1,
"totalMagicDamageDealt": 236988,
"maxLargestKillingSpree": 2,
"totalPentaKills": 0,
"maxTimeSpentLiving": 624,
"totalDeathsPerSession": 38,
"totalQuadraKills": 0,
"totalSessionsPlayed": 4,
"totalDoubleKills": 2,
"totalAssists": 22,
"maxTimePlayed": 2160,
"mostChampionKillsPerSession": 9,
"totalDamageDealt": 390010,
"botGamesPlayed": 0,
"killingSpree": 6,
"totalFirstBlood": 0,
"rankedSoloGamesPlayed": 0,
"totalHeal": 9927,
"totalGoldEarned": 38554,
"mostSpellsCast": 0,
"totalTurretsKilled": 2,
"maxNumDeaths": 11,
"totalUnrealKills": 0,
"normalGamesPlayed": 0
}
}
],
"summonerId": 32236660
}
from riot-api-java.
I'd like to add that specifically the leagues endpoint will always return an empty dataset until you are actually placed in a league (for obvious reasons).
rithms already provided a way to get ranked stats, which will also work if a summoner is still to be placed.
What exact data would you like to receive?
from riot-api-java.
Yes, I was getting a null league entry, I will try the function rithms suggested.
Thank you.
from riot-api-java.
I just realised. I can't see how many W/L the summoner has in RankedStats. Is it supposed to be there ? I can't find it.
from riot-api-java.
I have added an example script that should retrieve your desired data:
https://github.com/rithms/riot-api-java/blob/master/examples/RankedWinsAndLosses.java
Please let me know, if you need help with anything else.
from riot-api-java.
Wins and losses can be retreived from the totalSessionsWon and totalSessionsLost fields.
As you can see from my example above, RankedStats divides stats by champions. The 'id' field is the champion ID of the champion for those stats. A champion ID of 0 means overall stats.
So you can get W/L for each individual champion, and overall W/L.
from riot-api-java.
That example might not work for him, as it has version 4 features like the ApiConfig. I believe he's using the v3.9.0 jar form the releases page.
Here's the example using 3.9.0 syntax:
https://gist.github.com/rithms/19e2a8235dbdd0caee3c
from riot-api-java.
It should work with 3.9.0, if you replace
ApiConfig config = new ApiConfig().setKey("YOUR-API-KEY-HERE");
RiotApi api = new RiotApi(config);
with
RiotApi api = new RiotApi("YOUR-API-KEY-HERE");
(and adjust the imports)
from riot-api-java.
Yes I am using the one from the release page but I had no problems to initialize the API. The code is working too, thank you. I didn't figure out the first id was for overall data.
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.