Skip to content

Instantly share code, notes, and snippets.

@xadamxk
Last active September 23, 2023 04:59
Show Gist options
  • Save xadamxk/8cb5d21d24bb78d63c5241e97087bb23 to your computer and use it in GitHub Desktop.
Save xadamxk/8cb5d21d24bb78d63c5241e97087bb23 to your computer and use it in GitHub Desktop.
GET /lol-champ-select/v1/session
{
"actions": [
[
{
"actorCellId": 0,
"championId": 103,
"completed": true,
"id": 1,
"pickTurn": 1,
"type": "ban"
}
],
[
{
"actorCellId": 0,
"championId": 12,
"completed": true,
"id": 2,
"pickTurn": 3,
"type": "ban"
}
],
[
{
"actorCellId": 0,
"championId": 34,
"completed": true,
"id": 3,
"pickTurn": 5,
"type": "ban"
}
],
[
{
"actorCellId": 0,
"championId": 63,
"completed": false,
"id": 4,
"pickTurn": 1,
"type": "pick"
}
]
],
"allowBattleBoost": false,
"allowDuplicatePicks": false,
"allowLockedEvents": false,
"allowRerolling": false,
"allowSkinSelection": true,
"bans": {
"myTeamBans": [
103,
12,
34
],
"numBans": 6,
"theirTeamBans": []
},
"benchChampionIds": [],
"benchEnabled": false,
"boostableSkinCount": 1,
"chatDetails": {
"chatRoomName": "[email protected]",
"chatRoomPassword": "LRP0dWOgqVAbeGFo"
},
"counter": -1,
"entitledFeatureState": {
"additionalRerolls": 0,
"unlockedSkinIds": []
},
"isSpectating": false,
"localPlayerCellId": 0,
"lockedEventIndex": -1,
"myTeam": [
{
"assignedPosition": "",
"cellId": 0,
"championId": 63,
"championPickIntent": 0,
"entitledFeatureType": "",
"playerType": "PLAYER",
"selectedSkinId": 63005,
"spell1Id": 14,
"spell2Id": 4,
"summonerId": 51581084,
"team": 1,
"wardSkinId": -1
}
],
"rerollsRemaining": 0,
"skipChampionSelect": false,
"theirTeam": [],
"timer": {
"adjustedTimeLeftInPhase": 36183,
"adjustedTimeLeftInPhaseInSec": 36,
"internalNowInEpochMs": 1577066092327,
"isInfinite": false,
"phase": "BAN_PICK",
"timeLeftInPhase": 39183,
"timeLeftInPhaseInSec": 39,
"totalTimeInPhase": 37494
},
"trades": []
}
----------
{
"actions": [
[
{
"actorCellId": 0,
"championId": 523,
"completed": true,
"id": 1,
"pickTurn": 1,
"type": "ban"
}
],
[
{
"actorCellId": 0,
"championId": 131,
"completed": true,
"id": 2,
"pickTurn": 3,
"type": "ban"
}
],
[
{
"actorCellId": 0,
"championId": 268,
"completed": true,
"id": 3,
"pickTurn": 5,
"type": "ban"
}
],
[
{
"actorCellId": 0,
"championId": 51,
"completed": true,
"id": 4,
"pickTurn": 1,
"type": "pick"
}
]
],
"allowBattleBoost": false,
"allowDuplicatePicks": false,
"allowLockedEvents": false,
"allowRerolling": false,
"allowSkinSelection": true,
"bans": {
"myTeamBans": [
523,
131,
268
],
"numBans": 10,
"theirTeamBans": []
},
"benchChampionIds": [],
"benchEnabled": false,
"boostableSkinCount": 1,
"chatDetails": {
"chatRoomName": "",
"chatRoomPassword": null
},
"counter": -1,
"entitledFeatureState": {
"additionalRerolls": 0,
"unlockedSkinIds": []
},
"isSpectating": true,
"localPlayerCellId": -1,
"lockedEventIndex": -1,
"myTeam": [
{
"assignedPosition": "",
"cellId": 0,
"championId": 51,
"championPickIntent": 0,
"entitledFeatureType": "",
"playerType": "PLAYER",
"selectedSkinId": 51000,
"spell1Id": 1,
"spell2Id": 3,
"summonerId": 52307065,
"team": 1,
"wardSkinId": -1
}
],
"rerollsRemaining": 0,
"skipChampionSelect": false,
"theirTeam": [],
"timer": {
"adjustedTimeLeftInPhase": 59371,
"adjustedTimeLeftInPhaseInSec": 59,
"internalNowInEpochMs": 1577138521401,
"isInfinite": false,
"phase": "FINALIZATION",
"timeLeftInPhase": 62371,
"timeLeftInPhaseInSec": 62,
"totalTimeInPhase": 62371
},
"trades": [
{
"cellId": 0,
"id": 100,
"state": "INVALID"
}
]
}
@httpsColon
Copy link

Hi, is there a good way to get the runes data on the op.gg official website? It seems that there is no official api interface, I'm crawling the html page source code of the official website directly and using regular expressions to match the required runes ids.

@xadamxk
Copy link
Author

xadamxk commented Sep 22, 2023

Hi, is there a good way to get the runes data on the op.gg official website? It seems that there is no official api interface, I'm crawling the html page source code of the official website directly and using regular expressions to match the required runes ids.

OP.GG is not the official API for League of Legends.
If you want rune specific data, you can use Riot's Data Dragon source for patch specific information: https://developer.riotgames.com/docs/lol

There is a community project called Community Dragon that does more work behind the scenes and offers more data: https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/
See perks, perk styles, etc.

And if you want rune specific data for games, you can use Riot's official API.

@httpsColon
Copy link

Hi, is there a good way to get the runes data on the op.gg official website? It seems that there is no official api interface, I'm crawling the html page source code of the official website directly and using regular expressions to match the required runes ids.

OP.GG is not the official API for League of Legends. If you want rune specific data, you can use Riot's Data Dragon source for patch specific information: https://developer.riotgames.com/docs/lol

There is a community project called Community Dragon that does more work behind the scenes and offers more data: https://raw.communitydragon.org/latest/plugins/rcp-be-lol-game-data/global/default/v1/ See perks, perk styles, etc.

And if you want rune specific data for games, you can use Riot's official API.

Got it ! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment