lol vs dota2: battle of apis

Post on 11-Apr-2017

149 Views

Category:

Engineering

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

versus

Ireneusz SkrobiśLead Developer @ Selleo

• 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

Good API

• documentation • easy to use • intuitive • reliable

Documentation

Easy to use?

What I need?

• get player info for sign up • get player stats • get matches info • get match info

What I need?

five last matches with win/lose info

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

• 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

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

• 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

• 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

Intuitive?

What I need?

player id

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

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

• it works because username is unique for region

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

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

• username is not unique user can easily change it

• you have steamID (STEAM_0:1:123456)

• you have steamID (STEAM_0:1:123456)

• you have to use some library that will calculate a proper profile id (76561198059906731)

• you have steamID (STEAM_0:1:123456)

• you have to use some library that will calculate a proper profile id (76561198059906731)

• 76561198059906731 -

• you have steamID (STEAM_0:1:123456)

• you have to use some library that will calculate a proper profile id (76561198059906731)

• 76561198059906731 - 76561197960265728

• 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

WTF?

Reliable?

it is reliable

it is NOT reliable

Thank You!Live Long And Prosper :)

Ireneusz SkrobiśLead Developer @ Selleo

top related