League of Legends

Overview

This set of documentation will show you how to acquire a greater understanding of the best way to use the APIs and developer sources associated to League of Legends. It’s designed that can assist you start growing your personal instruments and merchandise for the League of Legends participant group.

Getting Began

Earlier than beginning on a product for League of Legends, there are two necessities each developer should full:

Solely after builders have learn the insurance policies and registered their product on the Developer Portal are they granted a restricted license to make use of Riot Video games’ mental property (IP) outlined within the Authorized Jibber Jabber.

Earlier than you begin studying this documentation it’s worthwhile to first login together with your Riot Video games account. When you do, a Developer Portal account is created for you! This motion additionally generates a primary growth API key that’s related together with your account. Elements of this documentation will reference attempting issues out within the API Reference web page. Whereas this documentation is in no way exhaustive we imagine it provides you with a terrific begin towards constructing merchandise within the League of Legends ecosystem. As at all times, should you run into any difficulties or are having technical points please be part of Developer Discord for help.

Routing Values

Step one to executing a request to the League of Legends API is to pick out the right host to execute your request to. The League of Legends (LoL) API makes use of what we name routing values within the area to make sure your request is correctly routed. We use each platform ids and areas as routing values (e.g., na1 and americas). These routing values are decided by the topology of the underlying providers. Companies are continuously clustered by platform leading to platform ids getting used as routing values. Sometimes providers are clustered by area, which is when regional routing values are used. The easiest way to inform if an endpoint makes use of a platform or a area as a routing worth is to execute a pattern request by way of the reference web page.

Platform Routing Values

Platform
Host

BR1
br1.api.riotgames.com

EUN1
eun1.api.riotgames.com

EUW1
euw1.api.riotgames.com

JP1
jp1.api.riotgames.com

KR
kr.api.riotgames.com

LA1
la1.api.riotgames.com

LA2
la2.api.riotgames.com

NA1
na1.api.riotgames.com

OC1
oc1.api.riotgames.com

TR1
tr1.api.riotgames.com

RU
ru.api.riotgames.com

Regional Routing Values

Area
Host

AMERICAS
americas.api.riotgames.com

ASIA
asia.api.riotgames.com

EUROPE
europe.api.riotgames.com

Uptime

There may be at the moment no service-level settlement (SLA) for the Riot Video games API.

Basic

Sport Constants

When trying up particular seasons, queues, maps and modes you will need to use the right ids.

Seasons

Season ids are utilized in match historical past to point which season a match was performed. A full listing of season ids will be discovered within the file beneath.

seasons.json

[
  {
    "id": 0,
    "season": "PRESEASON 3"
  },
  ...
]

Queue Ids

Queue ids present up in a number of locations all through the API and are used to point which sort of match was performed. A full listing of queue ids will be discovered within the file beneath.

queues.json

[
  {
    "queueId": 0,
    "map": "Custom games",
    "description": null,
    "notes": null
  },
  ...
]

Maps

Map ids are utilized in match historical past to point which map a match was performed. A full listing of map ids will be discovered within the file beneath.

maps.json

[
  {
    "mapId": 1,
    "mapName": "Summoner's Rift",
    "notes": "Original Summer variant"
  },
  ...
]

Sport Modes

A full listing of sport modes will be discovered within the file beneath.

gameModes.json

[
  {
    "gameMode": "CLASSIC",
    "description": "Classic Summoner's Rift and Twisted Treeline games"
  },
  ...
]

Sport Sorts

A full listing of sport varieties will be discovered within the file beneath.

gameTypes.json

[
  {
    "gameType": "CUSTOM_GAME",
    "description": "Custom games"
  },
  ...
]

Ranked Information

Queue Sorts

The leagues endpoints return a discipline referred to as queueType that can point out what map/mode that participant performed. Relying on the queueType the highestTierAchieved discipline will return the very best ending tier for the earlier season from a bunch of ranked queues.

Here’s a listing of the entire queueType and highestTierAchieved for every.

Summoner’s Rift

Unranked
    RANKED_SOLO_5x5
    RANKED_TEAM_5x5
Ranked Solo/Duo
    RANKED_SOLO_5x5
Ranked Crew 5x5
    RANKED_TEAM_5x5

Different Maps

If a match isn’t performed on Summoner’s Rift, the highestTierAchieved discipline will return the very best ending tier for the earlier season from any ranked queue.

Icons and Emblems

The emblems and place property for all ranks after Ranked Remastered replace will be discovered beneath.

ranked-emblems.zip
ranked-positions.zip

The previous tier icon property from earlier than the Ranked Remasted replace will be discovered beneath.

tier-icons.zip

Knowledge Dragon

Knowledge Dragon is our method of centralizing League of Legends sport knowledge and property, together with champions, objects, runes, summoner spells, and profile icons. All of which can be utilized by third-party builders. You may obtain a compressed tarball (.tgz) for every patch which is able to comprise all property for that patch. Please remember that updating Knowledge Dragon after every League of Legends patch is a handbook course of, so it’s not at all times up to date instantly after a patch.

Newest
https://ddragon.leagueoflegends.com/cdn/dragontail-11.13.1.tgz

Patch 10.10 was uploaded as a zipper archive (.zip) as an alternative of the everyday compressed tarball (.tgz)
https://ddragon.leagueoflegends.com/cdn/dragontail-10.10.5.zip

Variations

You could find all legitimate Knowledge Dragon variations within the variations file. Usually there’s solely a single construct of Knowledge Dragon for a given patch, nonetheless often there will likely be further builds. This usually happens when there’s an error within the unique construct. As such, you need to at all times use the newest Knowledge Dragon model for a given patch for one of the best outcomes.

https://ddragon.leagueoflegends.com/api/variations.json

Areas

Knowledge Dragon variations aren’t at all times equal to the League of Legends consumer model in a area. You could find the model every area is utilizing by way of the realms information.

https://ddragon.leagueoflegends.com/realms/na.json

Knowledge & Belongings

Knowledge Dragon supplies two sorts of static knowledge; knowledge information and sport property. The info information present uncooked static knowledge on varied elements of the sport equivalent to summoner spells, champions, and objects. The property are photos of the elements described within the knowledge information.

Knowledge Information

The info file urls embody each a model and language code. The examples within the documentation beneath use model 11.13.1 and the en_US language code. If you wish to view property launched in different variations or languages you may substitute the model or language code within the url.

Languages

Knowledge Dragon supplies localized variations of every of the info information in languages supported by the consumer. Beneath is an inventory of the languages supported by Knowledge Dragon, which you can too retrieved from the Knowledge Dragon languages file.

https://ddragon.leagueoflegends.com/cdn/languages.json

CODE
LANGUAGE

cs_CZ
Czech (Czech Republic)

el_GR
Greek (Greece)

pl_PL
Polish (Poland)

ro_RO
Romanian (Romania)

hu_HU
Hungarian (Hungary)

en_GB
English (United Kingdom)

de_DE
German (Germany)

es_ES
Spanish (Spain)

it_IT
Italian (Italy)

fr_FR
French (France)

ja_JP
Japanese (Japan)

ko_KR
Korean (Korea)

es_MX
Spanish (Mexico)

es_AR
Spanish (Argentina)

pt_BR
Portuguese (Brazil)

en_US
English (United States)

en_AU
English (Australia)

ru_RU
Russian (Russia)

tr_TR
Turkish (Turkey)

ms_MY
Malay (Malaysia)

en_PH
English (Republic of the Philippines)

en_SG
English (Singapore)

th_TH
Thai (Thailand)

vn_VN
Vietnamese (Viet Nam)

id_ID
Indonesian (Indonesia)

zh_MY
Chinese language (Malaysia)

zh_CN
Chinese language (China)

zh_TW
Chinese language (Taiwan)

Champions

There are two sorts of information information for champions. The champion.json knowledge file returns an inventory of champions with a quick abstract. The person champion JSON information comprise further knowledge for every champion.

http://ddragon.leagueoflegends.com/cdn/11.13.1/data/en_US/champion.json
http://ddragon.leagueoflegends.com/cdn/11.13.1/data/en_US/champion/Aatrox.json

Decoding Spell Textual content

Lore, ideas, stats, spells, and even really helpful objects are all a part of the info accessible for each champion. Champion spell tooltips typically have placeholders for variables that are signified by double curly brackets. Beneath are some recommendations on deciphering these placeholders:

{{ eN }} placeholders
Placeholders are changed by the corresponding merchandise within the array given within the effectBurn discipline (e.g., {{ eN }} is a placeholder for spell["effectBurn"]["1"]).

/* Amumu's Bandage Toss */
"tooltip": "Launches a bandage in a direction. If it hits an enemy unit, Amumu pulls himself to them, dealing {{ e1 }} <scaleAP>(+{{ a1 }})</scaleAP> magic damage and stunning for {{ e2 }} second.",
"effectBurn": [
  null,
  "80/130/180/230/280",
  "1",
  "1350",
  ...
]

{{ aN }} or {{ fN }} placeholders
These placeholders are barely extra difficult. Their values will be discovered within the vars discipline. First, discover the thing within the vars array whose key matches the variable (e.g., for {{ a1 }}, discover the thing within the vars array whose key discipline has the worth a1). The worth for this variable is the coeff discipline in that very same object.

/* Amumu's Bandage Toss */
"tooltip": "Launches a bandage in a direction. If it hits an enemy unit, Amumu pulls himself to them, dealing {{ e1 }} <scaleAP>(+{{ a1 }})</scaleAP> magic damage and stunning for {{ e2 }} second.",
"vars": [
  {
    "key": "a1",
    "link": "spelldamage",
    "coeff": [
      0.7
    ]
  }
]

Beneath a champions spells there are two fields impact and effectBurn. impact comprises an array of a capability’s values per stage the place, in distinction, effectBurn comprises a string of all of the values at each stage. (e.g., "effect": [30,60,90,120,150] vs "effectBurn": "30/60/90/120/150"). You may discover how the impact and effectBurn arrays have a null worth within the 0 index. It’s because these values are taken from designer-facing information the place arrays are 1-based. JSON is 0-based so a null is inserted to make it simpler to confirm the JSON information are appropriate.

"effect": [
  null,
  [ 120, 150, 180, 210, 240 ],
  [ 50, 70, 90, 110, 130 ],
  [ 25, 35, 45, 55, 65 ],
  [ 0.2, 0.2, 0.2, 0.2, 0.2 ],
  [ 50, 60, 70, 80, 90 ]
],
"effectBurn": [
  "",
  "120/150/180/210/240",
  "50/70/90/110/130",
  "25/35/45/55/65",
  "0.2",
  "50/60/70/80/90"
]

Calculating Spell Prices

Normally a spell prices mana or power, you may discover these associated prices underneath the value and costBurn fields. When a spell prices well being, the fee will likely be discovered within the impact and effectBurn fields. It is best to at all times be capable of decide the best way to calculate the price of a spell by trying on the useful resource discipline which ought to level you to the variable getting used to show the price of a spell.

/* Soraka's Astral Infusion */
"resource": "10% Max Health, {{ cost }} Mana",
"cost": [ 20, 25, 30, 35, 40 ],
"costBurn": "20/25/30/35/40"
/* Shen's Vorpal Blade */
"resource": "{{ cost }} Energy",
"cost": [ 60, 60, 60, 60, 60 ],
"costBurn": "60"
/* Dr. Mundo's Contaminated Cleaver */
"resource": "{{ e3 }} Health",
"cost": [ 0, 0, 0, 0, 0 ],
"costBurn": "0",
"effect": [
  null,
  [ 80, 130, 180, 230, 280 ],
  [ 15, 18, 21, 23, 25 ],
  [ 50, 60, 70, 80, 90 ],
  [ 40, 40, 40, 40, 40 ],
  [ 2, 2, 2, 2, 2 ]
],
"effectBurn": [
  "",
  "80/130/180/230/280",
  "15/18/21/23/25",
  "50/60/70/80/90",
  "40",
  "2"
]

Champion Splash Belongings

http://ddragon.leagueoflegends.com/cdn/img/champion/splash/Aatrox_.jpg

See also  Tesla's New Truck Adding to Battery Supply Chain Demand

The quantity on the finish of the filename corresponds to the pores and skin quantity. You could find the pores and skin quantity for every pores and skin within the file for every particular person champion in Knowledge Dragon. Every champion comprises a skins discipline and the pores and skin quantity is indicated by the num discipline.

/* Aatrox (id: 266) */
"skins": [
  {
    "id": 266000,
    "name": "default",
    "num": 0
  },
  {
    "id": 266001,
    "name": "Justicar Aatrox",
    "num": 1
  },
  {
    "id": 266002,
    "name": "Mecha Aatrox",
    "num": 2
  }
]

Champion Loading Display Belongings

http://ddragon.leagueoflegends.com/cdn/img/champion/loading/Aatrox_.jpg
The quantity on the finish of the filename follows the identical conference described within the Champion Splash Artwork.

Champion Sq. Belongings

http://ddragon.leagueoflegends.com/cdn/11.13.1/img/champion/Aatrox.png

Champion Passive Belongings

http://ddragon.leagueoflegends.com/cdn/11.13.1/img/passive/Anivia_P.png

You could find the filename for every champion’s passive within the particular person champion Knowledge Dragon file. The JSON comprises a passive discipline with picture knowledge. The filename is indicated by the full discipline.

/* Anivia (id: 34) */
"passive": {
  "name": "Rebirth",
  "description": "Upon dying, Anivia will revert into an egg. If the egg can survive for six seconds, she is gloriously reborn.",
  "sanitizedDescription": "Upon dying, Anivia will revert into an egg. If the egg can survive for six seconds, she is gloriously reborn.",
  "image": {
    "full": "Anivia_P.png",
    "sprite": "passive0.png",
    "group": "passive",
    "x": 240,
    "y": 0,
    "w": 48,
    "h": 48
    }
  }
} 

Champion Capability Belongings

http://ddragon.leagueoflegends.com/cdn/11.13.1/img/spell/FlashFrost.png

You could find the filename for every champion’s talents within the particular person champion Knowledge Dragon file. The spells discipline comprises an array of objects which incorporates picture knowledge. The filename is indicated by the full discipline.

/* Anivia (id: 34) */
"spells": [
  {
    "name": "Flash Frost",
    "key": "FlashFrost",
    "description": "Anivia brings her wings together and summons a sphere of ice that flies towards her opponents, chilling and damaging anyone in its path. When the sphere explodes it does moderate damage in a radius, stunning anyone in the area.",
    "sanitizedDescription": "Anivia brings her wings together and summons a sphere of ice that flies towards her opponents, chilling and damaging anyone in its path. When the sphere explodes it does moderate damage in a radius, stunning anyone in the area.",
    "image": {
      "full": "FlashFrost.png",
      "sprite": "spell0.png",
      "group": "spell",
      "x": 192,
      "y": 144,
      "w": 48,
      "h": 48
    }
  },
  ...
]

Gadgets

Knowledge Dragon additionally supplies the identical stage of element for each merchandise within the sport. Inside Knowledge Dragon yow will discover data such because the merchandise’s description, buy worth, promote worth, objects it builds from, objects it builds into, and stats granted from the merchandise.

http://ddragon.leagueoflegends.com/cdn/11.13.1/data/en_US/merchandise.json

There’s a discipline referred to as impact which holds an array of variables used further scripts. For example, on Doran’s defend you see the next knowledge within the impact discipline, which corresponds to the 8 injury that’s blocked from champion assaults.

"effect": {
  "Effect1Amount": "8"
}

Stat Naming Conventions

A listing of attainable stats that you simply acquire from objects, runes, or masteries can be present in Knowledge Dragon. You could find an inventory of stats gained by the merchandise, rune, or mastery by trying to find the stats discipline. Beneath are some ideas in relation to understanding what a stat means and the way they’re calculated:

  • Mod stands for modifier.
  • An “r” originally of the stat means these stats will be discovered on runes.
  • Displaying flat vs. share vs. per 5 and many others. is sadly case by case. For a given stat, although, it should at all times be the identical. (e.g., PercentAttackSpeedMod you at all times multiply by 100 and show it as a share)
  • Stats are referred to as flat should you add them collectively, and p.c should you multiply them collectively.
  • Tenacity from an merchandise does NOT stack however tenacity from a rune DOES stack.

Merchandise Belongings

http://ddragon.leagueoflegends.com/cdn/11.13.1/img/item/1001.png
The quantity appended to the merchandise filename corresponds to the merchandise id. You could find an inventory of the objects ids within the merchandise knowledge file.

Different

Summoner Spells

http://ddragon.leagueoflegends.com/cdn/11.13.1/data/en_US/summoner.json
http://ddragon.leagueoflegends.com/cdn/11.13.1/img/spell/SummonerFlash.png

Profile Icons

http://ddragon.leagueoflegends.com/cdn/11.13.1/data/en_US/profileicon.json
http://ddragon.leagueoflegends.com/cdn/11.13.1/img/profileicon/685.png

Minimaps

http://ddragon.leagueoflegends.com/cdn/6.8.1/img/map/map11.png
The quantity appended to the map filename corresponds to the map id. You could find an inventory of the map ids within the Map Names part of Sport Constants.

Sprites

http://ddragon.leagueoflegends.com/cdn/11.13.1/img/sprite/spell0.png

Scoreboard Icons (model 5.5.1)

http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/champion.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/objects.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/minion.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/rating.png
http://ddragon.leagueoflegends.com/cdn/5.5.1/img/ui/spells.png

Riot Video games API

Match API

League of Legends leverages customized sport lobbies to help builders that need to construct Tournaments for gamers. Customized video games can make the most of Match Codes that show you how to rapidly and simply get gamers into non-public customized sport lobbies with preset sport settings (map, choose kind, and many others). On the completion of every Match Code enabled sport the outcomes will likely be forwarded robotically (HTTP POST) to a URL specified by the match developer.

When getting began with the Tournaments API you will need to perceive what you are able to do with it:

  1. Register match suppliers and tournaments in a selected area/shard and its callback URL.
  2. Generate match codes for a given match.
  3. Obtain sport ends in the type of an computerized callback (HTTP POST) from League of Legends servers at any time when a sport created utilizing match code has been accomplished.
  4. Use match identifier (matchID) acquired within the callback to drag full stats knowledge for the given match.
  5. Pull finish of sport knowledge primarily based on given match code in case the callback is rarely acquired.
  6. Question pre-game foyer participant exercise occasions for a given match code.

Match API Notes

  • Match suppliers are strongly related to API keys, regenerating an API key would require a brand new supplier.
  • Although match codes will be re-used to generate further lobbies. For greatest outcomes with callbacks and Match-v4 lookups, we advocate solely making a single match with a match code.
  • Foyer occasions ought to solely be used to audit Match matches as wanted. In uncommon instances foyer occasions might get dropped. Utilizing foyer occasions to programmatically progress a match or to forfeit contributors isn’t suggested.
  • Tournaments will expire if there are not any lively codes related to the match. Match codes are eligible for expiration three months after they’re generated. As a result of tournaments and their codes can expire, creating them as near the occasion as attainable ensures no disruptions. For one of the best outcomes we recommend the next:
    • Create a match not more than per week earlier than the beginning of the primary match.
    • Upon creation of the match, generate a code to make sure the match has an lively match code related to it (thereby making ineligible for cleanup).
    • Match codes ought to be generated as wanted, not all of sudden initially of the occasion.
See also  Download CrxMouse Chrome Gestures for Windows 10 & Best Alternative (2021)

Tournaments API Construction

The Tournaments API introduces a easy parent-child knowledge construction to make sure knowledge mannequin consistency:

Tournaments API Strategies

Entry to the Tournaments API supplies a number of new strategies that may be considered on the API Reference web page. We advise exploring each methodology to get extra info on precise utilization together with the format and outline of parameters you may provide.

Full overview of all strategies and their performance is supplied within the diagram beneath:

Finest Practices

To protect the standard of the tournaments service, your Tournaments API Key could also be revoked if you don’t adhere to the next greatest practices:

  • Respect the speed restrict on your Match API Key and implement logic that considers the headers returned from a 429 Price Restrict Exceeded response.
  • Implement logic to detect unsuccessful API calls and again off accordingly. Please notify us should you imagine your utility is working accurately and you’re receiving errors, however do not proceed to slam the tournaments service with repeatedly unsuccessful calls.
  • Generate tournaments and match codes solely as wanted in manufacturing and growth. Please do not create 1,000 match codes for a ten sport match. As a reminder, you may at all times create further match codes as your match grows.
  • Tournaments and match codes ought to be generated inside an affordable time in relation to the occasion. Do not pre-create tournaments and match codes initially of the 12 months and use them because the 12 months progresses, however relatively generate the match and codes because the occasion is introduced and contributors join.

Use Case Instance

Presume there’s a match web site created for League of Legends gamers that does the next:

  • Pronounces match and guidelines
  • Registers gamers/groups
  • Generates/renders match brackets
  • Seeds registered groups throughout the brackets
  • Sends invitations for matched groups to play their video games
  • Collects finish of sport outcomes from crew captains
  • Gives new matches for groups that advance
  • Officiates for conditions when one thing goes flawed (no present, and many others)

The Tournaments API is designed to assist automate the final 4 talked about features of match web sites.

It is suggested to register a match supplier (specifying area/shard and URL for outcomes) effectively prematurely and do a full loop testing to make sure every thing is setup correctly on your internet service.

GENERATING TOURNAMENT CODES

To generate precise match codes comply with the steps beneath:

  1. Use /lol/match/v4/suppliers API endpoint to register as a supplier in particular area whereas additionally setting a URL for use for receiving sport outcomes notifications (HTTP POST). Returns providerID.
  2. Use providerID to register a match for given Match Supplier. Obtain tournamentID in return.
  3. Use tournamentID to generate a number of match codes for a given match utilizing particular sport settings (map, spectator guidelines, choose kind and many others).
    • A match code ought to solely be used to create a single match. For those who reuse a match code the server callback is not going to return stats for every match.
    • The strategy to generate match codes will return as much as 1,000 match codes at a time. If wanted, further calls to this methodology will be made to create further match codes.
    • Stale or unused match codes could also be purged after a interval of inactivity.

Match organizers can generate all of the match codes they want prematurely or generate them as vital per every section as proven beneath:

SERVER CALLBACK

When a sport created utilizing match code has accomplished, the League of Legends servers will robotically make a callback to the match supplier’s registered URL by way of HTTP POST. Beneath are a pair notes about how the server callback works.

The supplier registration and callback mechanism are comparatively rigid. For greatest outcomes, use one of many legitimate generic prime stage domains (gTLDs) listed beneath and use http over https on your callback url whereas utilizing the metaData discipline to validate callbacks.

Port Restrictions
The server callback helps http (port 80) and https (port 443) nonetheless Certificates Authorities (CA) authorised after Jan 29, 2012 aren’t supported. The callback server will not carry out a callback whether it is unable to validate an SSL cert issued by an unknown CA (and due to this fact would not belief).

Area Restrictions
Solely legitimate gTLDs authorised by ICANN earlier than March 2011 are thought-about legitimate. This excludes newer gTLDs equivalent to (.mail, .xxx, .xyz, and many others.)

Legitimate gTLDs (authorised earlier than March 2011)
aero, asia, biz, cat, com, coop, data, jobs, mobi, museum, title, web, org, professional, tel, journey, gov, edu, mil, int

Legitimate Nation Code TLDs
ac, advert, ae, af, ag, ai, al, am, an, ao, aq, ar, as, at, au, aw, ax, az, ba, bb, bd, be, bf, bg, bh, bi, bj, bm, bn, bo, br, bs, bt, bv, bw, by, bz, ca, cc, cd, cf, cg, ch, ci, ck, cl, cm, cn, co, cr, cu, cv, cx, cy, cz, de, dj, dk, dm, do, dz, ec, ee, eg, er, es, et, eu, fi, fj, fk, fm, fo, fr, ga, gb, gd, ge, gf, gg, gh, gi, gl, gm, gn, gp, gq, gr, gs, gt, gu, gw, gy, hk, hm, hn, hr, ht, hu, id, ie, il, im, in, io, iq, ir, is, it, je, jm, jo, jp, ke, kg, kh, ki, km, kn, kp, kr, kw, ky, kz, la, lb, lc, li, lk, lr, ls, lt, lu, lv, ly, ma, mc, md, me, mg, mh, mk, ml, mm, mn, mo, mp, mq, mr, ms, mt, mu, mv, mw, mx, my, mz, na, nc, ne, nf, ng, ni, nl, no, np, nr, nu, nz, om, pa, pe, pf, pg, ph, pk, pl, pm, pn, pr, ps, pt, pw, py, qa, re, ro, rs, ru, rw, sa, sb, sc, sd, se, sg, sh, si, sj, sk, sl, sm, sn, so, sr, st, su, sv, sy, sz, tc, td, tf, tg, th, tj, tk, tl, tm, tn, to, tp, tr, tt, television, tw, tz, ua, ug, uk, um, us, uy, uz, va, vc, ve, vg, vi, vn, vu, wf, ws, ye, yt, yu, za, zm, zw

  • The callback from the League of Legends server depends on a profitable response from the supplier’s registered URL. If a 200 response isn’t detected, there’s a retry mechanism that can make further makes an attempt. Within the uncommon event {that a} callback isn’t acquired inside 5 minutes, you may assume the callback failed.
  • If it’s worthwhile to change your supplier callback URL, you may register a brand new supplier however keep in mind tournaments generated with the previous supplier will proceed to make callbacks to the previous supplier callback URL.

When a sport created utilizing Match Code has accomplished, the League of Legends servers will robotically make a callback to the match supplier’s registered URL by way of HTTP POST. Beneath are a pair notes about how the server callback works.

For those who’re having bother debugging your logic, use the next cURL to imitate the habits of the callback.

curl <callback_url> -X POST -H "Content-Type: application/json" -d '<response_body>'

Beneath is a pattern JSON response returned by the League of Legends servers when a callback is made.

{
  "startTime": 1234567890000,
  "winningTeam": [
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    }
  ],
  "losingTeam": [
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    },
    {
      "summonerName": "Summoner Name"
    }
  ],
  "shortCode": "NA1234a-1a23b456-a1b2-1abc-ab12-1234567890ab",
  "metaData": "{"title":"Sport 42 - Finals"}",
  "gameId": 1234567890,
  "gameName": "a123bc45-ab1c-1a23-ab12-12345a67b89c",
  "gameType": "Practice",
  "gameMap": 11,
  "gameMode": "CLASSIC",
  "region": "NA1"
}

LOBBY EVENTS

Along with sport stats associated strategies, the lobby-events/by-code/{tournamentCode} methodology that may assist question pre-game foyer occasions. That is helpful for constructing match administration system and be capable of detect whether or not a sport for a given match code began usually. This name will be made each after the match for the complete timeline, and anytime through the foyer section for a timeline of occasions as much as that second. Beneath is an instance of the JSON returned for foyer occasions:

{
  "eventList": [
    {
      "timestamp": "1234567890000",
      "eventType": "PracticeGameCreatedEvent", //Lobby Created
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "PlayerJoinedGameEvent", //Player Joins Lobby
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "PlayerSwitchedTeamEvent", //Player Switches Teams
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "PlayerQuitGameEvent", //Player Leaves Lobby
      "summonerId": "12345678"
    },
    {
      "timestamp": "1234567890000",
      "eventType": "ChampSelectStartedEvent"  //Champ Select Begins
    },
    {
      "timestamp": "1234567890000",
      "eventType": "GameAllocationStartedEvent"  //Loading Screen Begins
    },
    {
      "timestamp": "1234567890000",
      "eventType": "GameAllocatedToLsmEvent"  //Game Begins
    }
  ]
}

League Consumer API

What’s the League Consumer API?

In an article on the Riot Video games Engineering Weblog, there’s a picture that’s helpful for outlining what we’re classifying as “League Client APIs”.

See also  Download TatukGIS DK for XE4-RX10.2 Enterprise

Particularly, we’re referring to a set of protocols that the Chromium Embedded Framework (CEF) makes use of to speak with a C++ Library that in flip communicates with the League of Legends platform. As you may discover, the communications between the C++ library and the CEF all happen domestically in your desktop. That is the League Consumer API. This service isn’t formally supported to be used with third celebration functions.

NOTE: We offer no ensures of full documentation, service uptime, or change communication for unsupported providers. This crew doesn’t personal any elements of the underlying providers, and won’t provide further help associated to them.

What’s subsequent

Whether or not you are combining the Riot Video games API and League Consumer API, or doing one thing by solely utilizing the League Consumer endpoints, we have to find out about it. Both create a brand new utility or depart a word in your current utility within the Developer Portal. We have to know which endpoints you are utilizing and the way you are utilizing them to be able to broaden on present or future characteristic units. You probably have any questions please be part of the Developer Discord for assist.

Sport Consumer API

The Sport Consumer APIs are served over HTTPS by League of Legends sport consumer and are solely accessible domestically for native functions.

Root Certificates / SSL Errors

The League of Legends consumer and the sport consumer use a self-signed certificates for HTTPS requests. To make use of the Sport Consumer API, you may ignore these errors or use the root certificates to validate the sport consumer’s SSL certificates. For those who’re testing domestically, you need to use the next insecure CURL that can ignore the SSL certificates errors.

curl --insecure https://127.0.0.1:2999/swagger/v3/openapi.json

Swagger

You may request the Swagger v2 and OpenAPI v3 specs for the Sport Consumer API with the next urls:
https://127.0.0.1:2999/swagger/v2/swagger.json
https://127.0.0.1:2999/swagger/v3/openapi.json

Dwell Consumer Knowledge API

The Dwell Consumer Knowledge API supplies a technique for gathering knowledge throughout an lively sport. It consists of normal details about the sport as effectively participant knowledge.

Get All Sport Knowledge

The Dwell Consumer Knowledge API has plenty of endpoints that return a subset of the info returned by the /allgamedata endpoint. This endpoint is nice for testing the Dwell Consumer Knowledge API, however until you really need all the info from this endpoint, we recommend one of many endpoints listed beneath that return a subset of the response.

GET https://127.0.0.1:2999/liveclientdata/allgamedata
Get all accessible knowledge.

You could find a pattern response right here.

Endpoints

Lively Participant
GET ​https://127.0.0.1:2999/liveclientdata/activeplayer
Get all knowledge in regards to the lively participant.

{
    "abilities": {...},
    "championStats": {
      "abilityHaste": 0.00000000000000,
      "abilityPower": 0.00000000000000,
      "armor": 0.00000000000000,
      "armorPenetrationFlat": 0.0,
      "armorPenetrationPercent": 0.0,
      "attackDamage": 0.00000000000000,
      "attackRange": 0.0,
      "attackSpeed": 0.00000000000000,
      "bonusArmorPenetrationPercent": 0.0,
      "bonusMagicPenetrationPercent": 0.0,
      "cooldownReduction": 0.00,
      "critChance": 0.0,
      "critDamage": 0.0,
      "currentHealth": 0.0,
      "healthRegenRate": 0.00000000000000,
      "lifeSteal": 0.0,
      "magicLethality": 0.0,
      "magicPenetrationFlat": 0.0,
      "magicPenetrationPercent": 0.0,
      "magicResist": 0.00000000000000,
      "maxHealth": 0.00000000000000,
      "moveSpeed": 0.00000000000000,
      "physicalLethality": 0.0,
      "resourceMax": 0.00000000000000,
      "resourceRegenRate": 0.00000000000000,
      "resourceType": "MANA",
      "resourceValue": 0.00000000000000,
      "spellVamp": 0.0,
      "tenacity": 0.0
    }
    "currentGold": 0.0,
    "fullRunes": {...},
    "level": 1,
    "summonerName": "Riot Tuxedo"
}

GET ​https://127.0.0.1:2999/liveclientdata/activeplayername
Returns the participant title.

"Riot Tuxedo"

GET ​https://127.0.0.1:2999/liveclientdata/activeplayerabilities
Get Skills for the lively participant.

{
    "E": {
        "abilityLevel": 0,
        "displayName": "Molten Shield",
        "id": "AnnieE",
        "rawDescription": "GeneratedTip_Spell_AnnieE_Description",
        "rawDisplayName": "GeneratedTip_Spell_AnnieE_DisplayName"
    },
    "Passive": {
        "displayName": "Pyromania",
        "id": "AnniePassive",
        "rawDescription": "GeneratedTip_Passive_AnniePassive_Description",
        "rawDisplayName": "GeneratedTip_Passive_AnniePassive_DisplayName"
    },
    "Q": {
        "abilityLevel": 0,
        "displayName": "Disintegrate",
        "id": "AnnieQ",
        "rawDescription": "GeneratedTip_Spell_AnnieQ_Description",
        "rawDisplayName": "GeneratedTip_Spell_AnnieQ_DisplayName"
    },
    "R": {
        "abilityLevel": 0,
        "displayName": "Summon: Tibbers",
        "id": "AnnieR",
        "rawDescription": "GeneratedTip_Spell_AnnieR_Description",
        "rawDisplayName": "GeneratedTip_Spell_AnnieR_DisplayName"
    },
    "W": {
        "abilityLevel": 0,
        "displayName": "Incinerate",
        "id": "AnnieW",
        "rawDescription": "GeneratedTip_Spell_AnnieW_Description",
        "rawDisplayName": "GeneratedTip_Spell_AnnieW_DisplayName"
    }
}

GET ​https://127.0.0.1:2999/liveclientdata/activeplayerrunes
Retrieve the complete listing of runes for the lively participant.

{
    "keystone": {
        "displayName": "Electrocute",
        "id": 8112,
        "rawDescription": "perk_tooltip_Electrocute",
        "rawDisplayName": "perk_displayname_Electrocute"
    },
    "primaryRuneTree": {
        "displayName": "Domination",
        "id": 8100,
        "rawDescription": "perkstyle_tooltip_7200",
        "rawDisplayName": "perkstyle_displayname_7200"
    },
    "secondaryRuneTree": {
        "displayName": "Sorcery",
        "id": 8200,
        "rawDescription": "perkstyle_tooltip_7202",
        "rawDisplayName": "perkstyle_displayname_7202"
    },
    "generalRunes": [
        {
            "displayName": "Electrocute",
            "id": 8112,
            "rawDescription": "perk_tooltip_Electrocute",
            "rawDisplayName": "perk_displayname_Electrocute"
        },
        ...
    ],
    "statRunes": [
        {
            "id": 5007,
            "rawDescription": "perk_tooltip_StatModCooldownReductionScaling"
        },
        {
            "id": 5008,
            "rawDescription": "perk_tooltip_StatModAdaptive"
        },
        {
            "id": 5003,
            "rawDescription": "perk_tooltip_StatModMagicResist"
        }
    ]
}

All Gamers
GET ​https://127.0.0.1:2999/liveclientdata/playerlist
Retrieve the listing of heroes within the sport and their stats.

[
    {
        "championName": "Annie",
        "isBot": false,
        "isDead": false,
        "items": [...],
        "level": 1,
        "position": "MIDDLE",
        "rawChampionName": "game_character_displayname_Annie",
        "respawnTimer": 0.0,
        "runes": {...},
        "scores": {...},
        "skinID": 0,
        "summonerName": "Riot Tuxedo",
        "summonerSpells": {...},
        "team": "ORDER"
    },
    ...
]

GET ​https://127.0.0.1:2999/liveclientdata/playerscores?summonerName=
Retrieve the listing of the present scores for the participant.

{
    "assists": 0,
    "creepScore": 0,
    "deaths": 0,
    "kills": 0,
    "wardScore": 0.0
}

GET ​https://127.0.0.1:2999/liveclientdata/playersummonerspells?summonerName=
Retrieve the listing of the summoner spells for the participant.

{
    "summonerSpellOne": {
        "displayName": "Flash",
        "rawDescription": "GeneratedTip_SummonerSpell_SummonerFlash_Description",
        "rawDisplayName": "GeneratedTip_SummonerSpell_SummonerFlash_DisplayName"
    },
    "summonerSpellTwo": {
        "displayName": "Ignite",
        "rawDescription": "GeneratedTip_SummonerSpell_SummonerDot_Description",
        "rawDisplayName": "GeneratedTip_SummonerSpell_SummonerDot_DisplayName"
    }
}

GET ​https://127.0.0.1:2999/liveclientdata/playermainrunes?summonerName=
Retrieve the fundamental runes of any participant.

{
    "keystone": {
        "displayName": "Electrocute",
        "id": 8112,
        "rawDescription": "perk_tooltip_Electrocute",
        "rawDisplayName": "perk_displayname_Electrocute"
    },
    "primaryRuneTree": {
        "displayName": "Domination",
        "id": 8100,
        "rawDescription": "perkstyle_tooltip_7200",
        "rawDisplayName": "perkstyle_displayname_7200"
    },
    "secondaryRuneTree": {
        "displayName": "Sorcery",
        "id": 8200,
        "rawDescription": "perkstyle_tooltip_7202",
        "rawDisplayName": "perkstyle_displayname_7202"
    }
}

GET ​https://127.0.0.1:2999/liveclientdata/playeritems?summonerName=
Retrieve the listing of things for the participant.

[
    {
        "canUse": true,
        "consumable": false,
        "count": 1,
        "displayName": "Warding Totem (Trinket)",
        "itemID": 3340,
        "price": 0,
        "rawDescription": "game_item_description_3340",
        "rawDisplayName": "game_item_displayname_3340",
        "slot": 6
    },
    ...
]

Occasions
GET ​https://127.0.0.1:2999/liveclientdata/eventdata
Get an inventory of occasions which have occurred within the sport.

{
    "Events": [
        {
            "EventID": 0,
            "EventName": "GameStart",
            "EventTime": 0.0325561985373497
        },
        ...
    ]
}

You could find an inventory of pattern occasions right here.

Sport
GET ​https://127.0.0.1:2999/liveclientdata/gamestats
Primary knowledge in regards to the sport.

{
  "gameMode": "CLASSIC",
  "gameTime": 0.000000000,
  "mapName": "Map11",
  "mapNumber": 11,
  "mapTerrain": "Default"
}

Replay API

What’s the Replay API?

The Replay API permits builders to regulate the in-game digicam throughout replays. We launched League Director as an open supply instance of how a software can leverage the Replay API.

Getting Began

By default the Replay API is disabled. To get began utilizing the Replay API you’ll first must allow the Replay API within the sport consumer config. To take action you have to to find the place your sport is put in and add the next traces to the sport.cfg file:

Instance file location:
C:Riot GamesLeague of LegendsConfiggame.cfg

[General]
EnableReplayApi=1

Upon getting enabled the Replay API, the sport consumer will generate the Swagger v2 and OpenAPI v3 specs for the Replay API which is able to point out that the Replay API is usable.

Endpoints

GET https://127.0.0.1:2999/replay/game
Details about the sport consumer course of.

GET https://127.0.0.1:2999/replay/playback
Returns the present replay playback state equivalent to pause and present time.

POST https://127.0.0.1:2999/replay/playback
Permits modifying the playback state equivalent to play / pause and the sport time to hunt to. All values are non-obligatory.

GET https://127.0.0.1:2999/replay/render
Returns the present render properties.

POST https://127.0.0.1:2999/replay/render
Permits modifying the present render properties. All values are non-obligatory.

GET https://127.0.0.1:2999/replay/recording
Returns the present standing of video recording. Ballot this useful resource for progress on the output.

POST https://127.0.0.1:2999/replay/recording
Put up to start a recording specifying the codec and output filepath. Subsequent GET requests to this useful resource will replace the standing.

GET https://127.0.0.1:2999/replay/sequence
Returns the sequence at the moment being utilized.

POST https://127.0.0.1:2999/replay/sequence
Put up to use a sequence of keyframes that the replay ought to play. Put up an empty object to take away the sequence.

Leave a Reply

Your email address will not be published.