Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

LOL vs Dota2: Battle Of APIs

409 views

Published on

In this presentation, I compare two API's created for two leading MOBA games. I show why one of them is user-friendly and one of them is not. I also try to answer a question what features good API has.

Published in: Engineering
  • Login to see the comments

  • Be the first to like this

LOL vs Dota2: Battle Of APIs

  1. 1. versus Ireneusz Skrobiś Lead Developer @ Selleo
  2. 2. • 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
  3. 3. Good API • documentation • easy to use • intuitive • reliable
  4. 4. Documentation
  5. 5. Easy to use?
  6. 6. What I need? • get player info for sign up • get player stats • get matches info • get match info
  7. 7. What I need? five last matches with win/lose info
  8. 8. • find summoner by name and region
 => you get summoner_id
 
 

  9. 9. • 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
  10. 10. • find player by name and region
 => you get player_id
 
 
 
 
 

  11. 11. • 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
 

  12. 12. • 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
  13. 13. Intuitive?
  14. 14. What I need? player id
  15. 15. • hit summoner endpoint with region and username
 => you get summoner_id
 

  16. 16. • hit summoner endpoint with region and username
 => you get summoner_id • it works because username is unique for region
  17. 17. • to get player info you have to 
 hit STEAM profile endpoint
 
 

  18. 18. • to get player info you have to 
 hit STEAM profile endpoint • username is not unique 
 user can easily change it
  19. 19. • you have steamID (STEAM_0:1:123456)
 
 
 
 
 
 

  20. 20. • you have steamID (STEAM_0:1:123456) • you have to use some library that will calculate a proper profile id (76561198059906731)
 
 
 

  21. 21. • you have steamID (STEAM_0:1:123456) • you have to use some library that will calculate a proper profile id (76561198059906731) • 76561198059906731 -
 

  22. 22. • you have steamID (STEAM_0:1:123456) • you have to use some library that will calculate a proper profile id (76561198059906731) • 76561198059906731 - 76561197960265728
 

  23. 23. • 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
  24. 24. WTF?
  25. 25. Reliable?
  26. 26. it is reliable
  27. 27. it is NOT reliable
  28. 28. Thank You! Live Long And Prosper :) Ireneusz Skrobiś Lead Developer @ Selleo

×