Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.
Krzysztof Kraszewski edited this page May 7, 2016 · 20 revisions

Routes

API Routes

/api/summoner/overview/:region/:id

Returns JSON response:

{
  success: Boolean,
  roles: Object,       // Object of roles sorted from the most points
  totalPoints: Number, // summed points of all champions
  rank: Number,
  rankCount: Number,
  topChampions: Array  // Array of Objects containing 3 champions having the most points
}

Example:

{
  success: true,
  roles: {
    Marksman: 336254,
    Fighter: 308985,
    Assassin: 268420,
    Mage: 231769,
    Tank: 111008,
    Support: 110863
  },
  totalPoints: 743098,
  rank: 81,
  rankCount: 213245,
  topChampions: [
    {
      championId: 236,
      championLevel: 5,
      championPoints: 76739,
      championPointsSinceLastLevel: 55139,
      championPointsUntilNextLevel: 0,
      chestGranted: true,
      highestGrade: "S",
      championName: "Lucian"
    },
    {
      championId: 202,
      championLevel: 5,
      championPoints: 59971,
      championPointsSinceLastLevel: 38371,
      championPointsUntilNextLevel: 0,
      chestGranted: true,
      highestGrade: "S",
      championName: "Jhin"
    },
    {
      championId: 81,
      championLevel: 5,
      championPoints: 41501,
      championPointsSinceLastLevel: 19901,
      championPointsUntilNextLevel: 0,
      chestGranted: true,
      highestGrade: "S+",
      championName: "Ezreal"
    }
  ]
}

Note that totalPoints is different from a sum of points achieved with each role, since a champion may have multiple roles.

/api/summoner/champions/:region/:id

Returns JSON response:

{
  success: Boolean,
  champions: Array     // Array of objects containing champions played by the summoner and their mastery points, levels and so on
}

champions: [{
    championId: Number,
    championLevel: Number,
    championPoints: Number,
    championPointsSinceLastLevel: Number,
    championPointsUntilNextLevel: Number,
    chestGranted: Boolean,
    highestGrade: String,
    championName: String,
    games: Number,                        // total games played
    kills: Number,                        // average kills per game
    deaths: Number,                       // average deaths per game
    assists: Number,                      // average assists per game
    kda: Number,                          // average kda
    gold: Number,                         // average gold earned
    minions: Number,                      // average minions killed
    winrate: Number
}]

Example:

{
success: true,
champions: [
  {
    championId: 236,
    championLevel: 5,
    championPoints: 76739,
    championPointsSinceLastLevel: 55139,
    championPointsUntilNextLevel: 0,
    chestGranted: true,
    highestGrade: "S",
    championName: "Lucian",
    games: 47,
    kills: 11.4,
    deaths: 9.06,
    assists: 7.34,
    kda: 2.07,
    gold: 16153,
    minions: 239,
    winrate: 0.62
  },
  {
    championId: 202,
    championLevel: 5,
    championPoints: 61769,
    championPointsSinceLastLevel: 40169,
    championPointsUntilNextLevel: 0,
    chestGranted: true,
    highestGrade: "S+",
    championName: "Jhin",
    games: 66,
    kills: 11.64,
    deaths: 8.18,
    assists: 8.91,
    kda: 2.51,
    gold: 14057,
    minions: 182,
    winrate: 0.56
  },
  {
    championId: 81,
    championLevel: 5,
    championPoints: 41501,
    championPointsSinceLastLevel: 19901,
    championPointsUntilNextLevel: 0,
    chestGranted: true,
    highestGrade: "S+",
    championName: "Ezreal",
    games: 13,
    kills: 12.23,
    deaths: 6.46,
    assists: 6.54,
    kda: 2.91,
    gold: 13342,
    minions: 172,
    winrate: 0.46
  }
]

/api/summoner/league/:region/:id

Returns JSON response:

{
  success: Boolean,
  league: Object
}

Example:

{
  success: true,
  league: {
    updatedAt: "2016-05-01T13:01:08.997Z",
    losses: 167,
    wins: 197,
    leaguePoints: 35,
    division: "V",
    tier: "PLATINUM",
    name: "Gangplank's Gladiators",
    winrate: 0.54
}
}

###/api/ranking/overall Returns summoners Array containing summoners sorted from the most total points.

{
  success: Boolean,
  summoners: Array
}

Example:

{
  success: true,
  summoners: [
    {
      name: "Kraszewski",
      totalPoints: 800948,
      role: "Marksman",
      tier: "GOLD",
      division: "I",
      winrate: 0.51,
      games: 338
    },
    {
      name: "Op2 r",
      totalPoints: 403691,
      role: "Fighter",
      tier: "GOLD",
      division: "III",
      winrate: 0.51,
      games: 300
    }
  ]
}

###/api/home/total

Returns summed points of every saved summoner.

{
  success: Boolean,
  total: Number
}

App routes

/summoner/:region/:key

/ranking

Summoner profile page showing all summoner data