UNPKG

lol-api-js

Version:

Integration package LoL Riot API and your typescript/javascript

47 lines (45 loc) 1.11 kB
export default class League { leagueId: string; summonerId: string; summonerName: string; queueType: string; tier: string; rank: string; leaguePoints: number; wins: number; losses: number; hotStreak: boolean; veteran: boolean; freshBlood: boolean; inactive: boolean; constructor(jsonObj: leagueData){ this.leagueId = jsonObj.leagueId; this.summonerId = jsonObj.summonerId; this.summonerName = jsonObj.summonerName; this.queueType = jsonObj.queueType; this.tier = jsonObj.tier; this.rank = jsonObj.rank; this.leaguePoints = jsonObj.leaguePoints; this.wins = jsonObj.wins; this.losses = jsonObj.losses; this.hotStreak = jsonObj.hotStreak; this.veteran = jsonObj.veteran; this.freshBlood = jsonObj.freshBlood; this.inactive = jsonObj.inactive; } } export type leagueData = { leagueId: string; summonerId: string; summonerName: string; queueType: string; tier: string; rank: string; leaguePoints: number; wins: number; losses: number; hotStreak: boolean; veteran: boolean; freshBlood: boolean; inactive: boolean; }