Class iRacingDataClientOptions
Configuration options for the iRacing Data Client.
Inherited Members
Namespace: Aydsko.iRacingData
Assembly: Aydsko.iRacingData.dll
Syntax
public class iRacingDataClientOptions
Properties
ApiBaseUrl
The base URL for the iRacing "/data" API. All calls will be made relative to this.
Declaration
public string ApiBaseUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This should not be changed unless you are sure you need an alternate endpoint.
This will default to https://members-ng.iracing.com.
AuthServiceBaseUrl
The base URL for the iRacing Auth Service. All OAuth calls will be made relative to this.
Declaration
public string AuthServiceBaseUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This should not be changed unless you are sure you need an alternate endpoint.
This will default to https://oauth.iracing.com.
ClientId
The client_id value for password_limited OAuth flow.
Declaration
public string? ClientId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
ClientSecret
The client_secret value for password_limited OAuth flow.
Declaration
public string? ClientSecret { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
See Also
ClientSecretIsEncoded
If true indicates the ClientSecret property value is already encoded ready for submission to the iRacing API.
Declaration
public bool ClientSecretIsEncoded { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
CurrentDateTimeSource
The source of the current date and time in UTC for the library.
Declaration
[Obsolete("Add your own TimeProvider to the service collection (see https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider).")]
public Func<DateTimeOffset>? CurrentDateTimeSource { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<DateTimeOffset> |
Remarks
Defaults to System.TimeProvider.GetUtcNow().
OAuthTokenResponseCallback
Callback to allow the library to request an iRacing OAuth token.
Declaration
public GetOAuthTokenResponse? OAuthTokenResponseCallback { get; set; }
Property Value
| Type | Description |
|---|---|
| GetOAuthTokenResponse |
Remarks
Intended to be used with the "Authorization Code Grant" process.
See Also
Password
Password associated with the iRacing user name used to authenticate.
Declaration
public string? Password { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PasswordIsEncoded
If true indicates the Password property value is already encoded ready for submission to the iRacing API.
Declaration
public bool PasswordIsEncoded { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
RestoreCookies
Called to retrieve cookie values stored from a previous authentication.
Declaration
public Func<CookieCollection>? RestoreCookies { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<CookieCollection> |
SaveCookies
After a successful authentication called with the cookies to allow them to be saved.
Declaration
public Action<CookieCollection>? SaveCookies { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<CookieCollection> |
Remarks
One of the cookies returned in this collection irsso_membersv2 may be used to authenticate with the /membersite and /memberstats endpoints on the classic site's API.
UserAgentProductName
Name of the application or product using the Data Client library to be included in the HTTP User-Agent header.
Declaration
public string? UserAgentProductName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
UserAgentProductVersion
Version of the application or product using the Data Client library to be included in the HTTP User-Agent header.
Declaration
public Version? UserAgentProductVersion { get; set; }
Property Value
| Type | Description |
|---|---|
| Version |
Username
iRacing user name to use for authentication.
Declaration
public string? Username { get; set; }
Property Value
| Type | Description |
|---|---|
| string |