Skip to content

Commit

Permalink
Merge pull request #184 from AdrianJSClark/182-status-field-of-league…
Browse files Browse the repository at this point in the history
…-sessions

Implement "SessionStatus" Enumeration
  • Loading branch information
AdrianJSClark committed Aug 2, 2023
2 parents 9211506 + f3d6fe0 commit 1fabe7a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/Aydsko.iRacingData/Leagues/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ public class Session
public bool StartZone { get; set; }

[JsonPropertyName("status")]
public int Status { get; set; }
public int StatusRaw { get; set; }

[JsonIgnore]
public SessionStatus Status { get => (SessionStatus)StatusRaw; set => StatusRaw = (int)value; }

[JsonPropertyName("subsession_id")]
public int SubSessionId { get; set; }
Expand Down
11 changes: 11 additions & 0 deletions src/Aydsko.iRacingData/Leagues/SessionStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Aydsko.iRacingData.Leagues;

/// <summary>Indicates the status of the league session.</summary>
public enum SessionStatus
{
Unknown = 0,
Future = 1,
InProgress = 2,
DidNotLaunch = 3,
Complete = 4
}
6 changes: 2 additions & 4 deletions src/Aydsko.iRacingData/Package Release Notes.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Fixes / Changes:

- Fixed parameter handling error which omitted some values from a Series Result Search request.
- Support 2023 Season 3 Changes (Issue: #178)
- Move track screen shot URI generation on to "IDataClient" so it is more discoverable. (Issue: #177)
- Handle the security based changes from 2023 Season 3 Patch 1.
- BREAKING CHANGE: Enumeration added for League Session "Status" field. (Issue: 182)
- Previous "int" value available as "StatusRaw" property.



Expand Down

0 comments on commit 1fabe7a

Please sign in to comment.