Skip to content

Commit

Permalink
Add missing enum values related to the 2017 season and the new ranked…
Browse files Browse the repository at this point in the history
… flex games (#274)
  • Loading branch information
BenFradet authored Nov 13, 2016
1 parent 7914019 commit f40cb31
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
return QueueType.TeamBuilderDraftUnranked5x5;
case "TEAM_BUILDER_DRAFT_RANKED_5x5":
return QueueType.TeamBuilderDraftRanked5x5;
case "RANKED_FLEX_SR":
return QueueType.RankedFlexSR;
case "RANKED_FLEX_TT":
return QueueType.RankedFlexTT;
default:
return null;
}
Expand Down
4 changes: 4 additions & 0 deletions RiotSharp/MatchEndpoint/Enums/Converters/SeasonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
return Season.PreSeason2016;
case "SEASON2016":
return Season.Season2016;
case "PRESEASON2017":
return Season.PreSeason2017;
case "SEASON2017":
return Season.Season2017;
default:
return null;
}
Expand Down
16 changes: 15 additions & 1 deletion RiotSharp/MatchEndpoint/Enums/QueueType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,17 @@ public enum QueueType
/// <summary>
/// New team builder queue type in ranked.
/// </summary>
TeamBuilderDraftRanked5x5
TeamBuilderDraftRanked5x5,

/// <summary>
/// Ranked Flex Summoner's Rift games.
/// </summary>
RankedFlexSR,

/// <summary>
/// Ranked Flex Twisted Treeline games.
/// </summary>
RankedFlexTT
}

static class QueueTypeExtension
Expand Down Expand Up @@ -240,6 +250,10 @@ public static string ToCustomString(this QueueType queueType)
return "TEAM_BUILDER_DRAFT_UNRANKED_5x5";
case QueueType.TeamBuilderDraftRanked5x5:
return "TEAM_BUILDER_DRAFT_RANKED_5x5";
case QueueType.RankedFlexSR:
return "RANKED_FLEX_SR";
case QueueType.RankedFlexTT:
return "RANKED_FLEX_TT";
default:
return string.Empty;
}
Expand Down
22 changes: 18 additions & 4 deletions RiotSharp/MatchEndpoint/Enums/Season.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public enum Season
PreSeason2014,

/// <summary>
/// Season 2014
/// Season 2014.
/// </summary>
Season2014,

Expand All @@ -35,7 +35,7 @@ public enum Season
PreSeason2015,

/// <summary>
/// Season 2015
/// Season 2015.
/// </summary>
Season2015,

Expand All @@ -45,9 +45,19 @@ public enum Season
PreSeason2016,

/// <summary>
/// Season 2016
/// Season 2016.
/// </summary>
Season2016
Season2016,

/// <summary>
/// Pre season 2017.
/// </summary>
PreSeason2017,

/// <summary>
/// Season 2017.
/// </summary>
Season2017
}

static class SeasonExtension
Expand All @@ -72,6 +82,10 @@ public static string ToCustomString(this Season season)
return "PRESEASON2016";
case Season.Season2016:
return "SEASON2016";
case Season.PreSeason2017:
return "PRESEASON2017";
case Season.Season2017:
return "SEASON2017";
default:
return string.Empty;
}
Expand Down
16 changes: 15 additions & 1 deletion RiotSharp/Misc/Queue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,17 @@ public enum Queue
/// <summary>
/// Team 5 v 5 - Dynamic Queue - Unranked
/// </summary>
TeamBuilderDraftUnranked5x5
TeamBuilderDraftUnranked5x5,

/// <summary>
/// New Summoner's Rift ranked games.
/// </summary>
RankedFlexSR,

/// <summary>
/// New Twisted Treeline ranked games.
/// </summary>
RankedFlexTT
}

static class QueueExtension
Expand All @@ -50,6 +60,10 @@ public static string ToCustomString(this Queue queue)
return "TEAM_BUILDER_DRAFT_RANKED_5x5";
case Queue.TeamBuilderDraftUnranked5x5:
return "TEAM_BUILDER_DRAFT_UNRANKED_5x5";
case Queue.RankedFlexSR:
return "RANKED_FLEX_SR";
case Queue.RankedFlexTT:
return "RANKED_FLEX_TT";
default:
return string.Empty;
}
Expand Down
4 changes: 4 additions & 0 deletions RiotSharp/Misc/QueueConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
return Queue.TeamBuilderDraftRanked5x5;
case "TEAM_BUILDER_DRAFT_UNRANKED_5x5":
return Queue.TeamBuilderDraftUnranked5x5;
case "RANKED_FLEX_SR":
return Queue.RankedFlexSR;
case "RANKED_FLEX_TT":
return Queue.RankedFlexTT;
default:
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion RiotSharp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.1.*")]
[assembly: AssemblyVersion("2.5.0.*")]
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
return PlayerStatsSummaryType.Bilgewater;
case "Siege":
return PlayerStatsSummaryType.Siege;
case "RankedFlexSR":
return PlayerStatsSummaryType.RankedFlexSR;
case "RankedFlexTT":
return PlayerStatsSummaryType.RankedFlexTT;
default:
return null;
}
Expand Down
12 changes: 11 additions & 1 deletion RiotSharp/StatsEndpoint/Enums/PlayerStatsSummaryType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ public enum PlayerStatsSummaryType
/// <summary>
/// Siege games.
/// </summary>
Siege
Siege,

/// <summary>
/// New Summoner's Rift ranked games.
/// </summary>
RankedFlexSR,

/// <summary>
/// New Twisted Treeline ranked games.
/// </summary>
RankedFlexTT
}
}

0 comments on commit f40cb31

Please sign in to comment.