public void PrepareModel(RiotApiConfig.Regions region, Enums.GameQueueType gameQueueType, LeaderboardModel model, List<LeagueDto.LeagueEntryDto> topEntries)
        {
            var ddragonVersions = _memoryCache.Get(CacheKeys.DataDragonVersionByRegionKey, DateTime.UtcNow.AddDays(1),
                () => _riotClient.LolStaticData.GetVersionData(region));

            var summonerOrTeamIds = topEntries.Select(x => x.PlayerOrTeamId).ToArray();
            var summonerCacheKey = string.Format(CacheKeys.SummonerByRegionAndIdCacheKey, region, summonerOrTeamIds);

            var summoners = _cacheManager.Get(summonerCacheKey, DateTime.UtcNow.AddDays(1),
                () => _riotClient.Summoner.GetSummonersById(region, summonerOrTeamIds));

            model.LeagueEntryModels = new List<LeaderboardModel.SummonerEntryModel>();
            foreach (var topEntry in topEntries)
            {
                LeaderboardModel.SummonerEntryModel summonerEntryModel = new LeaderboardModel.SummonerEntryModel();
                summonerEntryModel.LeagueEntry = topEntry;
                if (gameQueueType == Enums.GameQueueType.RANKED_SOLO_5x5)
                {
                    var summonerDto = summoners[topEntry.PlayerOrTeamId];
                    if (summonerDto != null)
                    {
                        summonerEntryModel.SummonerIcon =
                            $"http://ddragon.leagueoflegends.com/cdn/{ddragonVersions.FirstOrDefault()}/img/profileicon/{summonerDto.ProfileIconId}.png";
                    }
                }
                model.LeagueEntryModels.Add(summonerEntryModel);
            }
        }
示例#2
0
 /// <summary>
 /// Retrieves champion list.
 /// Rate Limit Notes
 /// Requests to this API will not be counted in your Rate Limit.
 /// Implementation Notes
 /// Not all data specified below is returned by default. See the champData parameter for more information.
 /// </summary>
 /// <param name="region">The region of the leagues.</param>
 /// <param name="locale">Locale code for returned data (e.g., en_US, es_ES). If not specified, the default locale for the region is used.</param>
 /// <param name="version">Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions can be obtained from the /versions endpoint.</param>
 /// <param name="dataById">If specified as true, the returned data map will use the champions' IDs as the keys. If not specified or specified as false, the returned data map will use the champions' keys instead.</param>
 /// <param name="champData">Tags to return additional data. Only type, version, data, id, key, name, and title are returned by default if this parameter isn't specified. To return all additional data, use the tag 'all'.</param>
 /// <returns>ChampionListDto - This object contains champion list data.</returns>
 public ChampionListDto GetChampionList(RiotApiConfig.Regions region, bool? dataById = null, string locale = null, string version = null,
     string champData = null)
 {
     //https://global.api.pvp.net/api/lol/static-data/eune/v1.2/champion?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(RiotApiConfig.Regions.Global);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/static-data/{region.ToString().ToLower()}/v1.2/champion?api_key={this.ApiKey}";
     //add additional parameters
     if (dataById.HasValue)
     {
         apiCallPath += $"&dataById={dataById}";
     }
     if (!string.IsNullOrEmpty(locale))
     {
         apiCallPath += $"&locale={locale}";
     }
     if (!string.IsNullOrEmpty(version))
     {
         apiCallPath += $"&version={version}";
     }
     if (!string.IsNullOrEmpty(champData))
     {
         apiCallPath += $"&champData={champData}";
     }
     //make the call
     var dto = MakeCallToRiotApi<ChampionListDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#3
0
文件: Game.cs 项目: rogin/RiotApi.NET
 /// <summary>
 /// Get recent games by summoner ID.
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="summonerId">ID of the summoner for which to retrieve recent games.</param>
 /// <returns>RecentGamesDto - This object contains recent games information.</returns>
 public RecentGamesDto GetRecentGamesBySummonerId(RiotApiConfig.Regions region, long summonerId)
 {
     //https://eune.api.pvp.net/api/lol/eune/v1.3/game/by-summoner/41488614/recent?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v1.3/game/by-summoner/{summonerId}/recent?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<RecentGamesDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#4
0
 /// <summary>
 /// Get summoner objects mapped by standardized summoner name for a given list of summoner names.
 /// Implementation Notes
 /// The response object contains the summoner objects mapped by the standardized summoner name, 
 /// which is the summoner name in all lower case and with spaces removed.
 /// Use this version of the name when checking if the returned object contains the data for a given summoner.
 /// This API will also accept standardized summoner names as valid parameters, although they are not required.
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="summonerNames">Comma-separated list of summoner names or standardized summoner names associated with summoners to retrieve. Maximum allowed at once is 40.</param>
 /// <returns> Map[string, SummonerDto] SummonerDto - This object contains summoner information.</returns>
 public Dictionary<string, SummonerDto> GetSummonersByName(RiotApiConfig.Regions region, params string[] summonerNames)
 {
     //https://eune.api.pvp.net/api/lol/eune/v1.4/summoner/by-name/xeyanord,onesa?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v1.4/summoner/by-name/{string.Join(",",summonerNames)}?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<Dictionary<string, SummonerDto>>(baseUrl, apiCallPath);
     return dto;
 }
示例#5
0
 /// <summary>
 /// Get current game information for the given summoner ID.
 /// </summary>
 /// <param name="platformId">The platform ID for which to fetch data.</param>
 /// <param name="summonerId">The ID of the summoner.</param>
 /// <returns>CurrentGameInfo</returns>
 public CurrentGameInfo GetCurrentGameInformationForSummonerId(RiotApiConfig.Platforms platformId, long summonerId)
 {
     //https://eune.api.pvp.net/observer-mode/rest/consumer/getSpectatorGameInfo/EUN1/41488614?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByPlatform(platformId);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"observer-mode/rest/consumer/getSpectatorGameInfo/{platformId}/{summonerId}?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<CurrentGameInfo>(baseUrl, apiCallPath);
     return dto;
 }
示例#6
0
 /// <summary>
 /// Get mastery pages mapped by summoner ID for a given list of summoner IDs
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="summonerIds">Comma-separated list of summoner IDs associated with masteries to retrieve. Maximum allowed at once is 40.</param>
 /// <returns></returns>
 public Dictionary<string, MasteryPagesDto> GetMasteryPagesBySummonerId(RiotApiConfig.Regions region, params string[] summonerIds)
 {
     //https://eune.api.pvp.net/api/lol/eune/v1.4/summoner/41488614,41468510/masteries?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v1.4/summoner/{string.Join(",", summonerIds)}/masteries?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<Dictionary<string, MasteryPagesDto>>(baseUrl, apiCallPath);
     return dto;
 }
示例#7
0
文件: Team.cs 项目: rogin/RiotApi.NET
 /// <summary>
 /// Get teams mapped by team ID for a given list of team IDs.
 /// </summary>
 /// <param name="region">The region of the summoner.</param>
 /// <param name="teamIds">Comma-separated list of team IDs. Maximum allowed at once is 10.</param>
 /// <returns>Return Value: Map[string, TeamDto] TeamDto - This object contains team information.</returns>
 public Dictionary<string, TeamDto> GetTeamsByTeamId(RiotApiConfig.Regions region, params string[] teamIds)
 {
     //https://eune.api.pvp.net/api/lol/eune/v2.4/team/TEAM-18cc5c20-b4f9-11e4-80a9-782bcb46f3e4?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v2.4/team/{string.Join(",", teamIds)}?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<Dictionary<string, TeamDto>>(baseUrl, apiCallPath);
     return dto;
 }
示例#8
0
 /// <summary>
 /// Get list of featured games
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <returns>FeaturedGames</returns>
 public Dto.FeaturedGames.FeaturedGames GetListOfFeaturedGames(RiotApiConfig.Regions region)
 {
     //https://eune.api.pvp.net/observer-mode/rest/featured?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"observer-mode/rest/featured?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<Dto.FeaturedGames.FeaturedGames>(baseUrl, apiCallPath);
     return dto;
 }
示例#9
0
 /// <summary>
 /// Retrieve champion by ID.
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="id">ID of the champion to retrieve.</param>
 /// <returns>ChampionDto - This object contains champion information.</returns>
 public ChampionListDto.ChampionDto RetrieveChampionById(RiotApiConfig.Regions region, int id)
 {
     //https://eune.api.pvp.net/api/lol/eune/v1.2/champion/1?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{endPoint.Region.ToLower()}/v1.2/champion/{id}?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<ChampionListDto.ChampionDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#10
0
 /// <summary>
 /// Get league entries mapped by summoner ID for a given list of summoner IDs.
 /// Implementation Notes :
 /// Returns all league entries for specified summoners and summoners' teams.
 /// </summary>
 /// <param name="region">The region of the leagues.</param>
 /// <param name="summonerIds">Comma-separated list of summoner IDs. Maximum allowed at once is 10.</param>
 /// <returns>Map[string, List[LeagueDto]] LeagueDto - This object contains league information.</returns>
 public Dictionary<string, IEnumerable<LeagueDto>> GetSummonerLeagueEntriesByIds(RiotApiConfig.Regions region, params long[] summonerIds)
 {
     //https://eune.api.pvp.net/api/lol/eune/v2.5/league/by-summoner/22293716,41488614/entry?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v2.5/league/by-summoner/{string.Join(",", summonerIds)}/entry?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<Dictionary<string, IEnumerable<LeagueDto>>>(baseUrl, apiCallPath);
     return dto;
 }
示例#11
0
 /// <summary>
 /// Get shard status.Returns the data available on the status.leagueoflegends.com website for the given region.
 /// Rate Limit Notes
 /// Requests to this API will not be counted in your Rate Limit.
 /// </summary>
 /// <param name="region">The region for which to fetch data.</param>
 /// <returns>Return Value: ShardStatus</returns>
 public ShardStatusDto GetShardStatusByRegion(RiotApiConfig.Regions region)
 {
     //http://status.leagueoflegends.com/shards/eune
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.StatusUrl;
     //compose url
     var baseUrl = $"http://{endPoint}/";
     var apiCallPath = $"shards/{region.ToString().ToLower()}";
     //make the call
     var dto = MakeCallToRiotApi<ShardStatusDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#12
0
 /// <summary>
 /// Retrieve all champions. (REST)
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="freeToPlay">Optional filter param to retrieve only free to play champions.</param>
 /// <returns>ChampionListDto - This object contains a collection of champion information.</returns>
 public ChampionListDto RetrieveAllChampions(RiotApiConfig.Regions region, bool? freeToPlay = null)
 {
     //https://eune.api.pvp.net/api/lol/eune/v1.2/champion?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{endPoint.Region.ToLower()}/v1.2/champion?api_key={this.ApiKey}";
     //add additional parameters
     if (freeToPlay.HasValue)
     {
         apiCallPath += $"&freeToPlay={freeToPlay}";
     }
     //make the call
     var dto = MakeCallToRiotApi<ChampionListDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#13
0
 /// <summary>
 /// Get player stats summaries by summoner ID.
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="summonerId">ID of the summoner for which to retrieve player stats.</param>
 /// <param name="season">If specified, stats for the given season are returned. Otherwise, stats for the current season are returned.</param>
 /// <returns>PlayerStatsSummaryListDto - This object contains a collection of player stats summary information.</returns>
 public PlayerStatsSummaryListDto GetPlayerStatsBySummonerId(RiotApiConfig.Regions region, long summonerId, string season = null)
 {
     //https://eune.api.pvp.net/api/lol/eune/v1.3/stats/by-summoner/22293716/summary?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v1.3/stats/by-summoner/{summonerId}/summary?api_key={this.ApiKey}";
     //add additional parameters
     if (!string.IsNullOrEmpty(season))
     {
         apiCallPath += $"&season={season}";
     }
     //make the call
     var dto = MakeCallToRiotApi<PlayerStatsSummaryListDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#14
0
 /// <summary>
 /// Retrieve match by match ID.
 /// Implementation Notes
 /// Not all matches have timeline data.If timeline data is requested, but doesn't exist, then the response won't include it.
 /// </summary>
 /// <param name="region">The region of the summoner.</param>
 /// <param name="matchId">The ID of the match.</param>
 /// <param name="includeTimeline">Flag indicating whether or not to include match timeline data</param>
 /// <returns>MatchDetail - This object contains match detail information</returns>
 public MatchDetail GetMatchById(RiotApiConfig.Regions region, long matchId, bool? includeTimeline = null)
 {
     //https://eune.api.pvp.net/api/lol/eune/v2.2/match/1?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v2.2/match/{matchId}?api_key={this.ApiKey}";
     //add additional parameters
     if (includeTimeline.HasValue)
     {
         apiCallPath += $"&includeTimeline={includeTimeline}";
     }
     //make the call
     var dto = MakeCallToRiotApi<MatchDetail>(baseUrl, apiCallPath);
     return dto;
 }
示例#15
0
 /// <summary>
 /// Retrieve match list by summoner ID
 /// Implementation Notes
 /// A number of optional parameters are provided for filtering.It is up to the caller to ensure that the combination 
 /// of filter parameters provided is valid for the requested summoner, otherwise, no matches may be returned.
 /// The maximum range for begin and end index is 20. If the range is more than 20, the end index will be modified to enforce 
 /// the 20 game limit.If only one of the index parameters is specified, the other will be computed accordingly using the maximum range.
 /// If the beginTimestamp parameter is specified on its own, endTimestamp is assumed to be the current time. 
 /// If the endTimestamp parameter is specified on its own, beginTimestamp is assumed to be the start of the summoner's match history. 
 /// There is no limit on the allowed timestamp range.
 /// </summary>
 /// <param name="region">The region of the summoner.</param>
 /// <param name="summonerId">The ID of the summoner.</param>
 /// <param name="championIds">Comma-separated list of champion IDs to use for fetching games.</param>
 /// <param name="rankedQueues">Comma-separated list of ranked queue types to use for fetching games. Non-ranked queue types will be ignored.</param>
 /// <param name="seasons">Comma-separated list of seasons to use for fetching games.</param>
 /// <param name="beginTime">The begin time to use for fetching games specified as epoch milliseconds.</param>
 /// <param name="endTime">The end time to use for fetching games specified as epoch milliseconds.</param>
 /// <param name="beginIndex">The begin index to use for fetching games.</param>
 /// <param name="endIndex">The end index to use for fetching games.</param>
 /// <returns>MatchList - This object contains match list information</returns>
 public MatchListDto GetMatchListBySummonerId(RiotApiConfig.Regions region, long summonerId, string championIds = null,
     string rankedQueues = null, string seasons = null, long? beginTime = null, long? endTime = null,
     int? beginIndex = null, int? endIndex = null)
 {
     //https://eune.api.pvp.net/api/lol/eune/v2.2/matchlist/by-summoner/22293716?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v2.2/matchlist/by-summoner/{summonerId}?api_key={this.ApiKey}";
     //add additional parameters
     if (!string.IsNullOrEmpty(championIds))
     {
         apiCallPath += $"&championIds={championIds}";
     }
     if (!string.IsNullOrEmpty(rankedQueues))
     {
         apiCallPath += $"&rankedQueues={rankedQueues}";
     }
     if (!string.IsNullOrEmpty(seasons))
     {
         apiCallPath += $"&seasons={seasons}";
     }
     if (beginTime.HasValue)
     {
         apiCallPath += $"&beginTime={beginTime}";
     }
     if (endTime.HasValue)
     {
         apiCallPath += $"&endTime={endTime}";
     }
     if (beginIndex.HasValue)
     {
         apiCallPath += $"&beginIndex={beginIndex}";
     }
     if (endIndex.HasValue)
     {
         apiCallPath += $"&endIndex={endIndex}";
     }
     //make the call
     var dto = MakeCallToRiotApi<MatchListDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#16
0
 /// <summary>
 /// Retrieve version data.
 /// Rate Limit Notes
 /// Requests to this API will not be counted in your Rate Limit.
 /// </summary>
 /// <param name="region"></param>
 /// <returns>Return Value: List[string]</returns>
 public IEnumerable<string> GetVersionData(RiotApiConfig.Regions region)
 {
     //https://global.api.pvp.net/api/lol/static-data/eune/v1.2/versions?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(RiotApiConfig.Regions.Global);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/static-data/{region.ToString().ToLower()}/v1.2/versions?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<IEnumerable<string>>(baseUrl, apiCallPath);
     return dto;
 }
示例#17
0
 /// <summary>
 /// Get league entries mapped by team ID for a given list of team IDs.
 /// Implementation Notes
 /// Returns all league entries for specified teams.
 /// </summary>
 /// <param name="region">The region of the leagues.</param>
 /// <param name="teamIds">Comma-separated list of team IDs. Maximum allowed at once is 10.</param>
 /// <returns>Map[string, List[LeagueDto]] LeagueDto - This object contains league information.</returns>
 public Dictionary<string, IEnumerable<LeagueDto>> GetTeamLeagueEntriesbyIds(RiotApiConfig.Regions region, params string[] teamIds)
 {
     //https://eune.api.pvp.net/api/lol/eune/v2.5/league/by-team/TEAM-18cc5c20-b4f9-11e4-80a9-782bcb46f3e4,TEAM-b999b8d0-18d8-11e5-8e2b-782bcb46f3e4/entry?api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v2.5/league/by-team/{string.Join(",", teamIds)}/entry?api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<Dictionary<string, IEnumerable<LeagueDto>>>(baseUrl, apiCallPath);
     return dto;
 }
示例#18
0
 /// <summary>
 /// Get master tier leagues.
 /// </summary>
 /// <param name="region">Region where to retrieve the data.</param>
 /// <param name="type">Game queue type.</param>
 /// <returns>LeagueDto - This object contains league information.</returns>
 public LeagueDto GetMasterTierLeagues(RiotApiConfig.Regions region, Enums.GameQueueType type)
 {
     //https://eune.api.pvp.net/api/lol/eune/v2.5/league/master?type=RANKED_TEAM_5x5&api_key= 
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(region);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/{region.ToString().ToLower()}/v2.5/league/master?type={type}&api_key={this.ApiKey}";
     //make the call
     var dto = MakeCallToRiotApi<LeagueDto>(baseUrl, apiCallPath);
     return dto;
 }
示例#19
0
 public void GetShardStatusByRegion(RiotApiConfig.Regions region)
 {
     var dto = GlobalSetup.RiotHttpClient.LolStatus.GetShardStatusByRegion(region);
     Assert.NotNull(dto);
     Console.WriteLine(dto);
 }
示例#20
0
 /// <summary>
 /// Retrieves summoner spell by its unique id.
 /// Rate Limit Notes
 /// Requests to this API will not be counted in your Rate Limit.
 /// Implementation Notes
 /// Not all data specified below is returned by default. See the spellData parameter for more information.
 /// </summary>
 /// <param name="region">Region from which to retrieve data.</param>
 /// <param name="id">Summoner spell ID</param>
 /// <param name="locale">Locale code for returned data (e.g., en_US, es_ES). If not specified, the default locale for the region is used.</param>
 /// <param name="version">Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions can be obtained from the /versions endpoint.</param>
 /// <param name="spellData">Tags to return additional data. Only id, key, name, description, and summonerLevel are returned by default if this parameter isn't specified. To return all additional data, use the tag 'all'.</param>
 /// <returns>SummonerSpellDto - This object contains summoner spell data.</returns>
 public SummonerSpellDto GetSummonerSpellById(RiotApiConfig.Regions region, int id, string locale = null, string version = null,
     string spellData = null)
 {
     //https://global.api.pvp.net/api/lol/static-data/eune/v1.2/summoner-spell/1?spellData=all&api_key=
     //find the appropriate end point depending the region
     var endPoint = RiotApiConfig.GetRegionalEndPointByRegion(RiotApiConfig.Regions.Global);
     //compose url
     var baseUrl = $"https://{endPoint.Host}/";
     var apiCallPath = $"api/lol/static-data/{region.ToString().ToLower()}/v1.2/summoner-spell/{id}?api_key={this.ApiKey}";
     //add additional parameters
     if (!string.IsNullOrEmpty(locale))
     {
         apiCallPath += $"&locale={locale}";
     }
     if (!string.IsNullOrEmpty(version))
     {
         apiCallPath += $"&version={version}";
     }
     if (!string.IsNullOrEmpty(spellData))
     {
         apiCallPath += $"&spellData={spellData}";
     }
     //make the call
     var dto = MakeCallToRiotApi<SummonerSpellDto>(baseUrl, apiCallPath);
     return dto;
 }