forked from BenFradet/RiotSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tournament by id in clash endpoint (BenFradet#669)
- Loading branch information
Showing
6 changed files
with
293 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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,57 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace RiotSharp.Endpoints.ClashEndpoint.Models | ||
{ | ||
public class ClashTeam | ||
{ | ||
/// <summary> | ||
/// Clash team id | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
|
||
/// <summary> | ||
/// Clash tournament id | ||
/// </summary> | ||
[JsonProperty("tournamentId")] | ||
public int TournamentId { get; set; } | ||
|
||
/// <summary> | ||
/// Clash team name | ||
/// </summary> | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// clash team icon id | ||
/// </summary> | ||
[JsonProperty("iconId")] | ||
public int IconId { get; set; } | ||
|
||
/// <summary> | ||
/// clash team tier | ||
/// </summary> | ||
[JsonProperty("tier")] | ||
public int Tier { get; set; } | ||
|
||
/// <summary> | ||
/// Summoner Id of the team captain | ||
/// </summary> | ||
[JsonProperty("captain")] | ||
public string CaptainId { get; set; } | ||
|
||
/// <summary> | ||
/// The team name 3 character long abbreviation | ||
/// </summary> | ||
[JsonProperty("abbreviation")] | ||
public string Abbreviation { get; set; } | ||
|
||
/// <summary> | ||
/// List containing infos about team players | ||
/// </summary> | ||
[JsonProperty("players")] | ||
public List<ClashTeamPlayer> Players { get; set; } | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
RiotSharp/Endpoints/ClashEndpoint/Models/ClashTeamPlayer.cs
This file contains 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,29 @@ | ||
using Newtonsoft.Json; | ||
using RiotSharp.Endpoints.ClashEndpoint.Enums; | ||
|
||
namespace RiotSharp.Endpoints.ClashEndpoint.Models | ||
{ | ||
/// <summary> | ||
/// Model Representing a player in the clash team | ||
/// </summary> | ||
public class ClashTeamPlayer | ||
{ | ||
/// <summary> | ||
/// Summoner Id | ||
/// </summary> | ||
[JsonProperty("summonerId")] | ||
public string SummonerId { get; set; } | ||
|
||
/// <summary> | ||
/// Position In a game | ||
/// </summary> | ||
[JsonProperty("position")] | ||
public PositionType Position { get; set; } | ||
|
||
/// <summary> | ||
/// hierarchy role in the team | ||
/// </summary> | ||
[JsonProperty("role")] | ||
public RoleType Role { get; set; } | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
RiotSharp/Endpoints/ClashEndpoint/Models/ClashTournament.cs
This file contains 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,42 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace RiotSharp.Endpoints.ClashEndpoint.Models | ||
{ | ||
/// <summary> | ||
/// Model class representing Clash Tournament entity | ||
/// </summary> | ||
public class ClashTournament | ||
{ | ||
/// <summary> | ||
/// Tournament Id | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public int Id { get; set; } | ||
|
||
/// <summary> | ||
/// Tournament theme Id | ||
/// </summary> | ||
[JsonProperty("themeId")] | ||
public int ThemeId { get; set; } | ||
|
||
/// <summary> | ||
/// Tournament Name (ex: Piltover) | ||
/// </summary> | ||
[JsonProperty("nameKey")] | ||
public string NameKey { get; set; } | ||
|
||
/// <summary> | ||
/// Secondary name of a tournament (ex: Day 4) | ||
/// </summary> | ||
[JsonProperty("nameKeySecondary")] | ||
public string NameKeySecondary { get; set; } | ||
|
||
/// <summary> | ||
/// List of tournament phases | ||
/// </summary> | ||
[JsonProperty("schedule")] | ||
public List<ClashTournamentPhase> Schedule { get; set; } | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
RiotSharp/Endpoints/ClashEndpoint/Models/ClashTournamentPhase.cs
This file contains 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,37 @@ | ||
using Newtonsoft.Json; | ||
using RiotSharp.Misc.Converters; | ||
|
||
namespace RiotSharp.Endpoints.ClashEndpoint.Models | ||
{ | ||
/// <summary> | ||
/// This model class defines properties of tournament phase model in clash | ||
/// </summary> | ||
public class ClashTournamentPhase | ||
{ | ||
/// <summary> | ||
/// Id of the tournament phase | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public int Id { get; set; } | ||
|
||
/// <summary> | ||
/// registration start time in tournament phase in ms | ||
/// </summary> | ||
[JsonProperty("registrationTime")] | ||
[JsonConverter(typeof(DateTimeConverterFromLong))] | ||
public long RegistrationTime { get; set; } | ||
|
||
/// <summary> | ||
/// Tournament start time in ms | ||
/// </summary> | ||
[JsonProperty("startTime")] | ||
[JsonConverter(typeof(DateTimeConverterFromLong))] | ||
public long StartTime { get; set; } | ||
|
||
/// <summary> | ||
/// boolean indicating if tournament has been cancelled or not | ||
/// </summary> | ||
[JsonProperty("cancelled")] | ||
public bool Cancelled { get; set; } | ||
} | ||
} |
This file contains 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