-
Notifications
You must be signed in to change notification settings - Fork 143
Added TFT Endpoints : Issue#640 #645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nolanbradshaw
wants to merge
4
commits into
BenFradet:develop
Choose a base branch
from
nolanbradshaw:tft-endpoints
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1fc3bca
Added tft endpoint for match, summoner, and league.
cd107a8
Moved tft endpoints into seperate folders. Created the interfaces for
nolanbradshaw 62a28c2
Merged TftSummoner and TftSummonerBase, Reverted changes to ILeagueEn…
nolanbradshaw dfa42ee
Fixed url path in tft summoner, tft summoner class, and removed unimp…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| using RiotSharp.Endpoints.LeagueEndpoint; | ||
| using RiotSharp.Endpoints.TftLeagueEndpoint; | ||
| using RiotSharp.Misc; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace RiotSharp.Endpoints.Interfaces | ||
| { | ||
| public interface ITftLeagueEndpoint | ||
| { | ||
| /// <summary> | ||
| /// Get the TFT grandmaster league | ||
| /// </summary> | ||
| /// <param name="region">Participants server region</param> | ||
| /// <returns><see cref="LeagueEntry"> class</returns> | ||
| Task<TftLeague> GetTftGrandmasterLeagueAsync(Region region); | ||
|
|
||
| /// <summary> | ||
| /// Get the TFT challenger league | ||
| /// </summary> | ||
| /// <param name="region">Participants server region</param> | ||
| /// <returns><see cref="League"> class</returns> | ||
| Task<TftLeague> GetTftChallengerLeagueAsync(Region region); | ||
|
|
||
| /// <summary> | ||
| /// Get the TFT master league | ||
| /// </summary> | ||
| /// <param name="region">Participants server region</param> | ||
| /// <returns><see cref="League"> class</returns> | ||
| Task<TftLeague> GetTftMasterLeagueAsync(Region region); | ||
|
|
||
| /// <summary> | ||
| /// Gets a list of TFT league entries | ||
| /// </summary> | ||
| /// <param name="region">Summoners server region</param> | ||
| /// <param name="encryptedSummonerId">Summoners encrypted id</param> | ||
| /// <returns>List of <see cref="LeagueEntry"> class</returns> | ||
| Task<List<TftLeagueEntry>> GetTftLeagueEntriesBySummonerAsync(Region region, string encryptedSummonerId); | ||
|
|
||
| /// <summary> | ||
| /// Gets a list of league entries for a given tier/division | ||
| /// </summary> | ||
| /// <param name="region">Participants server region</param> | ||
| /// <param name="tier">Tier to get league entries from</param> | ||
| /// <param name="division">Tier division to get league entries from</param> | ||
| /// <returns>List of <see cref="LeagueEntry"> class</returns> | ||
| Task<List<TftLeagueEntry>> GetTftLeagueByTierDivisionAsync(Region region, LeagueEndpoint.Enums.Tier tier, LeagueEndpoint.Enums.Division division); | ||
|
|
||
| /// <summary> | ||
| /// Gets the TFT league by league uuid | ||
| /// </summary> | ||
| /// <param name="region">Participants server region</param> | ||
| /// <param name="leagueId">UUID of the league</param> | ||
| /// <returns><see cref="League"> object/returns> | ||
| Task<TftLeague> GetTftLeagueByIdAsync(Region region, string leagueId); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| using RiotSharp.Endpoints.TftMatchEndpoint; | ||
| using RiotSharp.Misc; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace RiotSharp.Endpoints.Interfaces | ||
| { | ||
| public interface ITftMatchEndpoint | ||
| { | ||
| /// <summary> | ||
| /// Gets a list of match ids by puuid | ||
| /// </summary> | ||
| /// <param name="region">Region in which the summoner is.</param> | ||
| /// <param name="puuid"></param> | ||
| /// <returns>A list of strings</returns> | ||
| Task<List<string>> GetTftMatchIdsByPuuidAsync(Region region, string puuid, int count = 20); | ||
|
|
||
| /// <summary> | ||
| /// Get a match by id | ||
| /// </summary> | ||
| /// <param name="region">Region in which the summoner is.</param> | ||
| /// <param name="matchId">The match id for the match wanting to be retrieved</param> | ||
| /// <returns><see cref="Match"> object </returns> | ||
| Task<TftMatch> GetTftMatchByIdAsync(Region region, string matchId); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here with |
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| using RiotSharp.Endpoints.TftSummonerEndpoint; | ||
| using RiotSharp.Misc; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace RiotSharp.Endpoints.Interfaces | ||
| { | ||
| /// <summary> | ||
| /// Tft Summoner Endpoint. | ||
| /// </summary> | ||
| public interface ITftSummonerEndpoint | ||
| { | ||
| /// <summary> | ||
| /// Get a Teamfight Tactics summoner by account id asynchronously. | ||
| /// </summary> | ||
| /// <param name="region">Region in which you wish to look for a summoner.</param> | ||
| /// <param name="accountId">Account id of the summoner you're looking for.</param> | ||
| /// <returns>A summoner.</returns> | ||
| Task<TftSummoner> GetTftSummonerByAccountIdAsync(Region region, string accountId); | ||
|
|
||
| /// <summary> | ||
| /// Get a Teamfight Tactics summoner by name asynchronously. | ||
| /// </summary> | ||
| /// <param name="region">Region in which you wish to look for a summoner.</param> | ||
| /// <param name="summonerName">Name of the summoner you're looking for.</param> | ||
| /// <returns>A summoner.</returns> | ||
| Task<TftSummoner> GetTftSummonerByNameAsync(Region region, string summonerName); | ||
|
|
||
| /// <summary> | ||
| /// Get a Teamfight Tactics summoner by puuid asynchronously. | ||
| /// </summary> | ||
| /// <param name="region">Region in which you wish to look for a summoner.</param> | ||
| /// <param name="puuid">PUUID of the summoner you're looking for.</param> | ||
| /// <returns>A summoner.</returns> | ||
| Task<TftSummoner> GetTftSummonerByPuuidAsync(Region region, string summonerName); | ||
|
|
||
| /// <summary> | ||
| /// Get a Teamfight Tactics summoner by summoner id asynchronously. | ||
| /// </summary> | ||
| /// <param name="region">Region in which you wish to look for a summoner.</param> | ||
| /// <param name="summonerId">Id of the summoner you're looking for.</param> | ||
| /// <returns>A summoner.</returns> | ||
| Task<TftSummoner> GetTftSummonerBySummonerIdAsync(Region region, string summonerId); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| using Newtonsoft.Json; | ||
| using RiotSharp.Endpoints.LeagueEndpoint.Enums; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| namespace RiotSharp.Endpoints.TftLeagueEndpoint | ||
| { | ||
| public class TftLeague | ||
| { | ||
| internal TftLeague() { } | ||
|
|
||
| /// <summary> | ||
| /// The requested tft league entries. | ||
| /// </summary> | ||
| [JsonProperty("entries")] | ||
| public List<TftLeagueItem> Entries { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// This name is an internal place-holder name only. | ||
| /// Display and localization of names in the game client are handled client-side. | ||
| /// </summary> | ||
| [JsonProperty("name")] | ||
| public string Name { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// The tft league id. | ||
| /// </summary> | ||
| [JsonProperty("leagueId")] | ||
| public string LeagueId { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Tft league queue (eg: RankedSolo5x5). | ||
| /// </summary> | ||
| [JsonProperty("queue")] | ||
| public string Queue { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Tft League tier (eg: Challenger). | ||
| /// </summary> | ||
| [JsonProperty("tier")] | ||
| public Tier Tier { get; set; } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove
ByPuuidfrom the naming to match the naming of the match endpoint.