├── doc └── docfx_project │ ├── api │ ├── index.md │ └── .gitignore │ ├── articles │ ├── intro.md │ └── toc.yml │ ├── toc.yml │ ├── images │ ├── favicons │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ └── site.webmanifest │ ├── Aydsko iRacing Data API Icon.png │ └── Aydsko iRacing Data API ReadMe Logo.png │ ├── .gitignore │ └── templates │ └── minimal │ ├── partials │ ├── toc.tmpl.partial │ ├── footer.tmpl.partial │ └── navbar.tmpl.partial │ └── styles │ └── main.css ├── src ├── Aydsko.iRacingData.IntegrationTests │ ├── Usings.cs │ ├── appsettings.json │ ├── Results │ │ ├── ResultsGetTest.cs │ │ └── CachingResultsGetTest.cs │ ├── Stats │ │ └── DriverStatisticsByCategoryCsvTests.cs │ ├── Member │ │ └── MemberInfoTest.cs │ ├── TestLogger.cs │ ├── Tracks │ │ ├── CachingGetTracksTests.cs │ │ └── GetTracksTests.cs │ ├── DataClientIntegrationFixture.cs │ └── Lookups │ │ └── CachingLookupTests.cs ├── Aydsko.iRacingData.UnitTests │ ├── GlobalUsings.cs │ ├── Responses │ │ ├── GetTimeAttackSeriesSuccessfulAsync │ │ │ └── 0.json │ │ ├── GetSeasonResultsHandlesBadRequestAsync │ │ │ └── 1.json │ │ ├── ResponseUnauthorizedLegacyRequired │ │ │ └── 0.json │ │ ├── GetMemberDivisionSuccessfulAsync │ │ │ ├── 2.json │ │ │ └── 1.json │ │ ├── GetMemberInfoDuringMaintenanceThrowsAsync │ │ │ ├── 1.json │ │ │ └── 0.json │ │ ├── ResponseForbidden │ │ │ ├── 1.json │ │ │ └── 0.json │ │ ├── ResponseUnauthorized │ │ │ ├── 1.json │ │ │ └── 0.json │ │ ├── GetLookupWithExpiredAuthWorksAsync │ │ │ ├── 3.json │ │ │ ├── 1.json │ │ │ └── 4.json │ │ ├── GetMemberSummarySuccessfulAsync │ │ │ ├── 2.json │ │ │ └── 1.json │ │ ├── SearchDriversSuccessfulAsync │ │ │ ├── 2.json │ │ │ └── 1.json │ │ ├── GetSeasonStandingsAsync │ │ │ └── 1.json │ │ ├── GetSeasonResultsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetCarsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetTeamSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetLeagueSeasonsAsync │ │ │ └── 1.json │ │ ├── GetMyInfoSucceedsAsync │ │ │ └── 1.json │ │ ├── GetSeriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetTracksSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetLeagueMembershipAsync │ │ │ └── 1.json │ │ ├── GetLookupsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetSeriesAssetsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetTrackAssetsSuccessfulAsync │ │ │ └── 1.json │ │ ├── ListSeasonsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetCarClassesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetCategoriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetHostedSessionsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetLicenseLookupsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetMemberRecapSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetRaceGuideSuccessfulAsync │ │ │ └── 1.json │ │ ├── ListHostedSessionsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetBestLapStatisticsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetCarAssetDetailsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetCountriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetEventTypesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetLeaguePointsSystemsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetLeagueWithLicensesSucceedsAsync │ │ │ └── 1.json │ │ ├── GetMemberChartDataSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetPastSeasonsForSeriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetSeasonsWithSeriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetDriverInfoWithLicensesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetHostedSessionsCombinedSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetLeagueSeasonSessionsAsync │ │ │ └── 1.json │ │ ├── GetMemberParticipationCreditsSucceedsAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetMemberYearlyStatisticsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetSeasonsWithoutSeriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetStatisticsSeriesSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetSubSessionResultForLeagueSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetTeamSubsessionLapsSuccessfulAsync │ │ │ └── 1.json │ │ ├── ListHostedSessionsCombinedSuccessfulAsync │ │ │ └── 1.json │ │ ├── SearchLeagueDirectorySuccessfulAsync │ │ │ └── 1.json │ │ ├── GetCustomerLeagueSessionsAsync │ │ │ └── 1.json │ │ ├── GetDriverInfoWithoutLicensesSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetSeasonTeamStandingsSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetSingleDriverSubsessionLapsSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetSubSessionLapChartSuccessfulAsync │ │ │ └── 1.json │ │ ├── GetSubsessionEventLogSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetWorldRecordStatisticsSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetLeagueWithoutLicensesSucceedsAsync │ │ │ └── 1.json │ │ ├── GetMemberRecentRacesSucceedsAsync │ │ │ └── 1.json │ │ ├── GetSeasonTimeTrialResultsSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetSeasonTimeTrialStandingsSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetSeasonQualifyResultsSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── GetSpectatorSubsessionIdentifiersAsync │ │ │ └── 1.json │ │ ├── GetTimeAttackMemberSeasonResultsSuccessfulAsync │ │ │ ├── 1.json │ │ │ └── 2.json │ │ ├── SuccessfulLogin.json │ │ ├── GivenOptionsWithASaveActionTheSaveActionIsCalledWithTheCookies │ │ │ └── 0.json │ │ ├── GetDivisionsSuccessfulAsync │ │ │ └── 1.json │ │ ├── SearchHostedResultsSuccessfulAsync │ │ │ └── 1.json │ │ └── ResponseUnknown504 │ │ │ └── 1.json │ ├── TestLegacyUsernamePasswordApiClient.cs │ └── ResourceNotFoundException.cs └── Aydsko.iRacingData │ ├── Common │ ├── ResultOrderDirection.cs │ ├── EventType.cs │ ├── LicenseGroupType.cs │ ├── IChunkInfoResultHeader.cs │ ├── LinkResult.cs │ ├── CarsInClass.cs │ ├── ErrorResponse.cs │ ├── Suit.cs │ ├── Helmet.cs │ ├── Track.cs │ ├── DataResponse.cs │ ├── ChunkInfo.cs │ ├── DataUrlResult.cs │ ├── License.cs │ ├── CarClass.cs │ └── TrackState.cs │ ├── Assets │ └── Aydsko iRacing Data API Icon.png │ ├── Exceptions │ ├── iRacingUnknownResponseException.cs │ ├── iRacingDataClientException.cs │ ├── iRacingForbiddenResponseException.cs │ ├── iRacingInMaintenancePeriodException.cs │ └── iRacingClientOptionsValueMissingException.cs │ ├── Leagues │ ├── SearchLeagueOrderByField.cs │ ├── SessionStatus.cs │ ├── Image.cs │ ├── TagValue.cs │ ├── CarInClass.cs │ ├── Car.cs │ ├── Track.cs │ ├── SeasonStandingsStandingsDetails.cs │ ├── CarClass.cs │ ├── SeasonStandingsDriver.cs │ ├── CategorizedTag.cs │ ├── SessionCar.cs │ ├── SeasonStandingsTeam.cs │ ├── Owner.cs │ ├── PointsSystem.cs │ ├── LeaguePointsSystems.cs │ ├── LeagueDirectoryResultPage.cs │ ├── LeagueSeasons.cs │ ├── CustomerLeagueSessions.cs │ ├── LeagueSeasonSessions.cs │ ├── SeasonStandings.cs │ ├── Tags.cs │ ├── LeagueMembership.cs │ ├── RosterMember.cs │ ├── LeagueDirectoryResultItem.cs │ └── SeasonStandingsTeamStandings.cs │ ├── Cars │ ├── CarTypes.cs │ ├── CarRule.cs │ └── PaintRules.cs │ ├── Hosted │ ├── EventTypes.cs │ ├── CarTypes.cs │ ├── SessionTypes.cs │ ├── TrackTypes.cs │ ├── Host.cs │ ├── Admin.cs │ ├── CombinedSessionsResult.cs │ ├── Farm.cs │ ├── HostedSessionWeather.cs │ ├── HostedSessionsResult.cs │ ├── Car.cs │ └── Eligability.cs │ ├── Results │ ├── CarsInClass.cs │ ├── ResultTrackInfo.cs │ ├── AllowedLicenses.cs │ ├── SubsessionEventLogHeader.cs │ ├── ResultsCarClasses.cs │ ├── SessionResults.cs │ ├── SessionSplit.cs │ ├── SingleDriverSubsessionLapsHeader.cs │ ├── SeasonResults.cs │ └── RaceSummary.cs │ ├── Constants │ ├── WindDirection.cs │ ├── Category.cs │ ├── EventType.cs │ └── Division.cs │ ├── Series │ ├── CarTypes.cs │ ├── TrackTypes.cs │ ├── TrackState.cs │ ├── ListSeason.cs │ ├── AllowedLicenses.cs │ ├── StatisticsSeason.cs │ ├── ListOfSeasons.cs │ ├── ForecastOptions.cs │ ├── RaceWeeks.cs │ ├── RaceGuideResults.cs │ ├── RaceGuideSession.cs │ ├── SeasonBase.cs │ ├── CarRestrictions.cs │ ├── SpectatorSubsessionIds.cs │ ├── SeriesAsset.cs │ ├── StatisticsSeries.cs │ ├── RaceTimeDescriptors.cs │ ├── SpectatorDetails.cs │ ├── SpectatorSubsessionDetail.cs │ └── WeatherSummary.cs │ ├── Tracks │ ├── TrackTypes.cs │ └── TrackMapLayers.cs │ ├── Stats │ ├── Track.cs │ ├── SeasonTeamStandingCar.cs │ ├── MemberCareer.cs │ ├── MemberRecentRaces.cs │ ├── WorldRecordsHeader.cs │ ├── Livery.cs │ ├── MemberYearlyStatistics.cs │ ├── RecapFavoriteCar.cs │ ├── WorldRecordsHeaderInfo.cs │ ├── DriverStatisticsCsvFile.cs │ ├── MemberDivision.cs │ ├── RecapFavoriteTrack.cs │ ├── SeasonTimeTrialResult.cs │ └── MemberRecap.cs │ ├── Member │ ├── FollowCounts.cs │ ├── CarsDriven.cs │ ├── ContentPackage.cs │ ├── Account.cs │ ├── Summary.cs │ ├── Licenses.cs │ ├── MemberBest.cs │ ├── Activity.cs │ ├── TeamMember.cs │ ├── ProfileField.cs │ ├── MemberSummaryYearStatistics.cs │ ├── DriverInfoResponse.cs │ ├── MemberBests.cs │ ├── MemberProfileInfo.cs │ ├── MemberAwardResult.cs │ ├── FieldDefs.cs │ ├── LicenseHistory.cs │ ├── DriverInfo.cs │ └── ParticipationCredits.cs │ ├── AydskoDataClientDiagnostics.cs │ ├── Lookups │ ├── Lookup.cs │ ├── ClubHistoryLookup.cs │ ├── Country.cs │ ├── LookupValue.cs │ ├── LookupGroup.cs │ ├── DriverSearchResult.cs │ ├── FlairLookupResponse.cs │ └── LicenseLevel.cs │ ├── TimeAttack │ ├── TimeAttackScheduleIndex.cs │ └── TimeAttackTrack.cs │ ├── IAuthenticatingHttpClient.cs │ ├── GlobalUsings.cs │ ├── Converters │ ├── OneDecimalPointValueConverter.cs │ ├── TwoDecimalPointsValueConverter.cs │ ├── CsvStringConverter.cs │ ├── DateOnlyConverter.cs │ ├── UriConverter.cs │ └── DateTimeConverter.cs │ └── Searches │ ├── HostedResultsHeader.cs │ └── OfficialSearchResultHeader.cs ├── Aydsko iRacing Data API ReadMe Logo.png ├── .github └── workflows │ ├── pr.yml │ └── _deploy-docs.yml ├── examples └── Console │ ├── iRacingConsole │ └── iRacingConsole.csproj │ └── DataConsoleExample.sln └── LICENSE /doc/docfx_project/api/index.md: -------------------------------------------------------------------------------- 1 | # API Index -------------------------------------------------------------------------------- /doc/docfx_project/articles/intro.md: -------------------------------------------------------------------------------- 1 | # Add your introductions here! 2 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /doc/docfx_project/articles/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Introduction 2 | href: intro.md 3 | -------------------------------------------------------------------------------- /doc/docfx_project/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Api Documentation 2 | href: api/ 3 | homepage: api/index.md 4 | -------------------------------------------------------------------------------- /doc/docfx_project/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /Aydsko iRacing Data API ReadMe Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/Aydsko iRacing Data API ReadMe Logo.png -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/favicons/favicon.ico -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | global using NUnit.Framework; -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /doc/docfx_project/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /doc/docfx_project/images/Aydsko iRacing Data API Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/Aydsko iRacing Data API Icon.png -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/ResultOrderDirection.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Common; 2 | 3 | public enum ResultOrderDirection 4 | { 5 | Ascending, 6 | Descending, 7 | } 8 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Assets/Aydsko iRacing Data API Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/src/Aydsko.iRacingData/Assets/Aydsko iRacing Data API Icon.png -------------------------------------------------------------------------------- /doc/docfx_project/images/Aydsko iRacing Data API ReadMe Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/doc/docfx_project/images/Aydsko iRacing Data API ReadMe Logo.png -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iRacingData": { 3 | "Username": "adrian@ayds.com.au", 4 | "Password": "", 5 | "CustomerId": 341554 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTimeAttackSeriesSuccessfulAsync/0.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { "ta_schedule_filename": "1d2d66105b646093332a38ce1f34d856c3637304" } 4 | } 5 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Exceptions/iRacingUnknownResponseException.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AdrianJSClark/aydsko-iracingdata/HEAD/src/Aydsko.iRacingData/Exceptions/iRacingUnknownResponseException.cs -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonResultsHandlesBadRequestAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 400, 3 | "headers": {}, 4 | "content": { 5 | "error": "Bad Request" 6 | } 7 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SearchLeagueOrderByField.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Leagues; 2 | 3 | public enum SearchLeagueOrderByField 4 | { 5 | Relevance, 6 | LeagueName, 7 | OwnersDisplayName, 8 | RosterCount, 9 | } 10 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ResponseUnauthorizedLegacyRequired/0.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 401, 3 | "headers": { }, 4 | "content": { 5 | "error": "access_denied", 6 | "error_description": "legacy authorization refused" 7 | } 8 | } -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: Build Pull-Request 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build: 12 | name: Build & Test 13 | uses: ./.github/workflows/_build.yml 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberDivisionSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "division": 1, 5 | "projected": false, 6 | "event_type": 5, 7 | "success": true, 8 | "season_id": 1234 9 | } 10 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberInfoDuringMaintenanceThrowsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 503, 3 | "headers": {}, 4 | "content": { 5 | "error": "Site Maintenance", 6 | "note": "The site is currently undergoing maintenance. Please try your request later." 7 | } 8 | } -------------------------------------------------------------------------------- /doc/docfx_project/images/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ResponseForbidden/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 403, 3 | "headers": { 4 | "x-ratelimit-remaining": "99", 5 | "x-ratelimit-limit": "100", 6 | "x-ratelimit-reset": "1644451200" 7 | }, 8 | "content": { 9 | "error": "Forbidden" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ResponseUnauthorized/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 401, 3 | "headers": { 4 | "x-ratelimit-remaining": "238", 5 | "x-ratelimit-limit": "240", 6 | "x-ratelimit-reset": "1657533187" 7 | }, 8 | "content": { 9 | "error": "Unauthorized" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Cars/CarTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Cars; 5 | 6 | public class CarTypes 7 | { 8 | [JsonPropertyName("car_type")] 9 | public string CarType { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/EventTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class EventTypes 7 | { 8 | [JsonPropertyName("event_type")] 9 | public int EventType { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/CarsInClass.cs: -------------------------------------------------------------------------------- 1 | // © 2023-2024 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class CarsInClass 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Constants/WindDirection.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Constants; 2 | 3 | public enum WindDirection 4 | { 5 | North = 0, 6 | NorthEast = 1, 7 | East = 2, 8 | SouthEast = 3, 9 | South = 4, 10 | SouthWest = 5, 11 | West = 6, 12 | NorthWest = 7, 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/CarTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class CarTypes 7 | { 8 | [JsonPropertyName("car_type")] 9 | public string CarType { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/SessionTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class SessionTypes 7 | { 8 | [JsonPropertyName("session_type")] 9 | public int SessionType { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/CarTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class CarTypes 7 | { 8 | [JsonPropertyName("car_type")] 9 | public string CarType { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Cars/CarRule.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Cars; 2 | 3 | public class CarRule 4 | { 5 | [JsonPropertyName("rule_category")] 6 | public string RuleCategory { get; set; } = default!; 7 | 8 | [JsonPropertyName("text")] 9 | public string Text { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLookupWithExpiredAuthWorksAsync/3.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 401, 3 | "headers": { 4 | "x-ratelimit-remaining": "238", 5 | "x-ratelimit-limit": "240", 6 | "x-ratelimit-reset": "1657533187" 7 | }, 8 | "content": { 9 | "error": "Unauthorized" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Cars/PaintRules.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Cars; 5 | 6 | public class PaintRules 7 | { 8 | [JsonPropertyName("RestrictCustomPaint")] 9 | public bool RestrictCustomPaint { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/TrackTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class TrackTypes 7 | { 8 | [JsonPropertyName("track_type")] 9 | public string TrackType { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SessionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Leagues; 2 | 3 | /// Indicates the status of the league session. 4 | public enum SessionStatus 5 | { 6 | Unknown = 0, 7 | Future = 1, 8 | InProgress = 2, 9 | DidNotLaunch = 3, 10 | Complete = 4 11 | } 12 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/TrackTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class TrackTypes 7 | { 8 | [JsonPropertyName("track_type")] 9 | public string TrackType { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Tracks/TrackTypes.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Tracks; 5 | 6 | public class TrackTypes 7 | { 8 | [JsonPropertyName("track_type")] 9 | public string TrackType { get; set; } = default!; 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/EventType.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public enum EventType 7 | { 8 | Unknown = 0, 9 | Practice = 2, 10 | Qualify = 3, 11 | TimeTrial = 4, 12 | Race = 5, 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberSummarySuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "this_year": { 5 | "num_official_sessions": 10, 6 | "num_league_sessions": 9, 7 | "num_official_wins": 8, 8 | "num_league_wins": 7 9 | }, 10 | "cust_id": 123456 11 | } 12 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/LicenseGroupType.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class LicenseGroupType 7 | { 8 | [JsonPropertyName("license_group_type")] 9 | public int LicenseGroupTypeId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/Track.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class Track 7 | { 8 | [JsonPropertyName("track_id")] 9 | public int TrackId { get; set; } 10 | 11 | [JsonPropertyName("track_name")] 12 | public string TrackName { get; set; } = null!; 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/Image.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class Image 7 | { 8 | [JsonPropertyName("small_logo")] 9 | public string? SmallLogo { get; set; } 10 | 11 | [JsonPropertyName("large_logo")] 12 | public string? LargeLogo { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/TagValue.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class TagValue 7 | { 8 | [JsonPropertyName("tag_id")] 9 | public int TagId { get; set; } 10 | 11 | [JsonPropertyName("tag_name")] 12 | public string TagName { get; set; } = null!; 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/FollowCounts.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class FollowCounts 7 | { 8 | [JsonPropertyName("followers")] 9 | public int Followers { get; set; } 10 | 11 | [JsonPropertyName("follows")] 12 | public int Follows { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/CarInClass.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class CarInClass 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("car_name")] 12 | public string CarName { get; set; } = default!; 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/CarsDriven.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class CarsDriven 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("car_name")] 12 | public string CarName { get; set; } = default!; 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/SeasonTeamStandingCar.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class SeasonTeamStandingCar 7 | { 8 | [JsonPropertyName("carclassid")] 9 | public int Carclassid { get; set; } 10 | 11 | [JsonPropertyName("carid")] 12 | public int Carid { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/TrackState.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class TrackState 7 | { 8 | [JsonPropertyName("leave_marbles")] 9 | public bool LeaveMarbles { get; set; } 10 | 11 | [JsonPropertyName("practice_rubber")] 12 | public int PracticeRubber { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/AydskoDataClientDiagnostics.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Reflection; 3 | 4 | namespace Aydsko.iRacingData; 5 | 6 | internal static class AydskoDataClientDiagnostics 7 | { 8 | internal static ActivitySource ActivitySource { get; } = new("Aydsko.iRacingData", typeof(DataClient).Assembly.GetCustomAttribute()?.InformationalVersion ?? ""); 9 | } 10 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/ContentPackage.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class ContentPackage 7 | { 8 | [JsonPropertyName("package_id")] 9 | public int PackageId { get; set; } 10 | 11 | [JsonPropertyName("content_ids")] 12 | public int[] ContentIds { get; set; } = Array.Empty(); 13 | } 14 | -------------------------------------------------------------------------------- /examples/Console/iRacingConsole/iRacingConsole.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/SearchDriversSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": [ 4 | { 5 | "cust_id": 341554, 6 | "display_name": "Adrian Clark", 7 | "helmet": { 8 | "pattern": 50, 9 | "color1": "981f24", 10 | "color2": "000000", 11 | "color3": "ed2129", 12 | "face_type": 4, 13 | "helmet_type": 0 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/IChunkInfoResultHeader.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public interface IChunkInfoResultHeader where THeaderData : IChunkInfoResultHeaderData 7 | { 8 | THeaderData Data { get; } 9 | } 10 | 11 | public interface IChunkInfoResultHeaderData 12 | { 13 | ChunkInfo ChunkInfo { get; } 14 | } 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonStandingsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 200, 3 | "headers": {}, 4 | "content": { 5 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/season_standings/0d758094-d679-4271-9152-0f691bec7c40?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1674756881&Signature=xTfAPhX5bAL%2BNAaTRsiCi2X0TM4%3D", 6 | "expires": "2023-01-26T18:27:41.822Z" 7 | } 8 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/Lookup.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | public class Lookup 7 | { 8 | [JsonPropertyName("lookup_type")] 9 | public string LookupType { get; set; } = default!; 10 | 11 | [JsonPropertyName("lookup_values")] 12 | public LookupValue[] LookupValues { get; set; } = Array.Empty(); 13 | } 14 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonResultsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 400, 3 | "headers": {}, 4 | "content": { 5 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/results/season_results/869b8e16-351c-4780-85ad-3e5a100a8078?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645965500&Signature=g3Zv8UntiEyQsIsgNNNSgpNEWDM%3D", 6 | "expires": "2022-08-27T11:23:19.507Z" 7 | } 8 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/Car.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class Car 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("car_name")] 12 | public string CarName { get; set; } = default!; 13 | 14 | [JsonPropertyName("team_car")] 15 | public bool TeamCar { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Constants/Category.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Constants; 2 | 3 | public class Category 4 | { 5 | [JsonPropertyName("label")] 6 | public string Label { get; set; } = null!; 7 | 8 | [JsonPropertyName("value")] 9 | public int Value { get; set; } 10 | } 11 | 12 | [JsonSerializable(typeof(Category[])), JsonSourceGenerationOptions(WriteIndented = true)] 13 | internal partial class CategoryArrayContext : JsonSerializerContext 14 | { } 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Constants/EventType.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Constants; 2 | 3 | public class EventType 4 | { 5 | [JsonPropertyName("label")] 6 | public string Label { get; set; } = null!; 7 | 8 | [JsonPropertyName("value")] 9 | public int Value { get; set; } 10 | } 11 | 12 | [JsonSerializable(typeof(EventType[])), JsonSourceGenerationOptions(WriteIndented = true)] 13 | internal partial class EventTypeArrayContext : JsonSerializerContext 14 | { } 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/Track.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class Track 7 | { 8 | [JsonPropertyName("track_id")] 9 | public int TrackId { get; set; } 10 | 11 | [JsonPropertyName("track_name")] 12 | public string TrackName { get; set; } = default!; 13 | 14 | [JsonPropertyName("config_name")] 15 | public string? ConfigName { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ResponseForbidden/0.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "authcode": "51687dfd-1d8e-4faa-bf72-52cb36e4f762", 5 | "autoLoginSeries": null, 6 | "autoLoginToken": null, 7 | "custId": 123456, 8 | "email": "test.user@example.com", 9 | "ssoCookieDomain": ".iracing.com", 10 | "ssoCookieName": "irsso_membersv2", 11 | "ssoCookiePath": "/", 12 | "ssoCookieValue": "3883fc6a-890c-4c75-981c-84f2f9ebfb41" 13 | } 14 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/Host.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class Host 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ResponseUnauthorized/0.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "authcode": "51687dfd-1d8e-4faa-bf72-52cb36e4f762", 5 | "autoLoginSeries": null, 6 | "autoLoginToken": null, 7 | "custId": 123456, 8 | "email": "test.user@example.com", 9 | "ssoCookieDomain": ".iracing.com", 10 | "ssoCookieName": "irsso_membersv2", 11 | "ssoCookiePath": "/", 12 | "ssoCookieValue": "3883fc6a-890c-4c75-981c-84f2f9ebfb41" 13 | } 14 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/Admin.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class Admin 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/ResultTrackInfo.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class ResultTrackInfo 7 | { 8 | [JsonPropertyName("track_id")] 9 | public int TrackId { get; set; } 10 | 11 | [JsonPropertyName("track_name")] 12 | public string? TrackName { get; set; } 13 | 14 | [JsonPropertyName("config_name")] 15 | public string? ConfigName { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/Account.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class Account 7 | { 8 | [JsonPropertyName("ir_dollars")] 9 | public decimal IRacingDollars { get; set; } 10 | 11 | [JsonPropertyName("ir_credits")] 12 | public decimal IRacingCredits { get; set; } 13 | 14 | [JsonPropertyName("status")] 15 | public string Status { get; set; } = default!; 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberInfoDuringMaintenanceThrowsAsync/0.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "authcode": "51687dfd-1d8e-4faa-bf72-52cb36e4f762", 5 | "autoLoginSeries": null, 6 | "autoLoginToken": null, 7 | "custId": 123456, 8 | "email": "test.user@example.com", 9 | "ssoCookieDomain": ".iracing.com", 10 | "ssoCookieName": "irsso_membersv2", 11 | "ssoCookiePath": "/", 12 | "ssoCookieValue": "3883fc6a-890c-4c75-981c-84f2f9ebfb41" 13 | } 14 | } -------------------------------------------------------------------------------- /doc/docfx_project/templates/minimal/partials/toc.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | 9 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SeasonStandingsStandingsDetails.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class SeasonStandingsStandingsDetails 7 | { 8 | [JsonPropertyName("driver_standings")] 9 | public SeasonStandingsDriverStandings[] DriverStandings { get; set; } = null!; 10 | [JsonPropertyName("team_standings")] 11 | public SeasonStandingsTeamStandings[] TeamStandings { get; set; } = null!; 12 | } 13 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/ListSeason.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class ListSeason : SeasonBase 7 | { 8 | [JsonPropertyName("series_name")] 9 | public string SeriesName { get; set; } = default!; 10 | 11 | [JsonPropertyName("fixed_setup")] 12 | public bool FixedSetup { get; set; } 13 | 14 | [JsonPropertyName("rookie_season")] 15 | public string? RookieSeason { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/CarClass.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class CarClass 7 | { 8 | [JsonPropertyName("car_class_id")] 9 | public int CarClassId { get; set; } 10 | 11 | [JsonPropertyName("name")] 12 | public string Name { get; set; } = default!; 13 | 14 | [JsonPropertyName("cars_in_class")] 15 | public CarInClass[] CarsInClass { get; set; } = Array.Empty(); 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SeasonStandingsDriver.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class SeasonStandingsDriver 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetCarsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/get/0018ddd2-a9e3-4755-bf38-85b2426851fb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767749&Signature=M4K60q92NbjCdV3zqe9I5fAcObw%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTeamSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/track/get/232ba08f-b086-46f7-a11a-c93a12f5aebb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645791048&Signature=gkN94l6AmLbCenaMpDx0fDVNHl0%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLeagueSeasonsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/get/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMyInfoSucceedsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/track/get/232ba08f-b086-46f7-a11a-c93a12f5aebb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645791048&Signature=gkN94l6AmLbCenaMpDx0fDVNHl0%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTracksSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/track/get/232ba08f-b086-46f7-a11a-c93a12f5aebb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645791048&Signature=gkN94l6AmLbCenaMpDx0fDVNHl0%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLeagueMembershipAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/get/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLookupsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeriesAssetsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/track/get/232ba08f-b086-46f7-a11a-c93a12f5aebb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645791048&Signature=gkN94l6AmLbCenaMpDx0fDVNHl0%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTrackAssetsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/track/assets/f5a58d32-ce35-4cd5-8cfc-bfd958c03ea9?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645894755&Signature=dRfQwwMkCjrrkREGmi9EMOFjMyM%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ListSeasonsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/season/list/c65c1ccc-6bbc-4f27-baa2-0a3d8e7a712c?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1658131480&Signature=pKqMTJke3llxd70qRhpjGO6HEq4%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/CombinedSessionsResult.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class CombinedSessionsResult : HostedSessionsResult 7 | { 8 | [JsonPropertyName("sequence")] 9 | public int Sequence { get; set; } 10 | } 11 | 12 | [JsonSerializable(typeof(CombinedSessionsResult)), JsonSourceGenerationOptions(WriteIndented = true)] 13 | internal partial class CombinedSessionsResultContext : JsonSerializerContext 14 | { } 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetCarClassesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetCategoriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": [ 8 | { 9 | "label": "Oval", 10 | "value": 1 11 | }, 12 | { 13 | "label": "Road", 14 | "value": 2 15 | }, 16 | { 17 | "label": "Dirt oval", 18 | "value": 3 19 | }, 20 | { 21 | "label": "Dirt road", 22 | "value": 4 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetHostedSessionsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/get/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLicenseLookupsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberRecapSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetRaceGuideSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/season/race_guide/d7414c9a-1934-46cd-ad02-ea908778632d?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645884239&Signature=tr%2BFob9niIRmAvqlHrXdcCRyNdI%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ListHostedSessionsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/season/list/c65c1ccc-6bbc-4f27-baa2-0a3d8e7a712c?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1658131480&Signature=pKqMTJke3llxd70qRhpjGO6HEq4%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/SearchDriversSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/lookup/drivers/d7414c9a-1934-46cd-ad02-ea908778632d?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645884239&Signature=tr%2BFob9niIRmAvqlHrXdcCRyNdI%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetBestLapStatisticsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetCarAssetDetailsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetCountriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/lookup/club_history/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetEventTypesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": [ 8 | { 9 | "label": "Practice", 10 | "value": 2 11 | }, 12 | { 13 | "label": "Qualify", 14 | "value": 3 15 | }, 16 | { 17 | "label": "Time Trial", 18 | "value": 4 19 | }, 20 | { 21 | "label": "Race", 22 | "value": 5 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLeaguePointsSystemsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/get/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLeagueWithLicensesSucceedsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/get/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLookupWithExpiredAuthWorksAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLookupWithExpiredAuthWorksAsync/4.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberChartDataSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/member/chart_data/0018ddd2-a9e3-4755-bf38-85b2426851fb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767749&Signature=M4K60q92NbjCdV3zqe9I5fAcObw%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberSummarySuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/member_summary/0018ddd2-a9e3-4755-bf38-85b2426851fb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767749&Signature=M4K60q92NbjCdV3zqe9I5fAcObw%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetPastSeasonsForSeriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/track/get/232ba08f-b086-46f7-a11a-c93a12f5aebb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645791048&Signature=gkN94l6AmLbCenaMpDx0fDVNHl0%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonsWithSeriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/series/seasons/d7414c9a-1934-46cd-ad02-ea908778632d?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645884239&Signature=tr%2BFob9niIRmAvqlHrXdcCRyNdI%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetDriverInfoWithLicensesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetHostedSessionsCombinedSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/get/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLeagueSeasonSessionsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/season_sessions/82f20f4d-c705-465b-9e88-bb1d6cd548d9?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1663955915&Signature=Lg6AsOBIuXUuRzEq4trkQiEQm%2Bo%3D", 9 | "expires": "2022-09-23T18:11:35.816Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberDivisionSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/member_division/0018ddd2-a9e3-4755-bf38-85b2426851fb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767749&Signature=M4K60q92NbjCdV3zqe9I5fAcObw%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberParticipationCreditsSucceedsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberYearlyStatisticsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonsWithoutSeriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/series/seasons/73dc0144-5554-4705-828c-13c9b01c5f1c?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645884203&Signature=T2%2FW9he4dOb8Qg1i8%2FiVcJRBNcE%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetStatisticsSeriesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/series/stats_series/d7414c9a-1934-46cd-ad02-ea908778632d?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1645884239&Signature=tr%2BFob9niIRmAvqlHrXdcCRyNdI%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSubSessionResultForLeagueSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/results/get/69eb734d-a7f1-4475-bbce-6e4e3337248d?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1655811173&Signature=7cjGc39zWldbnl7KaEGZgflLNQE%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTeamSubsessionLapsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/results/lap_data/ebe34343-9f56-4f28-97fe-92469cb11e8e?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1647093646&Signature=wLLG8dsc1IhdWLv0FKa9HkLonXY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ListHostedSessionsCombinedSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/season/list/c65c1ccc-6bbc-4f27-baa2-0a3d8e7a712c?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1658131480&Signature=pKqMTJke3llxd70qRhpjGO6HEq4%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/SearchLeagueDirectorySuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/directory/69eb734d-a7f1-4475-bbce-6e4e3337248d?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1655811173&Signature=7cjGc39zWldbnl7KaEGZgflLNQE%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetCustomerLeagueSessionsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/league/cust_league_sessions/bcfec173-310c-4d21-bb20-ea019c676113?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1680985284&Signature=LzOPNlJW2ERiatDbm1e%2Bw9qCpOQ%3D", 9 | "expires": "2023-04-08T20:28:49.471Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetDriverInfoWithoutLicensesSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/car/assets/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonTeamStandingsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/season_tt_results/7102a7ba-96d1-4a3c-8b20-b3587aea9a3a?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1649859657&Signature=QnO9649RGANrxaRAm9PijCCtuPM%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSingleDriverSubsessionLapsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/results/lap_data/ebe34343-9f56-4f28-97fe-92469cb11e8e?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1647093646&Signature=wLLG8dsc1IhdWLv0FKa9HkLonXY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSubSessionLapChartSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/results/lap_chart_data/ebe34343-9f56-4f28-97fe-92469cb11e8e?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1647093646&Signature=wLLG8dsc1IhdWLv0FKa9HkLonXY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSubsessionEventLogSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/results/lap_chart_data/ebe34343-9f56-4f28-97fe-92469cb11e8e?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1647093646&Signature=wLLG8dsc1IhdWLv0FKa9HkLonXY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetWorldRecordStatisticsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/member_division/0018ddd2-a9e3-4755-bf38-85b2426851fb?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767749&Signature=M4K60q92NbjCdV3zqe9I5fAcObw%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetLeagueWithoutLicensesSucceedsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/member_recent_races/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberRecentRacesSucceedsAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/member_recent_races/e0a56003-c609-4a0e-a1d2-8fc4dcab92a6?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1642767750&Signature=XpwNF2L921Ry%2Frr%2FbATcfi2TyHY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonTimeTrialResultsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/season_tt_results/7102a7ba-96d1-4a3c-8b20-b3587aea9a3a?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1649859657&Signature=QnO9649RGANrxaRAm9PijCCtuPM%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonTimeTrialStandingsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/season_tt_results/7102a7ba-96d1-4a3c-8b20-b3587aea9a3a?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1649859657&Signature=QnO9649RGANrxaRAm9PijCCtuPM%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Constants/Division.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Constants; 5 | 6 | public class Division 7 | { 8 | [JsonPropertyName("label")] 9 | public string Label { get; set; } = null!; 10 | 11 | [JsonPropertyName("value")] 12 | public int Value { get; set; } 13 | } 14 | 15 | [JsonSerializable(typeof(Division[])), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class DivisionArrayContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/TimeAttack/TimeAttackScheduleIndex.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.TimeAttack; 5 | 6 | public class TimeAttackScheduleIndex 7 | { 8 | [JsonPropertyName("ta_schedule_filename")] 9 | public string ScheduleFilename { get; set; } = default!; 10 | } 11 | 12 | [JsonSerializable(typeof(TimeAttackScheduleIndex)), JsonSourceGenerationOptions(WriteIndented = true)] 13 | internal partial class TimeAttackScheduleIndexContext : JsonSerializerContext 14 | { } 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonQualifyResultsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/stats/season_driver_standings/7102a7ba-96d1-4a3c-8b20-b3587aea9a3a?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1649859657&Signature=QnO9649RGANrxaRAm9PijCCtuPM%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSpectatorSubsessionIdentifiersAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/season/spectator_subsessionids/94d3ae74-7419-43ca-910b-d46f9b667b2e?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1647093646&Signature=wLLG8dsc1IhdWLv0FKa9HkLonXY%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/LinkResult.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public sealed class LinkResult 7 | { 8 | [JsonPropertyName("link")] 9 | public string Link { get; set; } = default!; 10 | [JsonPropertyName("expires")] 11 | public DateTimeOffset? Expires { get; set; } 12 | } 13 | 14 | [JsonSerializable(typeof(LinkResult)), JsonSourceGenerationOptions(WriteIndented = true)] 15 | public partial class LinkResultContext : JsonSerializerContext 16 | { } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTimeAttackMemberSeasonResultsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "link": "https://scorpio-assets.s3.amazonaws.com/production/data-server/cache/data-services/time_attack/member_season_results/27573555-f3c4-4f9b-a67b-e1737205e7bf?AWSAccessKeyId=AKIAUO6OO4A3357USLO7&Expires=1675863384&Signature=xHlFy1GDbUrkvs1A1d4fMSslFU4%3D", 9 | "expires": "2022-08-27T11:23:19.507Z" 10 | } 11 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/CarsInClass.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class CarsInClass 7 | { 8 | [JsonPropertyName("car_dirpath")] 9 | public string CarDirpath { get; set; } = default!; 10 | 11 | [JsonPropertyName("car_id")] 12 | public int CarId { get; set; } 13 | 14 | [JsonPropertyName("rain_enabled")] 15 | public bool RainEnabled { get; set; } 16 | 17 | [JsonPropertyName("retired")] 18 | public bool Retired { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/ClubHistoryLookup.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Lookups; 2 | 3 | public class ClubHistoryLookup 4 | { 5 | public int ClubId { get; set; } 6 | public string ClubName { get; set; } = default!; 7 | public int SeasonYear { get; set; } 8 | public int SeasonQuarter { get; set; } 9 | public string Region { get; set; } = default!; 10 | } 11 | 12 | [JsonSerializable(typeof(ClubHistoryLookup[])), JsonSourceGenerationOptions(WriteIndented = true)] 13 | internal partial class ClubHistoryLookupArrayContext : JsonSerializerContext 14 | { } 15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/ErrorResponse.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class ErrorResponse 7 | { 8 | [JsonPropertyName("error")] 9 | public string? ErrorCode { get; set; } 10 | 11 | [JsonPropertyName("note")] 12 | public string? Note { get; set; } 13 | 14 | [JsonPropertyName("message")] 15 | public string? Message { get; set; } 16 | 17 | [JsonPropertyName("error_description")] 18 | public string? ErrorDescription { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/Farm.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class Farm 7 | { 8 | [JsonPropertyName("farm_id")] 9 | public int FarmId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("image_path")] 15 | public string ImagePath { get; set; } = default!; 16 | 17 | [JsonPropertyName("displayed")] 18 | public bool Displayed { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/Country.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | public class Country 7 | { 8 | [JsonPropertyName("country_name")] 9 | public string Name { get; set; } = default!; 10 | 11 | [JsonPropertyName("country_code")] 12 | public string Code { get; set; } = default!; 13 | } 14 | 15 | [JsonSerializable(typeof(Country[])), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class CountryArrayContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/LookupValue.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | public class LookupValue 7 | { 8 | [JsonPropertyName("value")] 9 | public string Value { get; set; } = default!; 10 | 11 | [JsonPropertyName("name")] 12 | public string Name { get; set; } = default!; 13 | 14 | [JsonPropertyName("description")] 15 | public string Description { get; set; } = default!; 16 | 17 | [JsonPropertyName("seq")] 18 | public int Sequence { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /doc/docfx_project/templates/minimal/partials/footer.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 |
4 |
5 | 14 |
15 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/CategorizedTag.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class CategorizedTag 7 | { 8 | [JsonPropertyName("category_id")] 9 | public int CategoryId { get; set; } 10 | 11 | [JsonPropertyName("name")] 12 | public string Name { get; set; } = null!; 13 | 14 | [JsonPropertyName("limit")] 15 | public object? Limit { get; set; } 16 | 17 | [JsonPropertyName("tags")] 18 | public TagValue[] Tags { get; set; } = Array.Empty(); 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SessionCar.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class SessionCar 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("car_name")] 12 | public string CarName { get; set; } = default!; 13 | 14 | [JsonPropertyName("car_class_id")] 15 | public int CarClassId { get; set; } 16 | 17 | [JsonPropertyName("car_class_name")] 18 | public string CarClassName { get; set; } = default!; 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/MemberCareer.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class MemberCareer 7 | { 8 | [JsonPropertyName("stats")] 9 | public MemberCareerStatistics[] Statistics { get; set; } = default!; 10 | 11 | [JsonPropertyName("cust_id")] 12 | public int CustomerId { get; set; } 13 | } 14 | 15 | [JsonSerializable(typeof(MemberCareer)), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class MemberCareerContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/MemberRecentRaces.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | public class MemberRecentRaces 6 | { 7 | [JsonPropertyName("races")] 8 | public Race[] Races { get; set; } = Array.Empty(); 9 | 10 | [JsonPropertyName("cust_id")] 11 | public int CustomerId { get; set; } 12 | } 13 | 14 | [JsonSerializable(typeof(MemberRecentRaces)), JsonSourceGenerationOptions(WriteIndented = true)] 15 | internal partial class MemberRecentRacesContext : JsonSerializerContext 16 | { } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/LookupGroup.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | public class LookupGroup 7 | { 8 | [JsonPropertyName("tag")] 9 | public string Tag { get; set; } = default!; 10 | 11 | [JsonPropertyName("lookups")] 12 | public Lookup[] Lookups { get; set; } = Array.Empty(); 13 | } 14 | 15 | [JsonSerializable(typeof(LookupGroup[])), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class LookupGroupArrayContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/Summary.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class MemberSummary 7 | { 8 | [JsonPropertyName("this_year")] 9 | public MemberSummaryYearStatistics YearStatistics { get; set; } = null!; 10 | 11 | [JsonPropertyName("cust_id")] 12 | public int CustomerId { get; set; } 13 | } 14 | 15 | [JsonSerializable(typeof(MemberSummary)), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class MemberSummaryContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/HostedSessionWeather.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class HostedSessionWeather : Weather 7 | { 8 | [JsonPropertyName("simulated_start_time")] 9 | public DateTime SimulatedStartTime { get; set; } 10 | 11 | [JsonPropertyName("simulated_time_offsets")] 12 | public int[] SimulatedTimeOffsets { get; set; } = Array.Empty(); 13 | 14 | [JsonPropertyName("simulated_time_multiplier")] 15 | public int SimulatedTimeMultiplier { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SeasonStandingsTeam.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class SeasonStandingsTeam 7 | { 8 | [JsonPropertyName("team_id")] 9 | public int TeamId { get; set; } 10 | 11 | [JsonPropertyName("owner_id")] 12 | public int OwnerId { get; set; } 13 | 14 | [JsonPropertyName("team_name")] 15 | public string TeamName { get; set; } = null!; 16 | 17 | [JsonPropertyName("owner")] 18 | public SeasonStandingsDriver Owner { get; set; } = null!; 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/Licenses.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class Licenses 7 | { 8 | [JsonPropertyName("oval")] 9 | public LicenseInfo Oval { get; set; } = default!; 10 | 11 | [JsonPropertyName("road")] 12 | public LicenseInfo Road { get; set; } = default!; 13 | 14 | [JsonPropertyName("dirt_oval")] 15 | public LicenseInfo DirtOval { get; set; } = default!; 16 | 17 | [JsonPropertyName("dirt_road")] 18 | public LicenseInfo DirtRoad { get; set; } = default!; 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/MemberBest.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Aydsko.iRacingData.Converters; 5 | 6 | namespace Aydsko.iRacingData.Member; 7 | 8 | public class MemberBest 9 | { 10 | [JsonPropertyName("track")] 11 | public Track Track { get; set; } = default!; 12 | 13 | [JsonPropertyName("event_type")] 14 | public string EventType { get; set; } = default!; 15 | 16 | [JsonPropertyName("best_lap_time"), JsonConverter(typeof(TenThousandthSecondDurationConverter))] 17 | public TimeSpan? BestLapTime { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/AllowedLicenses.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class AllowedLicenses 7 | { 8 | [JsonPropertyName("license_group")] 9 | public int LicenseGroup { get; set; } 10 | 11 | [JsonPropertyName("min_license_level")] 12 | public int MinLicenseLevel { get; set; } 13 | 14 | [JsonPropertyName("max_license_level")] 15 | public int MaxLicenseLevel { get; set; } 16 | 17 | [JsonPropertyName("group_name")] 18 | public string GroupName { get; set; } = default!; 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/WorldRecordsHeader.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class WorldRecordsHeader 7 | { 8 | [JsonPropertyName("type")] 9 | public string ResultType { get; set; } = default!; 10 | 11 | [JsonPropertyName("data")] 12 | public WorldRecordsHeaderInfo Data { get; set; } = default!; 13 | } 14 | 15 | [JsonSerializable(typeof(WorldRecordsHeader)), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class WorldRecordsHeaderContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/Activity.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class Activity 7 | { 8 | [JsonPropertyName("recent_30days_count")] 9 | public int Recent30DaysCount { get; set; } 10 | 11 | [JsonPropertyName("prev_30days_count")] 12 | public int Previous30DaysCount { get; set; } 13 | 14 | [JsonPropertyName("consecutive_weeks")] 15 | public int ConsecutiveWeeks { get; set; } 16 | 17 | [JsonPropertyName("most_consecutive_weeks")] 18 | public int MostConsecutiveWeeks { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/Livery.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class Livery 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("pattern")] 12 | public int Pattern { get; set; } 13 | 14 | [JsonPropertyName("color1")] 15 | public string Color1 { get; set; } = null!; 16 | 17 | [JsonPropertyName("color2")] 18 | public string Color2 { get; set; } = null!; 19 | 20 | [JsonPropertyName("color3")] 21 | public string Color3 { get; set; } = null!; 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/MemberYearlyStatistics.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class MemberYearlyStatistics 7 | { 8 | [JsonPropertyName("stats")] 9 | public YearlyStatistics[] Statistics { get; set; } = Array.Empty(); 10 | 11 | [JsonPropertyName("cust_id")] 12 | public int CustomerId { get; set; } 13 | } 14 | 15 | [JsonSerializable(typeof(MemberYearlyStatistics)), JsonSourceGenerationOptions(WriteIndented = true)] 16 | internal partial class MemberYearlyStatisticsContext : JsonSerializerContext 17 | { } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/StatisticsSeason.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class StatisticsSeason : SeasonBase 7 | { 8 | [JsonPropertyName("season_short_name")] 9 | public string SeasonShortName { get; set; } = default!; 10 | 11 | [JsonPropertyName("active")] 12 | public bool Active { get; set; } 13 | 14 | [JsonPropertyName("car_classes")] 15 | public CarClass[] CarClasses { get; set; } = default!; 16 | 17 | [JsonPropertyName("race_weeks")] 18 | public RaceWeeks[] RaceWeeks { get; set; } = default!; 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/RecapFavoriteCar.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Stats; 2 | 3 | /// The member's favorite car in the recap period. 4 | public class RecapFavoriteCar 5 | { 6 | /// Unique identifier for the car. 7 | [JsonPropertyName("car_id")] 8 | public int CarId { get; set; } 9 | 10 | /// Name of the car. 11 | [JsonPropertyName("car_name")] 12 | public string CarName { get; set; } = default!; 13 | 14 | /// URL pointing to an image of the car. 15 | [JsonPropertyName("car_image")] 16 | public Uri CarImageUrl { get; set; } = default!; 17 | } 18 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/Suit.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class Suit 7 | { 8 | [JsonPropertyName("pattern")] 9 | public int Pattern { get; set; } 10 | 11 | [JsonPropertyName("color1")] 12 | public string Color1 { get; set; } = default!; 13 | 14 | [JsonPropertyName("color2")] 15 | public string Color2 { get; set; } = default!; 16 | 17 | [JsonPropertyName("color3")] 18 | public string Color3 { get; set; } = default!; 19 | 20 | [JsonPropertyName("body_type")] 21 | public int? BodyType { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/TeamMember.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class TeamMember 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | 17 | [JsonPropertyName("owner")] 18 | public bool Owner { get; set; } 19 | 20 | [JsonPropertyName("admin")] 21 | public bool Admin { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/ProfileField.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class ProfileField 7 | { 8 | [JsonPropertyName("field_id")] 9 | public int FieldId { get; set; } 10 | 11 | [JsonPropertyName("name")] 12 | public string Name { get; set; } = default!; 13 | 14 | [JsonPropertyName("value")] 15 | public string Value { get; set; } = default!; 16 | 17 | [JsonPropertyName("editable")] 18 | public bool Editable { get; set; } 19 | 20 | [JsonPropertyName("label")] 21 | public string Label { get; set; } = default!; 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/Owner.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class Owner 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = null!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = null!; 16 | 17 | [JsonPropertyName("car_number")] 18 | public string? CarNumber { get; set; } 19 | 20 | [JsonPropertyName("nick_name")] 21 | public string? NickName { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/MemberSummaryYearStatistics.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class MemberSummaryYearStatistics 7 | { 8 | [JsonPropertyName("num_official_sessions")] 9 | public int NumberOfOfficialSessions { get; set; } 10 | 11 | [JsonPropertyName("num_league_sessions")] 12 | public int NumberOfLeagueSessions { get; set; } 13 | 14 | [JsonPropertyName("num_official_wins")] 15 | public int NumberOfOfficialWins { get; set; } 16 | 17 | [JsonPropertyName("num_league_wins")] 18 | public int NumberOfLeagueWins { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Results/ResultsGetTest.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.IntegrationTests.Results; 5 | 6 | internal sealed class ResultsGetTest : DataClientIntegrationFixture 7 | { 8 | [Test] 9 | public async Task GivenAValidSubsessionIdThenAResultIsReturnedAsync() 10 | { 11 | var results = await Client.GetSubSessionResultAsync(50033865, true).ConfigureAwait(false); 12 | 13 | Assert.Multiple(() => 14 | { 15 | Assert.That(results, Is.Not.Null); 16 | Assert.That(results.Data, Is.Not.Null); 17 | }); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/ListOfSeasons.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class ListOfSeasons 7 | { 8 | [JsonPropertyName("season_year")] 9 | public int SeasonYear { get; set; } 10 | 11 | [JsonPropertyName("season_quarter")] 12 | public int SeasonQuarter { get; set; } 13 | 14 | [JsonPropertyName("seasons")] 15 | public ListSeason[] Seasons { get; set; } = default!; 16 | } 17 | 18 | [JsonSerializable(typeof(ListOfSeasons)), JsonSourceGenerationOptions(WriteIndented = true)] 19 | internal partial class ListOfSeasonsContext : JsonSerializerContext 20 | { } 21 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/WorldRecordsHeaderInfo.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class WorldRecordsHeaderInfo 7 | { 8 | [JsonPropertyName("success")] 9 | public bool Success { get; set; } 10 | 11 | [JsonPropertyName("car_id")] 12 | public int CarId { get; set; } 13 | 14 | [JsonPropertyName("track_id")] 15 | public int TrackId { get; set; } 16 | 17 | [JsonPropertyName("chunk_info")] 18 | public ChunkInfo ChunkInfo { get; set; } = default!; 19 | 20 | [JsonPropertyName("last_updated")] 21 | public DateTime LastUpdated { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/PointsSystem.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Leagues; 2 | 3 | public class PointsSystem 4 | { 5 | [JsonPropertyName("points_system_id")] 6 | public int PointsSystemId { get; set; } 7 | 8 | [JsonPropertyName("name")] 9 | public string Name { get; set; } = default!; 10 | 11 | [JsonPropertyName("description")] 12 | public string Description { get; set; } = default!; 13 | 14 | [JsonPropertyName("league_id")] 15 | public int LeagueId { get; set; } 16 | 17 | [JsonPropertyName("retired")] 18 | public bool Retired { get; set; } 19 | 20 | [JsonPropertyName("iracing_system")] 21 | public bool IRacingSystem { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/DriverInfoResponse.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class DriverInfoResponse 7 | { 8 | [JsonPropertyName("success")] 9 | public bool Success { get; set; } 10 | 11 | [JsonPropertyName("cust_ids")] 12 | public int[] CustomerIds { get; set; } = []; 13 | 14 | [JsonPropertyName("members")] 15 | public DriverInfo[] Drivers { get; set; } = []; 16 | } 17 | 18 | [JsonSerializable(typeof(DriverInfoResponse)), JsonSourceGenerationOptions(WriteIndented = true)] 19 | internal partial class DriverInfoResponseContext : JsonSerializerContext 20 | { } 21 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/DriverSearchResult.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | public class DriverSearchResult 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | } 17 | 18 | [JsonSerializable(typeof(DriverSearchResult[])), JsonSourceGenerationOptions(WriteIndented = true)] 19 | internal partial class DriverSearchResultContext : JsonSerializerContext 20 | { } 21 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/AllowedLicenses.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class AllowedLicenses 7 | { 8 | [JsonPropertyName("parent_id")] 9 | public int ParentId { get; set; } 10 | 11 | [JsonPropertyName("license_group")] 12 | public int LicenseGroup { get; set; } 13 | 14 | [JsonPropertyName("min_license_level")] 15 | public int MinLicenseLevel { get; set; } 16 | 17 | [JsonPropertyName("max_license_level")] 18 | public int MaxLicenseLevel { get; set; } 19 | 20 | [JsonPropertyName("group_name")] 21 | public string GroupName { get; set; } = default!; 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/HostedSessionsResult.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class HostedSessionsResult 7 | { 8 | [JsonPropertyName("subscribed")] 9 | public bool Subscribed { get; set; } 10 | 11 | [JsonPropertyName("sessions")] 12 | public Session[] Sessions { get; set; } = Array.Empty(); 13 | 14 | [JsonPropertyName("success")] 15 | public bool Success { get; set; } 16 | } 17 | 18 | [JsonSerializable(typeof(HostedSessionsResult)), JsonSourceGenerationOptions(WriteIndented = true)] 19 | internal partial class HostedSessionsResultContext : JsonSerializerContext 20 | { } 21 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/SubsessionEventLogHeader.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class SubsessionEventLogHeader 7 | { 8 | [JsonPropertyName("success")] 9 | public bool Success { get; set; } 10 | 11 | [JsonPropertyName("session_info")] 12 | public SessionInfo SessionInfo { get; set; } = null!; 13 | 14 | [JsonPropertyName("chunk_info")] 15 | public ChunkInfo ChunkInfo { get; set; } = null!; 16 | } 17 | 18 | [JsonSerializable(typeof(SubsessionEventLogHeader)), JsonSourceGenerationOptions(WriteIndented = true)] 19 | internal partial class SubsessionEventLogHeaderContext : JsonSerializerContext 20 | { } 21 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/Helmet.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class Helmet 7 | { 8 | [JsonPropertyName("pattern")] 9 | public int Pattern { get; set; } 10 | 11 | [JsonPropertyName("color1")] 12 | public string Color1 { get; set; } = null!; 13 | 14 | [JsonPropertyName("color2")] 15 | public string Color2 { get; set; } = null!; 16 | 17 | [JsonPropertyName("color3")] 18 | public string Color3 { get; set; } = null!; 19 | 20 | [JsonPropertyName("face_type")] 21 | public int FaceType { get; set; } 22 | 23 | [JsonPropertyName("helmet_type")] 24 | public int HelmetType { get; set; } 25 | } 26 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/MemberBests.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class MemberBests 7 | { 8 | [JsonPropertyName("cars_driven")] 9 | public CarsDriven[] CarsDriven { get; set; } = default!; 10 | 11 | [JsonPropertyName("bests")] 12 | public MemberBest[] Bests { get; set; } = default!; 13 | 14 | [JsonPropertyName("car_id")] 15 | public int CarId { get; set; } 16 | 17 | [JsonPropertyName("cust_id")] 18 | public int CustomerId { get; set; } 19 | } 20 | 21 | [JsonSerializable(typeof(MemberBests)), JsonSourceGenerationOptions(WriteIndented = true)] 22 | internal partial class MemberBestsContext : JsonSerializerContext 23 | { } 24 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/Track.cs: -------------------------------------------------------------------------------- 1 | // © 2024 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Aydsko.iRacingData.Converters; 5 | 6 | namespace Aydsko.iRacingData.Common; 7 | 8 | public class Track 9 | { 10 | [JsonPropertyName("track_id")] 11 | public int TrackId { get; set; } 12 | 13 | [JsonPropertyName("track_name")] 14 | public string TrackName { get; set; } = default!; 15 | 16 | [JsonPropertyName("config_name"), JsonConverter(typeof(TrackConfigNameNaConverter))] 17 | public string? ConfigName { get; set; } = default!; 18 | 19 | [JsonPropertyName("category_id")] 20 | public int? CategoryId { get; set; } 21 | 22 | [JsonPropertyName("category")] 23 | public string? Category { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/DriverStatisticsCsvFile.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Stats; 2 | 3 | /// Represents a comma separated value (CSV) file containing statistics about a category of drivers. 4 | /// 5 | /// 6 | public class DriverStatisticsCsvFile 7 | { 8 | /// The Category Id value used to retrieve these statistics. 9 | public int CategoryId { get; set; } 10 | 11 | /// The name of the file. 12 | public string FileName { get; set; } = default!; 13 | 14 | /// Content of the CSV file. 15 | public byte[] ContentBytes { get; set; } = default!; 16 | } 17 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/IAuthenticatingHttpClient.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData; 2 | 3 | public interface IAuthenticatingHttpClient 4 | { 5 | Task SendAsync(HttpRequestMessage request, 6 | HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead, 7 | CancellationToken cancellationToken = default); 8 | Task SendAuthenticatedRequestAsync(HttpRequestMessage request, 9 | HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead, 10 | CancellationToken cancellationToken = default); 11 | void ClearLoggedInState(); 12 | } 13 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/LeaguePointsSystems.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class LeaguePointsSystems 7 | { 8 | [JsonPropertyName("subscribed")] 9 | public bool Subscribed { get; set; } 10 | 11 | [JsonPropertyName("success")] 12 | public bool Success { get; set; } 13 | 14 | [JsonPropertyName("points_systems")] 15 | public PointsSystem[] PointsSystems { get; set; } = default!; 16 | 17 | [JsonPropertyName("league_id")] 18 | public int LeagueId { get; set; } 19 | } 20 | 21 | [JsonSerializable(typeof(LeaguePointsSystems)), JsonSourceGenerationOptions(WriteIndented = true)] 22 | internal partial class LeaguePointsSystemsContext : JsonSerializerContext 23 | { } 24 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetDriverInfoWithoutLicensesSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "success": true, 5 | "cust_ids": [ 6 | 341554 7 | ], 8 | "members": [ 9 | { 10 | "cust_id": 341554, 11 | "display_name": "Adrian Clark", 12 | "helmet": { 13 | "pattern": 50, 14 | "color1": "981f24", 15 | "color2": "000000", 16 | "color3": "ed2129", 17 | "face_type": 4, 18 | "helmet_type": 0 19 | }, 20 | "last_login": "2025-09-23T20:25:41.669788164Z", 21 | "member_since": "2018-09-30", 22 | "flair_id": 16, 23 | "flair_name": "Australia", 24 | "flair_shortname": "AUS", 25 | "ai": false 26 | } 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | global using System.Text.Json.Serialization; 5 | global using Aydsko.iRacingData.Common; 6 | global using Microsoft.Extensions.Logging; 7 | 8 | // Compatibility shim for IsExternalInit - https://mking.net/blog/error-cs0518-isexternalinit-not-defined 9 | #if NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NETCOREAPP3_0 || NETCOREAPP3_1 || NET45 || NET451 || NET452 || NET6 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48 10 | 11 | using System.ComponentModel; 12 | 13 | namespace System.Runtime.CompilerServices 14 | { 15 | [EditorBrowsable(EditorBrowsableState.Never)] 16 | internal static class IsExternalInit { } 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Tracks/TrackMapLayers.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Tracks; 5 | 6 | public class MapLayers 7 | { 8 | [JsonPropertyName("background")] 9 | public string Background { get; set; } = default!; 10 | 11 | [JsonPropertyName("inactive")] 12 | public string Inactive { get; set; } = default!; 13 | 14 | [JsonPropertyName("active")] 15 | public string Active { get; set; } = default!; 16 | 17 | [JsonPropertyName("pitroad")] 18 | public string PitRoad { get; set; } = default!; 19 | 20 | [JsonPropertyName("start-finish")] 21 | public string StartFinish { get; set; } = default!; 22 | 23 | [JsonPropertyName("turns")] 24 | public string Turns { get; set; } = default!; 25 | } 26 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/LeagueDirectoryResultPage.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Leagues; 2 | 3 | public class LeagueDirectoryResultPage 4 | { 5 | [JsonPropertyName("results_page")] 6 | public LeagueDirectoryResultItem[] Items { get; set; } = default!; 7 | 8 | [JsonPropertyName("success")] 9 | public bool Success { get; set; } 10 | 11 | [JsonPropertyName("lowerbound")] 12 | public int Lowerbound { get; set; } 13 | 14 | [JsonPropertyName("upperbound")] 15 | public int Upperbound { get; set; } 16 | 17 | [JsonPropertyName("row_count")] 18 | public int RowCount { get; set; } 19 | } 20 | 21 | [JsonSerializable(typeof(LeagueDirectoryResultPage)), JsonSourceGenerationOptions(WriteIndented = true)] 22 | internal partial class LeagueDirectoryResultPageContext : JsonSerializerContext 23 | { } 24 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/ResultsCarClasses.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class ResultsCarClasses 7 | { 8 | [JsonPropertyName("car_class_id")] 9 | public int CarClassId { get; set; } 10 | 11 | [JsonPropertyName("cars_in_class")] 12 | public CarsInClass[] CarsInClass { get; set; } = default!; 13 | 14 | [JsonPropertyName("name")] 15 | public string Name { get; set; } = default!; 16 | 17 | [JsonPropertyName("short_name")] 18 | public string ShortName { get; set; } = default!; 19 | 20 | [JsonPropertyName("strength_of_field")] 21 | public int StrengthOfField { get; set; } 22 | 23 | [JsonPropertyName("num_entries")] 24 | public int NumberOfEntries { get; set; } 25 | } 26 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonTeamStandingsSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "success": true, 5 | "season_id": 3591, 6 | "season_name": "2022 BMW Sim GT Cup - 2022 Season 1", 7 | "season_short_name": "2022 Season 1", 8 | "series_id": 437, 9 | "series_name": "BMW Sim GT Cup", 10 | "car_class_id": 2742, 11 | "race_week_num": 0, 12 | "chunk_info": { 13 | "chunk_size": 500, 14 | "num_chunks": 1, 15 | "rows": 192, 16 | "base_download_url": "https://dqfp1ltauszrc.cloudfront.net/public/standings/season/3591/season-team/2742/0/", 17 | "chunk_file_names": [ 18 | "9e17a1f861bb39cd1db4485a521fedcab9c67aba7c9416051e0873ea310aeb15.json" 19 | ] 20 | }, 21 | "last_updated": "2022-04-14T11:49:52.178026Z" 22 | } 23 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/TestLegacyUsernamePasswordApiClient.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | using System.Net.Http; 3 | using Microsoft.Extensions.Logging; 4 | 5 | namespace Aydsko.iRacingData.UnitTests; 6 | 7 | /// Wraps the real to give test access to internal members. 8 | internal sealed class TestLegacyUsernamePasswordApiClient(HttpClient httpClient, 9 | iRacingDataClientOptions options, 10 | CookieContainer cookieContainer, 11 | ILogger logger) 12 | : LegacyUsernamePasswordApiClient(httpClient, options, cookieContainer, logger) 13 | { 14 | public bool IsLoggedIn => isLoggedIn; 15 | } 16 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/LeagueSeasons.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class LeagueSeasons 7 | { 8 | [JsonPropertyName("subscribed")] 9 | public bool Subscribed { get; set; } 10 | 11 | [JsonPropertyName("seasons")] 12 | public Season[] Seasons { get; set; } = []; 13 | 14 | [JsonPropertyName("success")] 15 | public bool Success { get; set; } 16 | 17 | [JsonPropertyName("retired")] 18 | public bool Retired { get; set; } 19 | 20 | [JsonPropertyName("league_id")] 21 | public int LeagueId { get; set; } 22 | } 23 | 24 | [JsonSerializable(typeof(LeagueSeasons)), JsonSourceGenerationOptions(WriteIndented = true)] 25 | internal partial class LeagueSeasonsContext : JsonSerializerContext 26 | { } 27 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/MemberDivision.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Stats; 5 | 6 | public class MemberDivision 7 | { 8 | [JsonPropertyName("division")] 9 | public int Division { get; set; } 10 | 11 | [JsonPropertyName("projected")] 12 | public bool Projected { get; set; } 13 | 14 | [JsonPropertyName("event_type")] 15 | public EventType EventType { get; set; } 16 | 17 | [JsonPropertyName("success")] 18 | public bool Success { get; set; } 19 | 20 | [JsonPropertyName("season_id")] 21 | public int SeasonId { get; set; } 22 | } 23 | 24 | [JsonSerializable(typeof(MemberDivision)), JsonSourceGenerationOptions(WriteIndented = true)] 25 | internal partial class MemberDivisionContext : JsonSerializerContext 26 | { } 27 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonTimeTrialResultsSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "success": true, 5 | "season_id": 3587, 6 | "season_name": "NASCAR iRacing Class C Series - 2022 Season", 7 | "season_short_name": "2022 Season", 8 | "series_id": 47, 9 | "series_name": "NASCAR iRacing Class C", 10 | "car_class_id": 71, 11 | "race_week_num": 0, 12 | "chunk_info": { 13 | "chunk_size": 500, 14 | "num_chunks": 1, 15 | "rows": 60, 16 | "base_download_url": "https://dqfp1ltauszrc.cloudfront.net/public/standings/season/3587/season-tt-results/71/0/", 17 | "chunk_file_names": [ 18 | "efca3a06da7c7d555083b942692358329ad4c04747a876561cb6a9ff0111585a.json" 19 | ] 20 | }, 21 | "last_updated": "2022-04-14T09:55:34.419277Z" 22 | } 23 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonTimeTrialStandingsSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "success": true, 5 | "season_id": 3587, 6 | "season_name": "NASCAR iRacing Class C Series - 2022 Season", 7 | "season_short_name": "2022 Season", 8 | "series_id": 47, 9 | "series_name": "NASCAR iRacing Class C", 10 | "car_class_id": 71, 11 | "race_week_num": 0, 12 | "chunk_info": { 13 | "chunk_size": 500, 14 | "num_chunks": 1, 15 | "rows": 60, 16 | "base_download_url": "https://dqfp1ltauszrc.cloudfront.net/public/standings/season/3587/season-tt/71/0/", 17 | "chunk_file_names": [ 18 | "feecdbe03d75d62388bdd5ed0942339225f710b7bbb1727c15c3f6d18394ba98.json" 19 | ] 20 | }, 21 | "last_updated": "2022-04-14T10:49:47.626208Z" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/RecapFavoriteTrack.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Stats; 2 | 3 | /// The member's favorite track in the period. 4 | public class RecapFavoriteTrack 5 | { 6 | /// Unique identifier for the track. 7 | [JsonPropertyName("track_id")] 8 | public int TrackId { get; set; } 9 | 10 | /// Name of the track. 11 | [JsonPropertyName("track_name")] 12 | public string TrackName { get; set; } = default!; 13 | 14 | /// Name of the track's configuration. 15 | [JsonPropertyName("config_name")] 16 | public string ConfigName { get; set; } = default!; 17 | 18 | /// URL pointing to an image of the track. 19 | [JsonPropertyName("track_logo")] 20 | public Uri TrackLogoUrl { get; set; } = default!; 21 | } 22 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/ForecastOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Series; 2 | 3 | public class ForecastOptions 4 | { 5 | [JsonPropertyName("forecast_type")] 6 | public int ForecastType { get; set; } 7 | 8 | [JsonPropertyName("precipitation")] 9 | public int Precipitation { get; set; } 10 | 11 | [JsonPropertyName("skies")] 12 | public int Skies { get; set; } 13 | 14 | [JsonPropertyName("stop_precip")] 15 | public int StopPrecip { get; set; } 16 | 17 | [JsonPropertyName("temperature")] 18 | public int Temperature { get; set; } 19 | 20 | [JsonPropertyName("weather_seed")] 21 | public long WeatherSeed { get; set; } 22 | 23 | [JsonPropertyName("wind_dir")] 24 | public int WindDir { get; set; } 25 | 26 | [JsonPropertyName("wind_speed")] 27 | public int WindSpeed { get; set; } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/SuccessfulLogin.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "Set-Cookie": [ 4 | "r_members=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT", 5 | "irsso_members=ABC123DEF456; Max-Age=31536000; Domain=.iracing.com; Path=/;", 6 | "authtoken_members=%7B%22authtoken%22%3A%7B%22authcode%22%3A%22AbC123%22%2C%22email%22%3A%22test.user%40example.com%22%7D%7D; Max-Age=3600; Domain=.iracing.com; Path=/;" 7 | ] 8 | }, 9 | "content": { 10 | "authcode": "51687dfd-1d8e-4faa-bf72-52cb36e4f762", 11 | "autoLoginSeries": null, 12 | "autoLoginToken": null, 13 | "custId": 123456, 14 | "email": "test.user@example.com", 15 | "ssoCookieDomain": ".iracing.com", 16 | "ssoCookieName": "irsso_membersv2", 17 | "ssoCookiePath": "/", 18 | "ssoCookieValue": "3883fc6a-890c-4c75-981c-84f2f9ebfb41" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/DataResponse.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class DataResponse 7 | { 8 | /// The current total rate limit. 9 | public int? TotalRateLimit { get; set; } 10 | 11 | /// Amount of rate limit remaining. 12 | public int? RateLimitRemaining { get; set; } 13 | 14 | /// Instant at which the rate limit will be reset. 15 | public DateTimeOffset? RateLimitReset { get; set; } 16 | 17 | /// Indicates when the server's cache of the data will expire. 18 | public DateTimeOffset? DataExpires { get; set; } 19 | 20 | /// Data returned from the API call. 21 | public TData Data { get; set; } = default!; 22 | } 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/RaceWeeks.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class RaceWeeks 7 | { 8 | 9 | [JsonPropertyName("season_id")] 10 | public int SeasonId { get; set; } 11 | 12 | /// An index number identifying the race week. 13 | /// The iRacing Data API works with zero-based race weeks, most people will use one-based. 14 | /// 15 | [JsonPropertyName("race_week_num")] 16 | public int RaceWeekIndex { get; set; } 17 | 18 | /// The number of the race week within the season. 19 | [JsonIgnore] 20 | public int RaceWeekNumber => RaceWeekIndex + 1; 21 | 22 | [JsonPropertyName("track")] 23 | public Track Track { get; set; } = default!; 24 | } 25 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Stats/DriverStatisticsByCategoryCsvTests.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.IntegrationTests.Stats; 2 | 3 | internal sealed class DriverStatisticsByCategoryCsvTests 4 | : DataClientIntegrationFixture 5 | { 6 | [Test] 7 | public async Task TestDriverStatisticsByCategoryCsvAsync() 8 | { 9 | var driverStats = await Client.GetDriverStatisticsByCategoryCsvAsync(4).ConfigureAwait(false); 10 | using (Assert.EnterMultipleScope()) 11 | { 12 | Assert.That(driverStats, Is.Not.Null); 13 | Assert.That(driverStats.FileName, Is.Not.Null.Or.Empty); 14 | Assert.That(driverStats.FileName, Is.EqualTo("Dirt_Road_driver_stats.csv")); 15 | Assert.That(driverStats.ContentBytes, Is.Not.Null); 16 | Assert.That(driverStats.ContentBytes, Is.Not.Empty); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/ChunkInfo.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public interface IChunkInfo 7 | { 8 | string BaseDownloadUrl { get; set; } 9 | string[] ChunkFileNames { get; set; } 10 | int NumberOfChunks { get; set; } 11 | } 12 | 13 | public class ChunkInfo : IChunkInfo 14 | { 15 | [JsonPropertyName("chunk_size")] 16 | public int ChunkSize { get; set; } 17 | 18 | [JsonPropertyName("num_chunks")] 19 | public int NumberOfChunks { get; set; } 20 | 21 | [JsonPropertyName("rows")] 22 | public int Rows { get; set; } 23 | 24 | [JsonPropertyName("base_download_url")] 25 | public string BaseDownloadUrl { get; set; } = null!; 26 | 27 | [JsonPropertyName("chunk_file_names")] 28 | public string[] ChunkFileNames { get; set; } = null!; 29 | } 30 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/CustomerLeagueSessions.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class CustomerLeagueSessions 7 | { 8 | [JsonPropertyName("mine")] 9 | public bool Mine { get; set; } 10 | 11 | [JsonPropertyName("subscribed")] 12 | public bool Subscribed { get; set; } 13 | 14 | [JsonPropertyName("sequence")] 15 | public int Sequence { get; set; } 16 | 17 | [JsonPropertyName("success")] 18 | public bool Success { get; set; } 19 | 20 | [JsonPropertyName("sessions")] 21 | public CustomerLeagueSession[] Sessions { get; set; } = null!; 22 | } 23 | 24 | [JsonSerializable(typeof(CustomerLeagueSessions[])), JsonSourceGenerationOptions(WriteIndented = true)] 25 | internal partial class CustomerLeagueSessionsContext : JsonSerializerContext 26 | { } 27 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/RaceGuideResults.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class RaceGuideResults 7 | { 8 | [JsonPropertyName("subscribed")] 9 | public bool Subscribed { get; set; } 10 | 11 | [JsonPropertyName("sessions")] 12 | public RaceGuideSession[] Sessions { get; set; } = default!; 13 | 14 | [JsonPropertyName("block_begin_time")] 15 | public DateTime BlockBeginTime { get; set; } 16 | 17 | [JsonPropertyName("block_end_time")] 18 | public DateTime BlockEndTime { get; set; } 19 | 20 | [JsonPropertyName("success")] 21 | public bool Success { get; set; } 22 | } 23 | 24 | [JsonSerializable(typeof(RaceGuideResults)), JsonSourceGenerationOptions(WriteIndented = true)] 25 | internal partial class RaceGuideResultsContext : JsonSerializerContext 26 | { } 27 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GivenOptionsWithASaveActionTheSaveActionIsCalledWithTheCookies/0.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "Set-Cookie": [ 4 | "r_members=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT", 5 | "irsso_members=ABC123DEF456; Max-Age=31536000; Domain=.iracing.com; Path=/;", 6 | "authtoken_members=%7B%22authtoken%22%3A%7B%22authcode%22%3A%22AbC123%22%2C%22email%22%3A%22test.user%40example.com%22%7D%7D; Max-Age=3600; Domain=.iracing.com; Path=/;" 7 | ] 8 | }, 9 | "content": { 10 | "authcode": "51687dfd-1d8e-4faa-bf72-52cb36e4f762", 11 | "autoLoginSeries": null, 12 | "autoLoginToken": null, 13 | "custId": 123456, 14 | "email": "test.user@example.com", 15 | "ssoCookieDomain": ".iracing.com", 16 | "ssoCookieName": "irsso_membersv2", 17 | "ssoCookiePath": "/", 18 | "ssoCookieValue": "3883fc6a-890c-4c75-981c-84f2f9ebfb41" 19 | } 20 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/MemberProfileInfo.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class MemberProfileInfo 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | 17 | [JsonPropertyName("last_login")] 18 | public string LastLogin { get; set; } = default!; 19 | 20 | [JsonPropertyName("member_since")] 21 | public string MemberSince { get; set; } = default!; 22 | 23 | [JsonPropertyName("ai")] 24 | public bool AI { get; set; } 25 | 26 | [JsonPropertyName("licenses")] 27 | public MemberLicense[] Licenses { get; set; } = default!; 28 | } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/DataUrlResult.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public sealed class DataUrlResult 7 | { 8 | [JsonPropertyName("type")] 9 | public string Type { get; set; } = default!; 10 | 11 | [JsonPropertyName("data")] 12 | public DataUrlResultData Data { get; set; } = default!; 13 | 14 | [JsonPropertyName("data_url")] 15 | public string DataUrl { get; set; } = default!; 16 | } 17 | 18 | public sealed class DataUrlResultData 19 | { 20 | [JsonPropertyName("success")] 21 | public bool Success { get; set; } 22 | [JsonPropertyName("cust_id")] 23 | public int CustomerId { get; set; } 24 | } 25 | 26 | [JsonSerializable(typeof(DataUrlResult)), JsonSourceGenerationOptions(WriteIndented = true)] 27 | public partial class DataUrlResultContext : JsonSerializerContext 28 | { } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/LeagueSeasonSessions.cs: -------------------------------------------------------------------------------- 1 | // © 2025 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Aydsko.iRacingData.Constants; 5 | 6 | namespace Aydsko.iRacingData.Leagues; 7 | 8 | public class LeagueSeasonSessions 9 | { 10 | [JsonPropertyName("sessions")] 11 | public Session[] Sessions { get; set; } = []; 12 | 13 | [JsonPropertyName("success")] 14 | public bool Success { get; set; } 15 | 16 | [JsonPropertyName("season_id")] 17 | public int SeasonId { get; set; } 18 | 19 | [JsonPropertyName("league_id")] 20 | public int LeagueId { get; set; } 21 | 22 | [JsonPropertyName("subscribed")] 23 | public bool Subscribed { get; set; } 24 | } 25 | 26 | [JsonSerializable(typeof(LeagueSeasonSessions)), JsonSourceGenerationOptions(WriteIndented = true)] 27 | internal partial class LeagueSeasonSessionsContext : JsonSerializerContext 28 | { } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/MemberAwardResult.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Member; 2 | 3 | public class MemberAwardResult 4 | { 5 | [JsonPropertyName("type")] 6 | public string Type { get; set; } = default!; 7 | 8 | [JsonPropertyName("data")] 9 | public MemberAwardResultData Data { get; set; } = default!; 10 | 11 | [JsonPropertyName("data_url")] 12 | public string DataUrl { get; set; } = default!; 13 | } 14 | 15 | public class MemberAwardResultData 16 | { 17 | [JsonPropertyName("success")] 18 | public bool Success { get; set; } 19 | [JsonPropertyName("cust_id")] 20 | public int CustomerId { get; set; } 21 | [JsonPropertyName("award_count")] 22 | public int AwardCount { get; set; } 23 | } 24 | 25 | [JsonSerializable(typeof(MemberAwardResult)), JsonSourceGenerationOptions(WriteIndented = true)] 26 | internal partial class MemberAwardResultContext : JsonSerializerContext 27 | { } 28 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberRecapSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "year": 2023, 5 | "stats": { 6 | "starts": 34, 7 | "wins": 3, 8 | "top5": 15, 9 | "avg_start_position": 7, 10 | "avg_finish_position": 7, 11 | "laps": 749, 12 | "laps_led": 40, 13 | "favorite_car": { 14 | "car_id": 161, 15 | "car_name": "Mercedes-AMG W13 E Performance", 16 | "car_image": "https://images-static.iracing.com/img/cars/mercedesw13/mercedesw13-small.jpg" 17 | }, 18 | "favorite_track": { 19 | "track_id": 250, 20 | "track_name": "Nürburgring Grand-Prix-Strecke", 21 | "config_name": "Grand Prix", 22 | "track_logo": "https://images-static.iracing.com/img/logos/tracks/nurburgring-logo.png" 23 | } 24 | }, 25 | "success": true, 26 | "season": null, 27 | "cust_id": 341554 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Converters/OneDecimalPointValueConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | 3 | namespace Aydsko.iRacingData.Converters; 4 | 5 | /// 6 | /// Convert the cloud cover value from the API to a decimal. 7 | /// 8 | public class OneDecimalPointValueConverter : JsonConverter 9 | { 10 | public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 11 | { 12 | return reader.TryGetInt32(out var intValue) ? intValue / 10m : default; 13 | } 14 | 15 | public override void Write(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options) 16 | { 17 | #if NET6_0_OR_GREATER 18 | ArgumentNullException.ThrowIfNull(writer); 19 | #else 20 | if (writer is null) 21 | { 22 | throw new ArgumentNullException(nameof(writer)); 23 | } 24 | #endif 25 | 26 | writer.WriteNumberValue(value * 10); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/RaceGuideSession.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class RaceGuideSession 7 | { 8 | [JsonPropertyName("season_id")] 9 | public int SeasonId { get; set; } 10 | 11 | [JsonPropertyName("start_time")] 12 | public DateTime StartTime { get; set; } 13 | 14 | [JsonPropertyName("super_session")] 15 | public bool IsSuperSession { get; set; } 16 | 17 | [JsonPropertyName("series_id")] 18 | public int SeriesId { get; set; } 19 | 20 | [JsonPropertyName("race_week_num")] 21 | public int RaceWeekNumber { get; set; } 22 | 23 | [JsonPropertyName("end_time")] 24 | public DateTime EndTime { get; set; } 25 | 26 | [JsonPropertyName("session_id")] 27 | public int SessionId { get; set; } 28 | 29 | [JsonPropertyName("entry_count")] 30 | public int EntryCount { get; set; } 31 | } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Converters/TwoDecimalPointsValueConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | 3 | namespace Aydsko.iRacingData.Converters; 4 | 5 | /// 6 | /// Convert the temperature value from the API to a decimal. 7 | /// 8 | public class TwoDecimalPointsValueConverter : JsonConverter 9 | { 10 | public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 11 | { 12 | return reader.TryGetInt32(out var intValue) ? intValue / 100m : default; 13 | } 14 | 15 | public override void Write(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options) 16 | { 17 | #if NET6_0_OR_GREATER 18 | ArgumentNullException.ThrowIfNull(writer); 19 | #else 20 | if (writer is null) 21 | { 22 | throw new ArgumentNullException(nameof(writer)); 23 | } 24 | #endif 25 | 26 | writer.WriteNumberValue(value * 100); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/SeasonBase.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class SeasonBase 7 | { 8 | [JsonPropertyName("season_id")] 9 | public int SeasonId { get; set; } 10 | 11 | [JsonPropertyName("series_id")] 12 | public int SeriesId { get; set; } 13 | 14 | [JsonPropertyName("season_name")] 15 | public string SeasonName { get; set; } = default!; 16 | 17 | [JsonPropertyName("official")] 18 | public bool Official { get; set; } 19 | 20 | [JsonPropertyName("season_year")] 21 | public int SeasonYear { get; set; } 22 | 23 | [JsonPropertyName("season_quarter")] 24 | public int SeasonQuarter { get; set; } 25 | 26 | [JsonPropertyName("license_group")] 27 | public int LicenseGroupId { get; set; } 28 | 29 | [JsonPropertyName("driver_changes")] 30 | public bool DriverChanges { get; set; } 31 | } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SeasonStandings.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class SeasonStandings 7 | { 8 | [JsonPropertyName("car_class_id")] 9 | public int CarClassId { get; set; } 10 | 11 | [JsonPropertyName("success")] 12 | public bool Success { get; set; } 13 | 14 | [JsonPropertyName("season_id")] 15 | public int SeasonId { get; set; } 16 | 17 | [JsonPropertyName("car_id")] 18 | public int CarId { get; set; } 19 | 20 | [JsonPropertyName("league_id")] 21 | public int LeagueId { get; set; } 22 | 23 | [JsonPropertyName("standings")] 24 | public SeasonStandingsStandingsDetails Standings { get; set; } = null!; 25 | } 26 | 27 | [JsonSerializable(typeof(SeasonStandings)), JsonSourceGenerationOptions(WriteIndented = true)] 28 | internal partial class SeasonStandingsContext : JsonSerializerContext 29 | { } 30 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/SessionResults.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class SessionResults 7 | { 8 | [JsonPropertyName("simsession_number")] 9 | public int SimSessionNumber { get; set; } 10 | 11 | [JsonPropertyName("simsession_type")] 12 | public int SimSessionType { get; set; } 13 | 14 | [JsonPropertyName("simsession_type_name")] 15 | public string SimSessionTypeName { get; set; } = default!; 16 | 17 | [JsonPropertyName("simsession_subtype")] 18 | public int SimSessionSubType { get; set; } 19 | 20 | [JsonPropertyName("simsession_name")] 21 | public string SimSessionName { get; set; } = default!; 22 | 23 | [JsonPropertyName("results")] 24 | public Result[] Results { get; set; } = default!; 25 | 26 | [JsonPropertyName("weather_result")] 27 | public SessionResultsWeather WeatherResult { get; set; } = default!; 28 | } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/License.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class License 7 | { 8 | [JsonPropertyName("category_id")] 9 | public int CategoryId { get; set; } 10 | 11 | [JsonPropertyName("category")] 12 | public string Category { get; set; } = default!; 13 | 14 | [JsonPropertyName("category_name")] 15 | public string CategoryName { get; set; } = default!; 16 | 17 | [JsonPropertyName("license_level")] 18 | public int LicenseLevel { get; set; } 19 | 20 | [JsonPropertyName("safety_rating")] 21 | public float SafetyRating { get; set; } 22 | 23 | [JsonPropertyName("color")] 24 | public string Color { get; set; } = default!; 25 | 26 | [JsonPropertyName("group_name")] 27 | public string GroupName { get; set; } = default!; 28 | 29 | [JsonPropertyName("group_id")] 30 | public int GroupId { get; set; } 31 | } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/SessionSplit.cs: -------------------------------------------------------------------------------- 1 | // © 2024 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class SessionSplit : IEquatable 7 | { 8 | [JsonPropertyName("subsession_id")] 9 | public int SubSessionId { get; set; } 10 | 11 | [JsonPropertyName("event_strength_of_field")] 12 | public int EventStrengthOfField { get; set; } 13 | 14 | public bool Equals(SessionSplit? other) 15 | { 16 | if (other is null) 17 | { 18 | return false; 19 | } 20 | 21 | return SubSessionId == other.SubSessionId; 22 | } 23 | 24 | public override bool Equals(object? obj) 25 | { 26 | return Equals(obj as SessionSplit); 27 | } 28 | 29 | public override int GetHashCode() 30 | { 31 | #if NET6_0_OR_GREATER 32 | return HashCode.Combine(SubSessionId); 33 | #else 34 | return SubSessionId; 35 | #endif 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.github/workflows/_deploy-docs.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Documentation to GitHub Pages 2 | 3 | on: 4 | workflow_call: 5 | 6 | permissions: 7 | contents: read 8 | pages: write 9 | id-token: write 10 | 11 | concurrency: 12 | group: "pages" 13 | cancel-in-progress: true 14 | 15 | jobs: 16 | deploy: 17 | environment: 18 | name: github-pages 19 | url: ${{ steps.deployment.outputs.page_url }} 20 | 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - name: Download Documentation Artifacts 25 | uses: actions/download-artifact@v4 26 | with: 27 | name: 'Documentation Site' 28 | path: '_site' 29 | 30 | - name: Setup GitHub Pages 31 | uses: actions/configure-pages@v5 32 | 33 | - name: Upload GitHub Pages Artifacts 34 | uses: actions/upload-pages-artifact@v3 35 | with: 36 | path: '_site' 37 | 38 | - name: Deploy to GitHub Pages 39 | id: deployment 40 | uses: actions/deploy-pages@v4 41 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Member/MemberInfoTest.cs: -------------------------------------------------------------------------------- 1 | // © 2023-2024 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.IntegrationTests.Member; 5 | 6 | internal sealed class MemberInfoTest : DataClientIntegrationFixture 7 | { 8 | [Test] 9 | public async Task TestMemberInfoAsync() 10 | { 11 | if (Configuration["iRacingData:CustomerId"] is not string customerIdValue || !int.TryParse(customerIdValue, out var iRacingCustomerId)) 12 | { 13 | throw new InvalidOperationException("iRacing Customer Id value not found in configuration."); 14 | } 15 | 16 | var memberInfo = await Client.GetMyInfoAsync().ConfigureAwait(false); 17 | 18 | Assert.Multiple(() => 19 | { 20 | Assert.That(memberInfo, Is.Not.Null); 21 | Assert.That(memberInfo.Data, Is.Not.Null); 22 | 23 | Assert.That(memberInfo.Data.CustomerId, Is.EqualTo(iRacingCustomerId)); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetTimeAttackMemberSeasonResultsSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": [ 4 | { 5 | "comp_season_id": 3212, 6 | "cust_id": 341554, 7 | "track_id": 218, 8 | "best_lap_time": 762649, 9 | "best_lap_at": "2023-02-04T12:13:40Z", 10 | "record_date": "2023-02-04T12:21:30Z", 11 | "comparative_rank": 8, 12 | "decile": 8, 13 | "percent_rank": 0.825, 14 | "time_behind_first_of_next_decile": 22397, 15 | "time_behind_last_of_next_decile": 6356 16 | }, 17 | { 18 | "comp_season_id": 3212, 19 | "cust_id": 341554, 20 | "track_id": 341, 21 | "best_lap_time": 908513, 22 | "best_lap_at": "2023-02-04T12:31:07Z", 23 | "record_date": "2023-02-04T12:51:34Z", 24 | "comparative_rank": 14, 25 | "decile": 8, 26 | "percent_rank": 0.8488372, 27 | "time_behind_first_of_next_decile": 16864, 28 | "time_behind_last_of_next_decile": 6193 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/Tags.cs: -------------------------------------------------------------------------------- 1 | // © 2025 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class Tags 7 | { 8 | [JsonPropertyName("categorized")] 9 | public Categorized[] Categorized { get; set; } = []; 10 | 11 | [JsonPropertyName("not_categorized")] 12 | public Tag[] NotCategorized { get; set; } = []; 13 | } 14 | 15 | public class Categorized 16 | { 17 | [JsonPropertyName("category_id")] 18 | public int CategoryId { get; set; } 19 | 20 | [JsonPropertyName("name")] 21 | public string Name { get; set; } = default!; 22 | 23 | [JsonPropertyName("limit")] 24 | public int? Limit { get; set; } 25 | 26 | [JsonPropertyName("tags")] 27 | public Tag[] Tags { get; set; } = []; 28 | } 29 | 30 | public class Tag 31 | { 32 | [JsonPropertyName("tag_id")] 33 | public int TagId { get; set; } 34 | 35 | [JsonPropertyName("tag_name")] 36 | public string TagName { get; set; } = default!; 37 | } 38 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/SingleDriverSubsessionLapsHeader.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class SingleDriverSubsessionLapsHeader : SubsessionLapsHeader 7 | { 8 | [JsonPropertyName("group_id")] 9 | public int GroupId { get; set; } 10 | 11 | [JsonPropertyName("cust_id")] 12 | public int CustomerId { get; set; } 13 | 14 | [JsonPropertyName("name")] 15 | public string Name { get; set; } = null!; 16 | 17 | [JsonPropertyName("car_id")] 18 | public int CarId { get; set; } 19 | 20 | [JsonPropertyName("license_level")] 21 | public int LicenseLevel { get; set; } 22 | 23 | [JsonPropertyName("livery")] 24 | public Livery Livery { get; set; } = null!; 25 | } 26 | 27 | [JsonSerializable(typeof(SingleDriverSubsessionLapsHeader)), JsonSourceGenerationOptions(WriteIndented = true)] 28 | internal partial class SingleDriverSubsessionLapsHeaderContext : JsonSerializerContext 29 | { } 30 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/FieldDefs.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class FieldDefs 7 | { 8 | [JsonPropertyName("field_id")] 9 | public int FieldId { get; set; } 10 | 11 | [JsonPropertyName("name")] 12 | public string Name { get; set; } = default!; 13 | 14 | [JsonPropertyName("value")] 15 | public object Value { get; set; } = default!; 16 | 17 | [JsonPropertyName("editable")] 18 | public bool Editable { get; set; } 19 | 20 | [JsonPropertyName("label")] 21 | public string Label { get; set; } = default!; 22 | 23 | [JsonPropertyName("section")] 24 | public string Section { get; set; } = default!; 25 | 26 | [JsonPropertyName("row_order")] 27 | public int RowOrder { get; set; } 28 | 29 | [JsonPropertyName("column")] 30 | public int Column { get; set; } 31 | 32 | [JsonPropertyName("number_of_lines")] 33 | public int NumberOfLines { get; set; } 34 | } 35 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Exceptions/iRacingDataClientException.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Exceptions; 5 | 6 | [Serializable] 7 | public class iRacingDataClientException : Exception 8 | { 9 | public iRacingDataClientException() 10 | { } 11 | 12 | public iRacingDataClientException(string message) 13 | : base(message) 14 | { } 15 | 16 | public iRacingDataClientException(string message, Exception inner) 17 | : base(message, inner) 18 | { } 19 | 20 | #if NET8_0_OR_GREATER 21 | [Obsolete("Apply cross-targeting work-around for SYSLIB0051 Diagnostic (https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0051)", DiagnosticId = "SYSLIB0051")] 22 | #endif 23 | protected iRacingDataClientException(System.Runtime.Serialization.SerializationInfo info, 24 | System.Runtime.Serialization.StreamingContext context) 25 | : base(info, context) 26 | { } 27 | } 28 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/Car.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class Car 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("car_class_id")] 12 | public int CarClassId { get; set; } 13 | 14 | [Obsolete("Use \"MaxPercentFuelFill\" property instead.")] 15 | public int MaxPctFuelFill { get => (int)MaxPercentFuelFill; set => MaxPercentFuelFill = value; } 16 | 17 | [JsonPropertyName("max_pct_fuel_fill")] 18 | public decimal MaxPercentFuelFill { get; set; } 19 | 20 | [JsonPropertyName("weight_penalty_kg")] 21 | public int WeightPenaltyKg { get; set; } 22 | 23 | [JsonPropertyName("power_adjust_pct")] 24 | public decimal PowerAdjustPercent { get; set; } 25 | 26 | [JsonPropertyName("max_dry_tire_sets")] 27 | public int MaxDryTireSets { get; set; } 28 | 29 | [JsonPropertyName("package_id")] 30 | public int PackageId { get; set; } 31 | } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Searches/HostedResultsHeader.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Searches; 5 | 6 | public class HostedResultsHeader : IChunkInfoResultHeader 7 | { 8 | [JsonPropertyName("type")] 9 | public string Type { get; set; } = default!; 10 | 11 | [JsonPropertyName("data")] 12 | public HostedResultsHeaderData Data { get; set; } = default!; 13 | } 14 | 15 | public class HostedResultsHeaderData : IChunkInfoResultHeaderData 16 | { 17 | [JsonPropertyName("success")] 18 | public bool Success { get; set; } 19 | 20 | [JsonPropertyName("chunk_info")] 21 | public ChunkInfo ChunkInfo { get; set; } = default!; 22 | 23 | [JsonPropertyName("params")] 24 | public HostedSearchParameters Params { get; set; } = default!; 25 | } 26 | 27 | [JsonSerializable(typeof(HostedResultsHeader)), JsonSourceGenerationOptions(WriteIndented = true)] 28 | internal partial class HostedResultsHeaderContext : JsonSerializerContext 29 | { } 30 | -------------------------------------------------------------------------------- /doc/docfx_project/templates/minimal/partials/navbar.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | 23 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/TestLogger.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Microsoft.Extensions.Logging; 5 | 6 | namespace Aydsko.iRacingData.IntegrationTests; 7 | 8 | internal sealed class TestLogger() 9 | : TestLogger(nameof(TCategoryName)), ILogger 10 | { 11 | } 12 | 13 | internal class TestLogger(string categoryName) 14 | : ILogger 15 | { 16 | public IDisposable? BeginScope(TState state) where TState : notnull 17 | { 18 | return null; 19 | } 20 | 21 | public bool IsEnabled(LogLevel logLevel) 22 | { 23 | return true; 24 | } 25 | 26 | public void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter) 27 | { 28 | ArgumentNullException.ThrowIfNull(formatter); 29 | 30 | TestContext.Out.WriteLine($"[{logLevel,-11} | {eventId.Id} | {eventId.Name,-26}] {categoryName}: {formatter(state, exception)}"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/CarRestrictions.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class CarRestrictions 7 | { 8 | [JsonPropertyName("car_id")] 9 | public int CarId { get; set; } 10 | 11 | [JsonPropertyName("race_setup_id")] 12 | public int RaceSetupId { get; set; } 13 | 14 | [JsonPropertyName("max_pct_fuel_fill")] 15 | public decimal MaxPercentFuelFill { get; set; } 16 | 17 | [JsonPropertyName("weight_penalty_kg")] 18 | public decimal WeightPenaltyKg { get; set; } 19 | 20 | [JsonPropertyName("power_adjust_pct")] 21 | public decimal PowerAdjustPercent { get; set; } 22 | 23 | [JsonPropertyName("max_dry_tire_sets")] 24 | public int MaxDryTireSets { get; set; } 25 | 26 | [Obsolete("Use \"QualifyingSetupId\" property instead.")] 27 | public int QualSetupId { get => QualifyingSetupId; set => QualifyingSetupId = value; } 28 | 29 | [JsonPropertyName("qual_setup_id")] 30 | public int QualifyingSetupId { get; set; } 31 | } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/CarClass.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class CarClass 7 | { 8 | [JsonPropertyName("car_class_id")] 9 | public int CarClassId { get; set; } 10 | 11 | [JsonPropertyName("cars_in_class")] 12 | public CarsInClass[] CarsInClass { get; set; } = Array.Empty(); 13 | 14 | [JsonPropertyName("cust_id")] 15 | public int? CustomerId { get; set; } 16 | 17 | [JsonPropertyName("name")] 18 | public string Name { get; set; } = default!; 19 | 20 | [JsonPropertyName("rain_enabled")] 21 | public bool RainEnabled { get; set; } 22 | 23 | [JsonPropertyName("relative_speed")] 24 | public int RelativeSpeed { get; set; } 25 | 26 | [JsonPropertyName("short_name")] 27 | public string ShortName { get; set; } = default!; 28 | } 29 | 30 | [JsonSerializable(typeof(CarClass[])), JsonSourceGenerationOptions(WriteIndented = true)] 31 | internal partial class CarClassArrayContext : JsonSerializerContext 32 | { } 33 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/SpectatorSubsessionIds.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | /// Lists the subsession identifiers currently available to spectate. 7 | public class SpectatorSubsessionIds 8 | { 9 | /// Types of events included in the list of subsession identifiers. 10 | [JsonPropertyName("event_types")] 11 | public EventType[] EventTypes { get; set; } = Array.Empty(); 12 | 13 | /// Indicates if the query was successful. 14 | [JsonPropertyName("success")] 15 | public bool Success { get; set; } 16 | 17 | /// List of subsession identifiers. 18 | [JsonPropertyName("subsession_ids")] 19 | public int[] SubsessionIdentifiers { get; set; } = Array.Empty(); 20 | } 21 | 22 | [JsonSerializable(typeof(SpectatorSubsessionIds)), JsonSourceGenerationOptions(WriteIndented = true)] 23 | internal partial class SpectatorSubsessionIdsContext : JsonSerializerContext 24 | { } 25 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Tracks/CachingGetTracksTests.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.IntegrationTests.Tracks; 5 | 6 | internal sealed class CachingGetTracksTests : CachingIntegrationFixture 7 | { 8 | [Test] 9 | public async Task GetTracksTestAsync() 10 | { 11 | var tracksResponse = await Client.GetTracksAsync(CancellationToken.None).ConfigureAwait(false); 12 | Assert.That(tracksResponse.Data, Is.Not.Null.Or.Empty); 13 | 14 | var tracksResponse2 = await Client.GetTracksAsync(CancellationToken.None).ConfigureAwait(false); 15 | Assert.That(tracksResponse2.Data, Is.Not.Null.Or.Empty); 16 | 17 | var stats = MemoryCache.GetCurrentStatistics(); 18 | using (Assert.EnterMultipleScope()) 19 | { 20 | Assert.That(stats?.TotalHits, Is.Not.Null.And.EqualTo(1), "TotalHits didn't match."); 21 | Assert.That(stats?.TotalMisses, Is.Not.Null.And.EqualTo(1), "TotalMisses didn't match."); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Searches/OfficialSearchResultHeader.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Searches; 5 | 6 | public class OfficialSearchResultHeader : IChunkInfoResultHeader 7 | { 8 | [JsonPropertyName("type")] 9 | public string Type { get; set; } = default!; 10 | 11 | [JsonPropertyName("data")] 12 | public OfficialSearchResultHeaderData Data { get; set; } = default!; 13 | } 14 | 15 | public class OfficialSearchResultHeaderData : IChunkInfoResultHeaderData 16 | { 17 | [JsonPropertyName("success")] 18 | public bool Success { get; set; } 19 | 20 | [JsonPropertyName("chunk_info")] 21 | public ChunkInfo ChunkInfo { get; set; } = default!; 22 | 23 | [JsonPropertyName("params")] 24 | public OfficialSearchParameters Params { get; set; } = default!; 25 | } 26 | 27 | [JsonSerializable(typeof(OfficialSearchResultHeader)), JsonSourceGenerationOptions(WriteIndented = true)] 28 | internal partial class OfficialSearchResultHeaderContext : JsonSerializerContext 29 | { } 30 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Common/TrackState.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Common; 5 | 6 | public class TrackState 7 | { 8 | [JsonPropertyName("leave_marbles")] 9 | public bool LeaveMarbles { get; set; } 10 | 11 | [JsonPropertyName("practice_rubber")] 12 | public int PracticeRubber { get; set; } 13 | 14 | [JsonPropertyName("qualify_rubber")] 15 | public int QualifyRubber { get; set; } 16 | 17 | [JsonPropertyName("warmup_rubber")] 18 | public int WarmupRubber { get; set; } 19 | 20 | [JsonPropertyName("race_rubber")] 21 | public int RaceRubber { get; set; } 22 | 23 | [JsonPropertyName("practice_grip_compound")] 24 | public int PracticeGripCompound { get; set; } 25 | 26 | [JsonPropertyName("qualify_grip_compound")] 27 | public int QualifyGripCompound { get; set; } 28 | 29 | [JsonPropertyName("warmup_grip_compound")] 30 | public int WarmupGripCompound { get; set; } 31 | 32 | [JsonPropertyName("race_grip_compound")] 33 | public int RaceGripCompound { get; set; } 34 | } 35 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/SeriesAsset.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class SeriesAsset 7 | { 8 | public const string ImagePathBase = "https://images-static.iracing.com/img/logos/series/"; 9 | 10 | [JsonPropertyName("large_image")] 11 | public object LargeImage { get; set; } = default!; 12 | 13 | [JsonPropertyName("logo")] 14 | public string Logo { get; set; } = default!; 15 | 16 | [JsonIgnore] 17 | public Uri LogoUrl => new(new(ImagePathBase), Logo); 18 | 19 | [JsonPropertyName("series_copy")] 20 | public string SeriesCopy { get; set; } = default!; 21 | 22 | [JsonPropertyName("series_id")] 23 | public int SeriesId { get; set; } 24 | 25 | [JsonPropertyName("small_image")] 26 | public object SmallImage { get; set; } = default!; 27 | } 28 | 29 | [JsonSerializable(typeof(IReadOnlyDictionary)), JsonSourceGenerationOptions(WriteIndented = true)] 30 | internal partial class SeriesAssetReadOnlyDictionaryContext : JsonSerializerContext 31 | { } 32 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/FlairLookupResponse.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | public class FlairLookupResponse 7 | { 8 | [JsonPropertyName("flairs")] 9 | public Flair[] Flairs { get; set; } = default!; 10 | 11 | [JsonPropertyName("success")] 12 | public bool Success { get; set; } 13 | } 14 | 15 | public class Flair 16 | { 17 | [JsonPropertyName("flair_id")] 18 | public int FlairId { get; set; } 19 | 20 | [JsonPropertyName("flair_name")] 21 | public string FlairName { get; set; } = default!; 22 | 23 | [JsonPropertyName("seq")] 24 | public int Sequence { get; set; } 25 | 26 | [JsonPropertyName("flair_shortname")] 27 | public string? FlairShortName { get; set; } 28 | 29 | [JsonPropertyName("country_code")] 30 | public string? CountryCode { get; set; } 31 | } 32 | 33 | [JsonSerializable(typeof(FlairLookupResponse)), JsonSourceGenerationOptions(WriteIndented = true)] 34 | internal partial class FlairLookupResponseContext : JsonSerializerContext 35 | { } 36 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/LicenseHistory.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class LicenseHistory 7 | { 8 | [JsonPropertyName("category_id")] 9 | public int CategoryId { get; set; } 10 | 11 | [JsonPropertyName("category")] 12 | public string Category { get; set; } = default!; 13 | 14 | [JsonPropertyName("license_level")] 15 | public int LicenseLevel { get; set; } 16 | 17 | [JsonPropertyName("safety_rating")] 18 | public float SafetyRating { get; set; } 19 | 20 | [JsonPropertyName("cpi")] 21 | public float Cpi { get; set; } 22 | 23 | [JsonPropertyName("irating")] 24 | public int Irating { get; set; } 25 | 26 | [JsonPropertyName("tt_rating")] 27 | public int TtRating { get; set; } 28 | 29 | [JsonPropertyName("color")] 30 | public string Color { get; set; } = default!; 31 | 32 | [JsonPropertyName("group_name")] 33 | public string GroupName { get; set; } = default!; 34 | 35 | [JsonPropertyName("group_id")] 36 | public int GroupId { get; set; } 37 | } 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Adrian Clark 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Hosted/Eligability.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Hosted; 5 | 6 | public class Eligability 7 | { 8 | [JsonPropertyName("session_full")] 9 | public bool SessionFull { get; set; } 10 | 11 | [JsonPropertyName("can_spot")] 12 | public bool CanSpot { get; set; } 13 | 14 | [JsonPropertyName("can_watch")] 15 | public bool CanWatch { get; set; } 16 | 17 | [JsonPropertyName("can_drive")] 18 | public bool CanDrive { get; set; } 19 | 20 | [JsonPropertyName("has_sess_password")] 21 | public bool HasSessionPassword { get; set; } 22 | 23 | [JsonPropertyName("needs_purchase")] 24 | public bool NeedsPurchase { get; set; } 25 | 26 | [JsonPropertyName("own_car")] 27 | public bool OwnCar { get; set; } 28 | 29 | [JsonPropertyName("own_track")] 30 | public bool OwnTrack { get; set; } 31 | 32 | [JsonPropertyName("purchase_skus")] 33 | public int[] PurchaseSkus { get; set; } = Array.Empty(); 34 | 35 | [JsonPropertyName("registered")] 36 | public bool Registered { get; set; } 37 | } 38 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetDivisionsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": [ 8 | { 9 | "label": "ALL", 10 | "value": -1 11 | }, 12 | { 13 | "label": "Division 1", 14 | "value": 0 15 | }, 16 | { 17 | "label": "Division 2", 18 | "value": 1 19 | }, 20 | { 21 | "label": "Division 3", 22 | "value": 2 23 | }, 24 | { 25 | "label": "Division 4", 26 | "value": 3 27 | }, 28 | { 29 | "label": "Division 5", 30 | "value": 4 31 | }, 32 | { 33 | "label": "Division 6", 34 | "value": 5 35 | }, 36 | { 37 | "label": "Division 7", 38 | "value": 6 39 | }, 40 | { 41 | "label": "Division 8", 42 | "value": 7 43 | }, 44 | { 45 | "label": "Division 9", 46 | "value": 8 47 | }, 48 | { 49 | "label": "Division 10", 50 | "value": 9 51 | }, 52 | { 53 | "label": "Rookie", 54 | "value": 10 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/DriverInfo.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Member; 5 | 6 | public class DriverInfo 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = default!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = default!; 16 | 17 | [JsonPropertyName("flair_id")] 18 | public int FlairId { get; set; } 19 | 20 | [JsonPropertyName("flair_name")] 21 | public string FlairName { get; set; } = default!; 22 | 23 | [JsonPropertyName("flair_shortname")] 24 | public string? FlairShortName { get; set; } 25 | 26 | [JsonPropertyName("last_login")] 27 | public DateTimeOffset LastLogin { get; set; } 28 | 29 | [JsonPropertyName("member_since")] 30 | public string MemberSince { get; set; } = default!; 31 | 32 | [JsonPropertyName("ai")] 33 | public bool AI { get; set; } 34 | 35 | [JsonPropertyName("licenses")] 36 | public LicenseInfo[]? Licenses { get; set; } 37 | } 38 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/SeasonTimeTrialResult.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Aydsko.iRacingData.Converters; 5 | 6 | namespace Aydsko.iRacingData.Stats; 7 | 8 | public class SeasonTimeTrialResult 9 | { 10 | [JsonPropertyName("rank")] 11 | public int Rank { get; set; } 12 | 13 | [JsonPropertyName("cust_id")] 14 | public int CustomerId { get; set; } 15 | 16 | [JsonPropertyName("display_name")] 17 | public string DisplayName { get; set; } = null!; 18 | 19 | [JsonPropertyName("division")] 20 | public int Division { get; set; } 21 | 22 | [JsonPropertyName("license")] 23 | public License License { get; set; } = null!; 24 | 25 | [JsonPropertyName("best_nlaps_time"), JsonConverter(typeof(TenThousandthSecondDurationConverter))] 26 | public TimeSpan? BestNlapsTime { get; set; } 27 | 28 | [JsonPropertyName("starts")] 29 | public int Starts { get; set; } 30 | } 31 | 32 | [JsonSerializable(typeof(SeasonTimeTrialResult[])), JsonSourceGenerationOptions(WriteIndented = true)] 33 | internal partial class SeasonTimeTrialResultArrayContext : JsonSerializerContext 34 | { } 35 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Converters/CsvStringConverter.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using System.Text.Json; 5 | 6 | namespace Aydsko.iRacingData.Converters; 7 | 8 | public sealed class CsvStringConverter : JsonConverter 9 | { 10 | public override string[]? Read(ref Utf8JsonReader reader, 11 | Type typeToConvert, 12 | JsonSerializerOptions options) 13 | { 14 | var csvString = reader.GetString(); 15 | 16 | return csvString is null or { Length: 0 } 17 | ? null 18 | : csvString.Split(','); 19 | } 20 | 21 | public override void Write(Utf8JsonWriter writer, 22 | string[] value, 23 | JsonSerializerOptions options) 24 | { 25 | #if NET6_0_OR_GREATER 26 | ArgumentNullException.ThrowIfNull(writer); 27 | #else 28 | if (writer is null) 29 | { 30 | throw new ArgumentNullException(nameof(writer)); 31 | } 32 | #endif 33 | 34 | writer.WriteStringValue(string.Join(",", value)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/StatisticsSeries.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | public class StatisticsSeries 7 | { 8 | [JsonPropertyName("series_id")] 9 | public int SeriesId { get; set; } 10 | 11 | [JsonPropertyName("series_name")] 12 | public string SeriesName { get; set; } = default!; 13 | 14 | [JsonPropertyName("series_short_name")] 15 | public string SeriesShortName { get; set; } = default!; 16 | 17 | [JsonPropertyName("category_id")] 18 | public int CategoryId { get; set; } 19 | 20 | [JsonPropertyName("category")] 21 | public string Category { get; set; } = default!; 22 | 23 | [JsonPropertyName("active")] 24 | public bool Active { get; set; } 25 | 26 | [JsonPropertyName("official")] 27 | public bool Official { get; set; } 28 | 29 | [JsonPropertyName("seasons")] 30 | public StatisticsSeason[] Seasons { get; set; } = default!; 31 | } 32 | 33 | [JsonSerializable(typeof(StatisticsSeries[])), JsonSourceGenerationOptions(WriteIndented = true)] 34 | internal partial class StatisticsSeriesArrayContext : JsonSerializerContext 35 | { } 36 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/RaceTimeDescriptors.cs: -------------------------------------------------------------------------------- 1 | using Aydsko.iRacingData.Converters; 2 | 3 | namespace Aydsko.iRacingData.Series; 4 | 5 | public class RaceTimeDescriptors 6 | { 7 | [JsonPropertyName("repeating")] 8 | public bool IsRepeating { get; set; } 9 | 10 | [JsonPropertyName("super_session")] 11 | public bool IsSuperSession { get; set; } 12 | 13 | [JsonPropertyName("session_minutes")] 14 | public int SessionMinutes { get; set; } 15 | 16 | [JsonPropertyName("session_times")] 17 | public DateTimeOffset[]? SessionTimes { get; set; } 18 | 19 | #if NET6_0_OR_GREATER 20 | [JsonPropertyName("start_date"), JsonConverter(typeof(DateOnlyConverter))] 21 | public DateOnly StartDate { get; set; } = default!; 22 | #else 23 | [JsonPropertyName("start_date"), JsonConverter(typeof(DateTimeConverter))] 24 | public DateTime StartDate { get; set; } = default!; 25 | #endif 26 | 27 | [JsonPropertyName("day_offset")] 28 | public int[]? DayOffset { get; set; } 29 | 30 | [JsonPropertyName("first_session_time")] 31 | public TimeSpan? FirstSessionTime { get; set; } 32 | 33 | [JsonPropertyName("repeat_minutes")] 34 | public int? RepeatMinutes { get; set; } 35 | } 36 | -------------------------------------------------------------------------------- /examples/Console/DataConsoleExample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.2.32210.308 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingConsole", "iRacingConsole\iRacingConsole.csproj", "{F0DFC0F1-D232-45B3-9951-5CFBD62DC326}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F0DFC0F1-D232-45B3-9951-5CFBD62DC326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F0DFC0F1-D232-45B3-9951-5CFBD62DC326}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F0DFC0F1-D232-45B3-9951-5CFBD62DC326}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F0DFC0F1-D232-45B3-9951-5CFBD62DC326}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {A9A4DAA2-8C62-463A-98C6-FB160FC28F29} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/LeagueMembership.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class LeagueMembership 7 | { 8 | [JsonPropertyName("league_id")] 9 | public int LeagueId { get; set; } 10 | 11 | [JsonPropertyName("league_name")] 12 | public string LeagueName { get; set; } = null!; 13 | 14 | [JsonPropertyName("owner")] 15 | public bool Owner { get; set; } 16 | 17 | [JsonPropertyName("admin")] 18 | public bool Admin { get; set; } 19 | 20 | [JsonPropertyName("league_mail_opt_out")] 21 | public bool LeagueMailOptOut { get; set; } 22 | 23 | [JsonPropertyName("league_pm_opt_out")] 24 | public bool LeaguePmOptOut { get; set; } 25 | 26 | [JsonPropertyName("car_number")] 27 | public string? CarNumber { get; set; } 28 | 29 | [JsonPropertyName("nick_name")] 30 | public string? NickName { get; set; } 31 | 32 | [JsonPropertyName("league")] 33 | public League? League { get; set; } 34 | } 35 | 36 | [JsonSerializable(typeof(LeagueMembership[])), JsonSourceGenerationOptions(WriteIndented = true)] 37 | internal partial class LeagueMembershipArrayContext : JsonSerializerContext 38 | { } 39 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Converters/DateOnlyConverter.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | #if NET6_0_OR_GREATER 5 | using System.Globalization; 6 | using System.Text.Json; 7 | 8 | namespace Aydsko.iRacingData.Converters; 9 | 10 | public sealed class DateOnlyConverter : JsonConverter 11 | { 12 | public override DateOnly Read(ref Utf8JsonReader reader, 13 | Type typeToConvert, 14 | JsonSerializerOptions options) 15 | { 16 | var dateString = reader.GetString()?.Trim(); 17 | 18 | if (dateString is null or { Length: 0 }) 19 | { 20 | return default; 21 | } 22 | 23 | var dateValue = DateOnly.ParseExact(dateString, "yyyy-MM-dd", CultureInfo.InvariantCulture); 24 | return dateValue; 25 | } 26 | 27 | public override void Write(Utf8JsonWriter writer, 28 | DateOnly value, 29 | JsonSerializerOptions options) 30 | { 31 | ArgumentNullException.ThrowIfNull(writer); 32 | 33 | writer.WriteStringValue(value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); 34 | } 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Exceptions/iRacingForbiddenResponseException.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Aydsko.iRacingData.Exceptions; 7 | 8 | [Serializable] 9 | public class iRacingForbiddenResponseException : iRacingDataClientException 10 | { 11 | public static iRacingForbiddenResponseException Create() 12 | { 13 | return new("Requested result was forbidden."); 14 | } 15 | 16 | public iRacingForbiddenResponseException() 17 | { } 18 | 19 | public iRacingForbiddenResponseException(string message) 20 | : base(message) 21 | { } 22 | 23 | public iRacingForbiddenResponseException(string message, Exception innerException) 24 | : base(message, innerException) 25 | { } 26 | 27 | #if NET8_0_OR_GREATER 28 | [Obsolete("Apply cross-targeting work-around for SYSLIB0051 Diagnostic (https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0051)", DiagnosticId = "SYSLIB0051")] 29 | #endif 30 | protected iRacingForbiddenResponseException(SerializationInfo serializationInfo, StreamingContext streamingContext) 31 | : base(serializationInfo, streamingContext) 32 | { } 33 | } 34 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSubsessionEventLogSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "success": true, 5 | "session_info": { 6 | "subsession_id": 43625377, 7 | "session_id": 167925995, 8 | "simsession_number": 0, 9 | "simsession_type": 6, 10 | "simsession_name": "RACE", 11 | "event_type": 5, 12 | "event_type_name": "Race", 13 | "private_session_id": -1, 14 | "season_name": "F3 Vertagear Championship - 2022 Season 1 - Fixed", 15 | "season_short_name": "2022 Season 1", 16 | "series_name": "F3 Vertagear Championship - Fixed", 17 | "series_short_name": "F3 Vertagear Championship - Fixed", 18 | "start_time": "2022-01-02T10:15:00Z", 19 | "track": { 20 | "track_id": 239, 21 | "track_name": "Autodromo Nazionale Monza", 22 | "config_name": "Grand Prix" 23 | } 24 | }, 25 | "chunk_info": { 26 | "chunk_size": 500, 27 | "num_chunks": 1, 28 | "rows": 9, 29 | "base_download_url": "https://dqfp1ltauszrc.cloudfront.net/public/lapdata/subsession/43625377/0/eventlog/", 30 | "chunk_file_names": [ 31 | "f9126f9c978219a5934e9fd127c5737c59a4404db21bfc4265b296e3894b6729.json" 32 | ] 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/SpectatorDetails.cs: -------------------------------------------------------------------------------- 1 | // © 2024 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | /// Lists the subsession details currently available to spectate. 7 | public class SpectatorDetails 8 | { 9 | /// Indicates if the query was successful. 10 | [JsonPropertyName("success")] 11 | public bool Success { get; set; } 12 | 13 | /// Season identifiers included in the list of subsession details. 14 | [JsonPropertyName("season_ids")] 15 | public int[] SeasonIds { get; set; } = Array.Empty(); 16 | 17 | /// Types of events included in the list of subsession details. 18 | [JsonPropertyName("event_types")] 19 | public EventType[] EventTypes { get; set; } = Array.Empty(); 20 | 21 | /// List of subsession details. 22 | [JsonPropertyName("subsessions")] 23 | public SpectatorSubsessionDetail[] Subsessions { get; set; } = Array.Empty(); 24 | } 25 | 26 | [JsonSerializable(typeof(SpectatorDetails)), JsonSourceGenerationOptions(WriteIndented = true)] 27 | internal partial class SpectatorDetailsContext : JsonSerializerContext 28 | { } 29 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/RosterMember.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class RosterMember 7 | { 8 | [JsonPropertyName("cust_id")] 9 | public int CustomerId { get; set; } 10 | 11 | [JsonPropertyName("display_name")] 12 | public string DisplayName { get; set; } = null!; 13 | 14 | [JsonPropertyName("helmet")] 15 | public Helmet Helmet { get; set; } = null!; 16 | 17 | [JsonPropertyName("owner")] 18 | public bool Owner { get; set; } 19 | 20 | [JsonPropertyName("admin")] 21 | public bool Admin { get; set; } 22 | 23 | [JsonPropertyName("league_mail_opt_out")] 24 | public bool LeagueMailOptOut { get; set; } 25 | 26 | [JsonPropertyName("league_pm_opt_out")] 27 | public bool LeaguePrivateMessageOptOut { get; set; } 28 | 29 | [JsonPropertyName("league_member_since")] 30 | public DateTimeOffset LeagueMemberSince { get; set; } 31 | 32 | [JsonPropertyName("car_number")] 33 | public string? CarNumber { get; set; } 34 | 35 | [JsonPropertyName("nick_name")] 36 | public string? NickName { get; set; } 37 | 38 | [JsonPropertyName("licenses")] 39 | public LeagueLicense[] Licenses { get; set; } = []; 40 | } 41 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/SeasonResults.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class SeasonResults 7 | { 8 | [JsonPropertyName("results_list")] 9 | public SeasonRaceResult[] ResultsList { get; set; } = Array.Empty(); 10 | 11 | [JsonPropertyName("event_type")] 12 | public EventType EventType { get; set; } 13 | 14 | [JsonPropertyName("success")] 15 | public bool Success { get; set; } 16 | 17 | [JsonPropertyName("season_id")] 18 | public int SeasonId { get; set; } 19 | 20 | /// An index number identifying the race week. 21 | /// The iRacing Data API works with zero-based race weeks, most people will use one-based. 22 | /// 23 | [JsonPropertyName("race_week_num")] 24 | public int RaceWeekIndex { get; set; } 25 | 26 | /// The number of the race week within the season. 27 | [JsonIgnore] 28 | public int RaceWeekNumber => RaceWeekIndex + 1; 29 | } 30 | 31 | [JsonSerializable(typeof(SeasonResults)), JsonSourceGenerationOptions(WriteIndented = true)] 32 | internal partial class SeasonResultsContext : JsonSerializerContext 33 | { } 34 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Stats/MemberRecap.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Stats; 2 | 3 | /// A summary of statistics about either a member's year or season. 4 | public class MemberRecap 5 | { 6 | /// The year the statistics are for. 7 | [JsonPropertyName("year")] 8 | public int Year { get; set; } 9 | 10 | /// The statistics themselves. 11 | [JsonPropertyName("stats")] 12 | public RecapStatistics Statistics { get; set; } = default!; 13 | 14 | /// Indicates if the query was successful. 15 | [JsonPropertyName("success")] 16 | public bool Success { get; set; } 17 | 18 | /// 19 | /// The season the statistics were for, if the search was season-specific. 20 | /// It will be if the statistics are for the whole year. 21 | /// 22 | [JsonPropertyName("season")] 23 | public int? Season { get; set; } 24 | 25 | /// iRacing Customer Id the statistics relate to. 26 | [JsonPropertyName("cust_id")] 27 | public int CustomerId { get; set; } 28 | } 29 | 30 | [JsonSerializable(typeof(MemberRecap)), JsonSourceGenerationOptions(WriteIndented = true)] 31 | internal partial class MemberRecapContext : JsonSerializerContext 32 | { } 33 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/SearchHostedResultsSuccessfulAsync/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": { 3 | "x-ratelimit-remaining": "99", 4 | "x-ratelimit-limit": "100", 5 | "x-ratelimit-reset": "1644451200" 6 | }, 7 | "content": { 8 | "type": "search_hosted_results", 9 | "data": { 10 | "success": true, 11 | "chunk_info": { 12 | "chunk_size": 500, 13 | "num_chunks": 1, 14 | "rows": 53, 15 | "base_download_url": "https://scorpio-assets.s3.amazonaws.com/members/messaging-services/short_lived/hosted_search/6091ebd5f4acbbdb20fd858a6770f0e452238d541b1f5fd7206653d1f922551c/", 16 | "chunk_file_names": [ 17 | "2a54311dac6b83faf96d0293056df0bedaa51d9acb5d1364d8ffa5b2faa9d161.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220618T025234Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1200&X-Amz-Credential=AKIAUO6OO4A3357USLO7%2F20220618%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=e64178727046052fb9e7cb2c5f7ac09c9140d028634062af397906800e10fb63" 18 | ] 19 | }, 20 | "params": { 21 | "start_range_begin": "2022-03-30T00:00:00Z", 22 | "category_ids": [ 23 | 1, 24 | 2, 25 | 3, 26 | 4 27 | ], 28 | "session_name": "Missed Apex" 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetMemberParticipationCreditsSucceedsAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": [ 4 | { 5 | "cust_id": 341554, 6 | "season_id": 4019, 7 | "series_id": 456, 8 | "series_name": "Formula C - Moza Racing Dallara F3 Series- Fixed", 9 | "license_group": 3, 10 | "license_group_name": "Class C", 11 | "participation_credits": 4, 12 | "min_weeks": 8, 13 | "weeks": 1, 14 | "earned_credits": 0, 15 | "total_credits": 0 16 | }, 17 | { 18 | "cust_id": 341554, 19 | "season_id": 4077, 20 | "series_id": 514, 21 | "series_name": "iRacing GR Cup - Fixed", 22 | "license_group": 2, 23 | "license_group_name": "Class D", 24 | "participation_credits": 4, 25 | "min_weeks": 8, 26 | "weeks": 1, 27 | "earned_credits": 0, 28 | "total_credits": 0 29 | }, 30 | { 31 | "cust_id": 341554, 32 | "season_id": 4042, 33 | "series_id": 484, 34 | "series_name": "Formula A - Grand Prix Series - Fixed", 35 | "license_group": 5, 36 | "license_group_name": "Class A", 37 | "participation_credits": 7, 38 | "min_weeks": 8, 39 | "weeks": 2, 40 | "earned_credits": 0, 41 | "total_credits": 0 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Exceptions/iRacingInMaintenancePeriodException.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Exceptions; 5 | 6 | [Serializable] 7 | public class iRacingInMaintenancePeriodException : iRacingDataClientException 8 | { 9 | public iRacingInMaintenancePeriodException() 10 | { 11 | HelpLink = "https://status.iracing.com/"; 12 | } 13 | 14 | public iRacingInMaintenancePeriodException(string message) 15 | : base(message) 16 | { 17 | HelpLink = "https://status.iracing.com/"; 18 | } 19 | 20 | public iRacingInMaintenancePeriodException(string message, Exception inner) 21 | : base(message, inner) 22 | { 23 | HelpLink = "https://status.iracing.com/"; 24 | } 25 | 26 | #if NET8_0_OR_GREATER 27 | [Obsolete("Apply cross-targeting work-around for SYSLIB0051 Diagnostic (https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0051)", DiagnosticId = "SYSLIB0051")] 28 | #endif 29 | protected iRacingInMaintenancePeriodException(System.Runtime.Serialization.SerializationInfo info, 30 | System.Runtime.Serialization.StreamingContext context) 31 | : base(info, context) 32 | { } 33 | } 34 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/DataClientIntegrationFixture.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Microsoft.Extensions.Time.Testing; 5 | 6 | namespace Aydsko.iRacingData.IntegrationTests; 7 | 8 | internal abstract class DataClientIntegrationFixture 9 | : BaseIntegrationFixture 10 | { 11 | protected FakeTimeProvider FakeTimeProvider { get; private set; } = new FakeTimeProvider(DateTimeOffset.UtcNow); 12 | 13 | private LegacyUsernamePasswordApiClient? _legacyApiClient; 14 | private ApiClient? _apiClientBase; 15 | 16 | [OneTimeSetUp] 17 | public void OneTimeSetUp() 18 | { 19 | var options = BaseSetUp(); 20 | 21 | _legacyApiClient = new(HttpClient, options, CookieContainer, new TestLogger()); 22 | _apiClientBase = new(_legacyApiClient, options, new TestLogger()); 23 | Client = new DataClient(_apiClientBase, options, new TestLogger(), FakeTimeProvider); 24 | } 25 | 26 | protected override void Dispose(bool disposing) 27 | { 28 | if (disposing) 29 | { 30 | _legacyApiClient?.Dispose(); 31 | _apiClientBase?.Dispose(); 32 | } 33 | base.Dispose(disposing); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Lookups/LicenseLevel.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Lookups; 5 | 6 | /// Sub-level within a license. 7 | public class LicenseLevel 8 | { 9 | /// Unique identifier for this license level. 10 | [JsonPropertyName("license_id")] 11 | public int LicenseId { get; set; } 12 | 13 | /// Unique identifier for the license category. 14 | [JsonPropertyName("license_group")] 15 | public int LicenseGroup { get; set; } 16 | 17 | /// Display name for the license level. 18 | [JsonPropertyName("license")] 19 | public string License { get; set; } = default!; 20 | 21 | /// Short display name for the license level. 22 | [JsonPropertyName("short_name")] 23 | public string ShortName { get; set; } = default!; 24 | 25 | /// Letter code for the license level. 26 | [JsonPropertyName("license_letter")] 27 | public string LicenseLetter { get; set; } = default!; 28 | 29 | /// Color code for the license level. 30 | /// This is an HTML color code. 31 | [JsonPropertyName("color")] 32 | public string Color { get; set; } = default!; 33 | } 34 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetSeasonQualifyResultsSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "success": true, 5 | "season_id": 3587, 6 | "season_name": "NASCAR iRacing Class C Series - 2022 Season", 7 | "season_short_name": "2022 Season", 8 | "series_id": 47, 9 | "series_name": "NASCAR iRacing Class C", 10 | "car_class_id": 71, 11 | "race_week_num": 0, 12 | "chunk_info": { 13 | "chunk_size": 500, 14 | "num_chunks": 7, 15 | "rows": 3078, 16 | "base_download_url": "https://dqfp1ltauszrc.cloudfront.net/public/standings/season/3587/season-driver/71/0/", 17 | "chunk_file_names": [ 18 | "6b80dc340e9a5fc4f04988e0c98987ca3e794eb80eefe21bad06412b3b699f12.json", 19 | "68c5708be074ea5d9d02d2a16bbec12517c0fd073ea07c345e9d3bb72e26e29d.json", 20 | "21257b98997854a754d12e96d2b2ca1ce80868a67359f322e26850d4b02cba6c.json", 21 | "5507f211f81533a777b9f1eb61a621073073dd16030431fe88b751e68c9bd26f.json", 22 | "9ab0db04bb3a9b45b48ffebd530965dc9b9ca1063746309d4927e89f4ba34ec6.json", 23 | "c68f16fb3631dc881bab19b5b975efceb469269b9e54abda2b0927059453ba3f.json", 24 | "70feebbb5b5ff234210355c3a96a502c5e0eed08504ab21c61291b470b2a27c4.json" 25 | ] 26 | }, 27 | "last_updated": "2022-04-13T13:58:08.794339Z" 28 | } 29 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Lookups/CachingLookupTests.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.IntegrationTests.Lookups; 5 | 6 | internal sealed class CachingLookupTests : CachingIntegrationFixture 7 | { 8 | [Test(TestOf = typeof(DataClient))] 9 | public async Task TestLicenseLookupsAreCachedAsync() 10 | { 11 | var license = await Client.GetLicenseLookupsAsync(CancellationToken.None).ConfigureAwait(false); 12 | 13 | Assert.That(license, Is.Not.Null); 14 | Assert.That(license.Data, Is.Not.Null); 15 | 16 | Assert.That(license.Data, Has.Length.EqualTo(7)); 17 | 18 | var license2 = await Client.GetLicenseLookupsAsync(CancellationToken.None).ConfigureAwait(false); 19 | 20 | Assert.That(license2, Is.Not.Null); 21 | Assert.That(license2.Data, Is.Not.Null); 22 | 23 | Assert.That(license2.Data, Has.Length.EqualTo(7)); 24 | 25 | var stats = MemoryCache.GetCurrentStatistics(); 26 | 27 | using (Assert.EnterMultipleScope()) 28 | { 29 | Assert.That(stats?.TotalHits, Is.Not.Null.And.EqualTo(1), "TotalHits didn't match."); 30 | Assert.That(stats?.TotalMisses, Is.Not.Null.And.EqualTo(1), "TotalMisses didn't match."); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Results/CachingResultsGetTest.cs: -------------------------------------------------------------------------------- 1 | // © Adrian Clark - Aydsko.iRacingData 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.IntegrationTests.Results; 5 | 6 | internal sealed class CachingResultsGetTest : CachingIntegrationFixture 7 | { 8 | [Test] 9 | public async Task GivenAValidSubsessionIdThenAResultIsReturnedAsync() 10 | { 11 | var results = await Client.GetSubSessionResultAsync(50033865, true).ConfigureAwait(false); 12 | using (Assert.EnterMultipleScope()) 13 | { 14 | Assert.That(results, Is.Not.Null); 15 | Assert.That(results.Data, Is.Not.Null); 16 | } 17 | 18 | var results2 = await Client.GetSubSessionResultAsync(50033865, true).ConfigureAwait(false); 19 | using (Assert.EnterMultipleScope()) 20 | { 21 | Assert.That(results2, Is.Not.Null); 22 | Assert.That(results2.Data, Is.Not.Null); 23 | } 24 | 25 | var stats = MemoryCache.GetCurrentStatistics(); 26 | using (Assert.EnterMultipleScope()) 27 | { 28 | Assert.That(stats?.TotalHits, Is.Not.Null.And.EqualTo(1), "TotalHits didn't match."); 29 | Assert.That(stats?.TotalMisses, Is.Not.Null.And.EqualTo(1), "TotalMisses didn't match."); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/TimeAttack/TimeAttackTrack.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Aydsko.iRacingData.Constants; 5 | 6 | namespace Aydsko.iRacingData.TimeAttack; 7 | 8 | public class TimeAttackTrack 9 | { 10 | [JsonPropertyName("trackid")] 11 | public int Trackid { get; set; } 12 | 13 | [JsonPropertyName("w_time_of_day")] 14 | public int WTimeOfDay { get; set; } 15 | 16 | [JsonPropertyName("w_type")] 17 | public int WType { get; set; } 18 | 19 | [JsonPropertyName("w_temp")] 20 | public int WTemp { get; set; } 21 | 22 | [JsonPropertyName("w_humidity")] 23 | public int WHumidity { get; set; } 24 | 25 | [JsonPropertyName("w_wind_dir")] 26 | public int WWindDir { get; set; } 27 | 28 | [JsonIgnore] 29 | public WindDirection WeatherWindDirection => (WindDirection)WWindDir; 30 | 31 | [JsonPropertyName("w_wind_speed")] 32 | public int WWindSpeed { get; set; } 33 | 34 | [JsonPropertyName("w_skies")] 35 | public int WSkies { get; set; } 36 | 37 | [JsonPropertyName("w_fog_level")] 38 | public int WFogLevel { get; set; } 39 | 40 | [JsonPropertyName("w_wind_speed_units")] 41 | public int WWindSpeedUnits { get; set; } 42 | 43 | [JsonPropertyName("w_temp_units")] 44 | public int WTempUnits { get; set; } 45 | } 46 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/GetWorldRecordStatisticsSuccessfulAsync/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "headers": {}, 3 | "content": { 4 | "type": "stats_world_records", 5 | "data": { 6 | "success": true, 7 | "car_id": 145, 8 | "track_id": 341, 9 | "chunk_info": { 10 | "chunk_size": 2000, 11 | "num_chunks": 2, 12 | "rows": 10614, 13 | "base_download_url": "https://scorpio-assets.s3.amazonaws.com/members/messaging-services/short_lived/worldrecords/carid_145/trackid_341/year_all/quarter_all/", 14 | "chunk_file_names": [ 15 | "f6d4f9779b1965c2afff028f08eeca26bfb69857d3aa53cd2661382f2ad0c8ba.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220924T120128Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIAUO6OO4A3357USLO7%2F20220924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=f363ed5042b9108bfbc535fae3b57786dbb4077e208a20063643395185fd988c", 16 | "f7dadcb04caf0e264d1aa984ef889019b38ca1319102d691c35e5b4630d25e2b.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220924T120128Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=AKIAUO6OO4A3357USLO7%2F20220924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=3c30130011f5ef205eb081618b77017913b77871d7e490df8aa88db8412d6aad" 17 | ] 18 | }, 19 | "last_updated": "2022-09-24T12:01:28Z" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/Responses/ResponseUnknown504/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "statuscode": 504, 3 | "headers": { 4 | "x-ratelimit-remaining": "238", 5 | "x-ratelimit-limit": "240", 6 | "x-ratelimit-reset": "1657533187" 7 | }, 8 | "contentType": "text/html", 9 | "content": "\r\n\r\nERROR: The request could not be satisfied\r\n< BODY>\r\n

504 ERROR

\r\n

The request could not be satisfied.

\r\n
\r\nCloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection.\r\nWe can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.\r\n
\r\nIf you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.\r\n
\r\n
\r\n
\r\nGenerated by cloudfront (CloudFront)\r\nRequest ID: eSHdZe3nj2sm7o-Jg8cdkzntk-xMUR8lISRFnLBAI12OTMPaM4cnTg==\r\n
\r\n
\r\n
\r\n" 10 | } 11 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/LeagueDirectoryResultItem.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Leagues; 2 | 3 | public class LeagueDirectoryResultItem 4 | { 5 | [JsonPropertyName("league_id")] 6 | public int LeagueId { get; set; } 7 | 8 | [JsonPropertyName("owner_id")] 9 | public int OwnerId { get; set; } 10 | 11 | [JsonPropertyName("league_name")] 12 | public string LeagueName { get; set; } = default!; 13 | 14 | [JsonPropertyName("created")] 15 | public DateTime Created { get; set; } 16 | 17 | [JsonPropertyName("about")] 18 | public string About { get; set; } = default!; 19 | 20 | [JsonPropertyName("url")] 21 | public string Url { get; set; } = default!; 22 | 23 | [JsonPropertyName("roster_count")] 24 | public int RosterCount { get; set; } 25 | 26 | [JsonPropertyName("recruiting")] 27 | public bool Recruiting { get; set; } 28 | 29 | [JsonPropertyName("is_admin")] 30 | public bool IsAdmin { get; set; } 31 | 32 | [JsonPropertyName("is_member")] 33 | public bool IsMember { get; set; } 34 | 35 | [JsonPropertyName("pending_application")] 36 | public bool PendingApplication { get; set; } 37 | 38 | [JsonPropertyName("pending_invitation")] 39 | public bool PendingInvitation { get; set; } 40 | 41 | [JsonPropertyName("owner")] 42 | public Owner Owner { get; set; } = default!; 43 | } 44 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Exceptions/iRacingClientOptionsValueMissingException.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Aydsko.iRacingData.Exceptions; 7 | 8 | [Serializable] 9 | public class iRacingClientOptionsValueMissingException : iRacingDataClientException 10 | { 11 | public static iRacingClientOptionsValueMissingException Create(string propertyName) 12 | { 13 | return new($"Required iRacingDataClientOptions value \"{propertyName}\" is null or whitespace."); 14 | } 15 | 16 | public iRacingClientOptionsValueMissingException() 17 | { } 18 | 19 | public iRacingClientOptionsValueMissingException(string message) 20 | : base(message) 21 | { } 22 | 23 | public iRacingClientOptionsValueMissingException(string message, Exception innerException) 24 | : base(message, innerException) 25 | { } 26 | 27 | #if NET8_0_OR_GREATER 28 | [Obsolete("Apply cross-targeting work-around for SYSLIB0051 Diagnostic (https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0051)", DiagnosticId = "SYSLIB0051")] 29 | #endif 30 | protected iRacingClientOptionsValueMissingException(SerializationInfo serializationInfo, StreamingContext streamingContext) 31 | : base(serializationInfo, streamingContext) 32 | { } 33 | } 34 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Member/ParticipationCredits.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Member; 2 | 3 | public class ParticipationCredits 4 | { 5 | [JsonPropertyName("cust_id")] 6 | public int CustomerId { get; set; } 7 | 8 | [JsonPropertyName("season_id")] 9 | public int SeasonId { get; set; } 10 | 11 | [JsonPropertyName("series_id")] 12 | public int SeriesId { get; set; } 13 | 14 | [JsonPropertyName("series_name")] 15 | public string SeriesName { get; set; } = default!; 16 | 17 | [JsonPropertyName("license_group")] 18 | public int LicenseGroup { get; set; } 19 | 20 | [JsonPropertyName("license_group_name")] 21 | public string LicenseGroupName { get; set; } = default!; 22 | 23 | [JsonPropertyName("participation_credits")] 24 | public int Credits { get; set; } 25 | 26 | [JsonPropertyName("min_weeks")] 27 | public int MinimumWeeks { get; set; } 28 | 29 | [JsonPropertyName("weeks")] 30 | public int Weeks { get; set; } 31 | 32 | [JsonPropertyName("earned_credits")] 33 | public int EarnedCredits { get; set; } 34 | 35 | [JsonPropertyName("total_credits")] 36 | public int TotalCredits { get; set; } 37 | } 38 | 39 | [JsonSerializable(typeof(ParticipationCredits[])), JsonSourceGenerationOptions(WriteIndented = true)] 40 | internal partial class ParticipationCreditsArrayContext : JsonSerializerContext 41 | { } 42 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Converters/UriConverter.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using System.Text.Json; 5 | 6 | namespace Aydsko.iRacingData.Converters; 7 | 8 | public sealed class UriConverter : JsonConverter 9 | { 10 | public override Uri? Read(ref Utf8JsonReader reader, 11 | Type typeToConvert, 12 | JsonSerializerOptions options) 13 | { 14 | var uriString = reader.GetString()?.Trim(); 15 | 16 | if (uriString is null or { Length: 0 } 17 | || Uri.TryCreate(uriString, UriKind.Absolute, out var uri)) 18 | { 19 | return default; 20 | } 21 | 22 | return uri; 23 | } 24 | 25 | public override void Write(Utf8JsonWriter writer, 26 | Uri value, 27 | JsonSerializerOptions options) 28 | { 29 | #if NET6_0_OR_GREATER 30 | ArgumentNullException.ThrowIfNull(writer); 31 | #else 32 | if (writer is null) 33 | { 34 | throw new ArgumentNullException(nameof(writer)); 35 | } 36 | #endif 37 | 38 | if (value is null) 39 | { 40 | writer.WriteNullValue(); 41 | return; 42 | } 43 | 44 | writer.WriteStringValue(value.AbsoluteUri); 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Converters/DateTimeConverter.cs: -------------------------------------------------------------------------------- 1 | // © 2023-2025 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using System.Globalization; 5 | using System.Text.Json; 6 | 7 | namespace Aydsko.iRacingData.Converters; 8 | 9 | public sealed class DateTimeConverter : JsonConverter 10 | { 11 | public override DateTime Read(ref Utf8JsonReader reader, 12 | Type typeToConvert, 13 | JsonSerializerOptions options) 14 | { 15 | var dateString = reader.GetString()?.Trim(); 16 | 17 | if (dateString is null or { Length: 0 }) 18 | { 19 | return default; 20 | } 21 | 22 | var dateValue = DateTime.ParseExact(dateString, "yyyy-MM-dd", CultureInfo.InvariantCulture); 23 | return dateValue; 24 | } 25 | 26 | public override void Write(Utf8JsonWriter writer, 27 | DateTime value, 28 | JsonSerializerOptions options) 29 | { 30 | #if NET6_0_OR_GREATER 31 | ArgumentNullException.ThrowIfNull(writer); 32 | #else 33 | if (writer is null) 34 | { 35 | throw new ArgumentNullException(nameof(writer)); 36 | } 37 | #endif 38 | 39 | writer.WriteStringValue(value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Leagues/SeasonStandingsTeamStandings.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Leagues; 5 | 6 | public class SeasonStandingsTeamStandings 7 | { 8 | [JsonPropertyName("rownum")] 9 | public int RowNumber { get; set; } 10 | 11 | [JsonPropertyName("position")] 12 | public int Position { get; set; } 13 | 14 | [JsonPropertyName("team")] 15 | public SeasonStandingsTeam Team { get; set; } = null!; 16 | 17 | [JsonPropertyName("car_number")] 18 | public string CarNumber { get; set; } = default!; 19 | 20 | [JsonPropertyName("wins")] 21 | public int Wins { get; set; } 22 | 23 | [JsonPropertyName("average_start")] 24 | public int AverageStart { get; set; } 25 | 26 | [JsonPropertyName("average_finish")] 27 | public int AverageFinish { get; set; } 28 | 29 | [JsonPropertyName("base_points")] 30 | public int BasePoints { get; set; } 31 | 32 | [JsonPropertyName("negative_adjustments")] 33 | public int NegativeAdjustments { get; set; } 34 | 35 | [JsonPropertyName("positive_adjustments")] 36 | public int PositiveAdjustments { get; set; } 37 | 38 | [JsonPropertyName("total_adjustments")] 39 | public int TotalAdjustments { get; set; } 40 | 41 | [JsonPropertyName("total_points")] 42 | public int TotalPoints { get; set; } 43 | } 44 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/SpectatorSubsessionDetail.cs: -------------------------------------------------------------------------------- 1 | // © 2024 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Series; 5 | 6 | /// Details of a subsession available to spectate. 7 | public class SpectatorSubsessionDetail 8 | { 9 | /// The subsession identifier. 10 | [JsonPropertyName("subsession_id")] 11 | public int SubsessionId { get; set; } 12 | 13 | /// The session identifier. 14 | /// All subsessions which are instances of the same race share a session identifier value. 15 | [JsonPropertyName("session_id")] 16 | public int SessionId { get; set; } 17 | 18 | /// The season identifier for which this subsession is a part. 19 | [JsonPropertyName("season_id")] 20 | public int SeasonId { get; set; } 21 | 22 | /// The start time of the subsession. 23 | [JsonPropertyName("start_time")] 24 | public DateTimeOffset StartTime { get; set; } 25 | 26 | /// The week number of the season for which this subsession is a part. 27 | [JsonPropertyName("race_week_num")] 28 | public int RaceWeekNum { get; set; } 29 | 30 | /// The event type of the subsession. 31 | [JsonPropertyName("event_type")] 32 | public EventType EventType { get; set; } 33 | } 34 | -------------------------------------------------------------------------------- /doc/docfx_project/templates/minimal/styles/main.css: -------------------------------------------------------------------------------- 1 | .sidefilter, .sidetoc, #toc { 2 | background-color: #FFFFFF; 3 | border-left: #FFFFFF; 4 | } 5 | 6 | .navbar-default, .navbar, .navbar-collapse { 7 | border-color: #e7e7e7; 8 | } 9 | 10 | .toc-filter { 11 | border: 1px solid #e7e7e7; 12 | } 13 | 14 | .navbar .navbar-nav > .active > a,.navbar .navbar-nav > li > a { 15 | color: #000000; 16 | background-color: #FFFFFF; 17 | } 18 | 19 | .navbar .navbar-nav > .active > a:focus, .navbar .navbar-nav > .active > a:hover,.navbar .navbar-nav > li > a:hover { 20 | color: #9d9d9d; 21 | background-color: #FFFFFF; 22 | } 23 | 24 | .grad-bottom { 25 | height: 0px; 26 | } 27 | 28 | .footer { 29 | background-color: #FFFFFF; 30 | } 31 | 32 | .navbar-brand > img { 33 | padding: 10px 15px; 34 | height: 50px; 35 | } 36 | 37 | .sidetoc.shiftup { 38 | bottom: 0px; 39 | } 40 | 41 | .sidetoc { 42 | top: 110px; 43 | } 44 | 45 | .sidefilter { 46 | top: 50px; 47 | } 48 | 49 | .icon-bar { 50 | background-color: black; 51 | } 52 | 53 | .btn { 54 | text-align: left; 55 | } 56 | 57 | .sidenav, .fixed_header, .toc { 58 | background-color: #FFFFFF; 59 | } 60 | 61 | .toc > ul { 62 | text-align: left; 63 | } 64 | 65 | body { 66 | font-size: 16px; 67 | } 68 | 69 | header { 70 | background-color: #FFFFFF; 71 | } 72 | 73 | .toc .nav > li { 74 | display: block; 75 | } 76 | 77 | .toc li:after { 78 | content: ""; 79 | } -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Results/RaceSummary.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | namespace Aydsko.iRacingData.Results; 5 | 6 | public class RaceSummary 7 | { 8 | [JsonPropertyName("subsession_id")] 9 | public int SubsessionId { get; set; } 10 | 11 | [JsonPropertyName("average_lap")] 12 | public int AverageLap { get; set; } 13 | 14 | [JsonIgnore] 15 | public TimeSpan AverageLapTime => TimeSpan.FromSeconds(AverageLap / 10000D); 16 | 17 | [JsonPropertyName("laps_complete")] 18 | public int LapsComplete { get; set; } 19 | 20 | [JsonPropertyName("num_cautions")] 21 | public int NumberOfCautions { get; set; } 22 | 23 | [JsonPropertyName("num_caution_laps")] 24 | public int NumberOfCautionLaps { get; set; } 25 | 26 | [JsonPropertyName("num_lead_changes")] 27 | public int NumberOfLeadChanges { get; set; } 28 | 29 | [JsonPropertyName("field_strength")] 30 | public int FieldStrength { get; set; } 31 | 32 | [JsonPropertyName("num_opt_laps")] 33 | public int NumberOfOptLaps { get; set; } 34 | 35 | [JsonPropertyName("has_opt_path")] 36 | public bool HasOptPath { get; set; } 37 | 38 | [JsonPropertyName("special_event_type")] 39 | public int SpecialEventType { get; set; } 40 | 41 | [JsonPropertyName("special_event_type_text")] 42 | public string SpecialEventTypeText { get; set; } = default!; 43 | } 44 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.UnitTests/ResourceNotFoundException.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Aydsko.iRacingData.UnitTests; 7 | 8 | #pragma warning disable CA1515 // Consider making public types internal - exceptions shouldn't be internal 9 | [Serializable] 10 | public class ResourceNotFoundException : Exception 11 | { 12 | public ResourceNotFoundException() 13 | { 14 | } 15 | 16 | public ResourceNotFoundException(string? message) 17 | : base(message) 18 | { 19 | } 20 | 21 | public ResourceNotFoundException(string? message, Exception? innerException) 22 | : base(message, innerException) 23 | { 24 | } 25 | 26 | #if NET8_0_OR_GREATER 27 | [Obsolete("Apply cross-targeting work-around for SYSLIB0051 Diagnostic (https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0051)", DiagnosticId = "SYSLIB0051")] 28 | #endif 29 | protected ResourceNotFoundException(SerializationInfo info, StreamingContext context) 30 | : base(info, context) 31 | { 32 | } 33 | 34 | public static Exception ForManifestResourceName(string manifestResourceName) 35 | { 36 | return new ResourceNotFoundException($"Failed to locate resource with name \"{manifestResourceName}\"."); 37 | } 38 | } 39 | #pragma warning restore CA1515 // Consider making public types internal 40 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData/Series/WeatherSummary.cs: -------------------------------------------------------------------------------- 1 | namespace Aydsko.iRacingData.Series; 2 | 3 | public class WeatherSummary 4 | { 5 | [JsonPropertyName("max_precip_rate")] 6 | public decimal MaxPrecipitationRate { get; set; } 7 | 8 | [JsonPropertyName("max_precip_rate_desc")] 9 | public string? MaxPrecipitationRateDesc { get; set; } 10 | 11 | [JsonPropertyName("precip_chance")] 12 | public decimal PrecipitationChance { get; set; } 13 | 14 | [JsonPropertyName("skies_high")] 15 | public int SkiesHigh { get; set; } 16 | 17 | [JsonPropertyName("skies_low")] 18 | public int SkiesLow { get; set; } 19 | 20 | [JsonPropertyName("temp_high")] 21 | public decimal TemperatureHigh { get; set; } 22 | 23 | [JsonPropertyName("temp_low")] 24 | public decimal TemperatureLow { get; set; } 25 | 26 | [JsonPropertyName("temp_units")] 27 | public int TemperatureUnits { get; set; } 28 | 29 | [JsonPropertyName("wind_high")] 30 | public decimal WindHigh { get; set; } 31 | 32 | [JsonPropertyName("wind_low")] 33 | public decimal WindLow { get; set; } 34 | 35 | /// Wind units. 36 | /// 37 | /// Maps to one of the weather_wind_speed_units lookup values retrieved 38 | /// from the call. 39 | /// 40 | [JsonPropertyName("wind_units")] 41 | public int WindUnits { get; set; } 42 | } 43 | -------------------------------------------------------------------------------- /src/Aydsko.iRacingData.IntegrationTests/Tracks/GetTracksTests.cs: -------------------------------------------------------------------------------- 1 | // © 2023 Adrian Clark 2 | // This file is licensed to you under the MIT license. 3 | 4 | using Aydsko.iRacingData.Tracks; 5 | 6 | namespace Aydsko.iRacingData.IntegrationTests.Tracks; 7 | 8 | internal sealed class GetTracksTests : DataClientIntegrationFixture 9 | { 10 | private Track[] tracksData = default!; 11 | 12 | [OneTimeSetUp] 13 | public async Task GetTrackDataAsync() 14 | { 15 | var tracksResponse = await Client.GetTracksAsync(CancellationToken.None).ConfigureAwait(false); 16 | tracksData = tracksResponse.Data; 17 | } 18 | 19 | [TestCaseSource(nameof(GetTestCases))] 20 | public decimal? CheckTrackLength(int trackId) 21 | { 22 | var track = tracksData.SingleOrDefault(t => t.TrackId == trackId); 23 | return track?.TrackConfigLengthKm; 24 | } 25 | 26 | private static IEnumerable GetTestCases() 27 | { 28 | yield return new(390) { ExpectedResult = 4.57M }; 29 | yield return new(391) { ExpectedResult = 3.68M }; 30 | yield return new(197) { ExpectedResult = 1.39M }; 31 | yield return new(152) { ExpectedResult = 4.44M }; 32 | yield return new(151) { ExpectedResult = 1.44M }; 33 | yield return new(95) { ExpectedResult = 6.01M }; 34 | yield return new(50) { ExpectedResult = 6.51M }; 35 | yield return new(341) { ExpectedResult = 5.89M }; 36 | } 37 | } 38 | --------------------------------------------------------------------------------