lol vs dota2: battle of apis

37
versus Ireneusz Skrobiś Lead Developer @ Selleo

Upload: ireneusz-skrobis

Post on 11-Apr-2017

149 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: LOL vs Dota2: Battle Of APIs

versus

Ireneusz SkrobiśLead Developer @ Selleo

Page 2: LOL vs Dota2: Battle Of APIs
Page 3: LOL vs Dota2: Battle Of APIs
Page 4: LOL vs Dota2: Battle Of APIs

• 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

Good API

• documentation • easy to use • intuitive • reliable

Page 6: LOL vs Dota2: Battle Of APIs

Documentation

Page 7: LOL vs Dota2: Battle Of APIs
Page 8: LOL vs Dota2: Battle Of APIs
Page 9: LOL vs Dota2: Battle Of APIs
Page 10: LOL vs Dota2: Battle Of APIs
Page 11: LOL vs Dota2: Battle Of APIs
Page 12: LOL vs Dota2: Battle Of APIs

Easy to use?

Page 13: LOL vs Dota2: Battle Of APIs

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

What I need?

five last matches with win/lose info

Page 15: LOL vs Dota2: Battle Of APIs

• find summoner by name and region => you get summoner_id

Page 16: LOL vs Dota2: Battle Of APIs

• 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

• find player by name and region=> you get player_id

Page 18: LOL vs Dota2: Battle Of APIs

• 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

• 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

Intuitive?

Page 21: LOL vs Dota2: Battle Of APIs

What I need?

player id

Page 22: LOL vs Dota2: Battle Of APIs

• hit summoner endpoint with region and username => you get summoner_id

Page 23: LOL vs Dota2: Battle Of APIs

• 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

• to get player info you have to hit STEAM profile endpoint

Page 25: LOL vs Dota2: Battle Of APIs

• 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
Page 27: LOL vs Dota2: Battle Of APIs

• you have steamID (STEAM_0:1:123456)

Page 28: LOL vs Dota2: Battle Of APIs

• 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

• 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

• 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

• 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

WTF?

Page 33: LOL vs Dota2: Battle Of APIs

Reliable?

Page 34: LOL vs Dota2: Battle Of APIs

it is reliable

Page 35: LOL vs Dota2: Battle Of APIs

it is NOT reliable

Page 36: LOL vs Dota2: Battle Of APIs
Page 37: LOL vs Dota2: Battle Of APIs

Thank You!Live Long And Prosper :)

Ireneusz SkrobiśLead Developer @ Selleo