Download - LOL vs Dota2: Battle Of APIs
![Page 1: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/1.jpg)
versus
Ireneusz SkrobiśLead Developer @ Selleo
![Page 2: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/2.jpg)
![Page 3: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/3.jpg)
![Page 4: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/4.jpg)
• Launched: Oct 27, 2009 • Number of players: 67 million a month• Developer: Riot Games
• Launched: July 9, 2013 • Number of players: 8 million a month• Developer: Valve Corporation
![Page 5: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/5.jpg)
Good API
• documentation • easy to use • intuitive • reliable
![Page 6: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/6.jpg)
Documentation
![Page 7: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/7.jpg)
![Page 8: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/8.jpg)
![Page 9: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/9.jpg)
![Page 10: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/10.jpg)
![Page 11: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/11.jpg)
![Page 12: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/12.jpg)
Easy to use?
![Page 13: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/13.jpg)
What I need?
• get player info for sign up • get player stats • get matches info • get match info
![Page 14: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/14.jpg)
What I need?
five last matches with win/lose info
![Page 15: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/15.jpg)
• find summoner by name and region => you get summoner_id
![Page 16: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/16.jpg)
• find summoner by name and region => you get summoner_id
• hit games endpoint with summoner_id => you get list of games with win/lose info
![Page 17: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/17.jpg)
• find player by name and region=> you get player_id
![Page 18: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/18.jpg)
• find player by name and region=> you get player_id
• hit matches endpoint with player_id => you get list of games without(!) win/lose info => you take match_ids for five last matches
![Page 19: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/19.jpg)
• find player by name and region=> you get player_id
• hit matches endpoint with player_id => you get list of games without(!) win/lose info => you take match_ids for five last matches
• you hit match endpoint 5 times to get win/lose info
![Page 20: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/20.jpg)
Intuitive?
![Page 21: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/21.jpg)
What I need?
player id
![Page 22: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/22.jpg)
• hit summoner endpoint with region and username => you get summoner_id
![Page 23: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/23.jpg)
• hit summoner endpoint with region and username => you get summoner_id
• it works because username is unique for region
![Page 24: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/24.jpg)
• to get player info you have to hit STEAM profile endpoint
![Page 25: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/25.jpg)
• to get player info you have to hit STEAM profile endpoint
• username is not unique user can easily change it
![Page 26: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/26.jpg)
![Page 27: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/27.jpg)
• you have steamID (STEAM_0:1:123456)
![Page 28: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/28.jpg)
• you have steamID (STEAM_0:1:123456)
• you have to use some library that will calculate a proper profile id (76561198059906731)
![Page 29: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/29.jpg)
• you have steamID (STEAM_0:1:123456)
• you have to use some library that will calculate a proper profile id (76561198059906731)
• 76561198059906731 -
![Page 30: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/30.jpg)
• you have steamID (STEAM_0:1:123456)
• you have to use some library that will calculate a proper profile id (76561198059906731)
• 76561198059906731 - 76561197960265728
![Page 31: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/31.jpg)
• you have steamID (STEAM_0:1:123456)
• you have to use some library that will calculate a proper profile id (76561198059906731)
• 76561198059906731 - 76561197960265728
• now you get dota2_account_id: 99641003
![Page 32: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/32.jpg)
WTF?
![Page 33: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/33.jpg)
Reliable?
![Page 34: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/34.jpg)
it is reliable
![Page 35: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/35.jpg)
it is NOT reliable
![Page 36: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/36.jpg)
![Page 37: LOL vs Dota2: Battle Of APIs](https://reader031.vdocument.in/reader031/viewer/2022021922/58ec8bbc1a28ab613c8b46db/html5/thumbnails/37.jpg)
Thank You!Live Long And Prosper :)
Ireneusz SkrobiśLead Developer @ Selleo