Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Turnierplan.Adapter/TurnierplanClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public sealed class TurnierplanClient : IDisposable
/// </remarks>
public TurnierplanClient(HttpClient httpClient, TurnierplanClientOptions options)
{
ArgumentException.ThrowIfNullOrWhiteSpace(options.ApiKey);
ArgumentException.ThrowIfNullOrWhiteSpace(options.ApiKeyId);
ArgumentException.ThrowIfNullOrWhiteSpace(options.ApiKeySecret);

_httpClient = httpClient;
_httpClient.BaseAddress = options.ApplicationUri;

_httpClient.DefaultRequestHeaders.Add(ApiKeyIdHeaderName, options.ApiKey);
_httpClient.DefaultRequestHeaders.Add(ApiKeyIdHeaderName, options.ApiKeyId);
_httpClient.DefaultRequestHeaders.Add(ApiKeySecretHeaderName, options.ApiKeySecret);
}

Expand Down
14 changes: 7 additions & 7 deletions src/Turnierplan.Adapter/TurnierplanClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ public sealed record TurnierplanClientOptions
/// Initializes a new instance of the <see cref="TurnierplanClientOptions"/> class with the specified options.
/// </summary>
/// <param name="applicationUri">The base URI of the turnierplan.NET instance that should be queried.</param>
/// <param name="apiKey">The id of the API key.</param>
/// <param name="apiKeyId">The id of the API key.</param>
/// <param name="apiKeySecret">The secret of the API key.</param>
public TurnierplanClientOptions(Uri applicationUri, string apiKey, string apiKeySecret)
public TurnierplanClientOptions(Uri applicationUri, string apiKeyId, string apiKeySecret)
{
ApplicationUri = applicationUri;
ApiKey = apiKey;
ApiKeyId = apiKeyId;
ApiKeySecret = apiKeySecret;
}

/// <summary>
/// Initializes a new instance of the <see cref="TurnierplanClientOptions"/> class with the specified options.
/// </summary>
/// <param name="applicationUri">The base URI of the turnierplan.NET instance that should be queried.</param>
/// <param name="apiKey">The id of the API key.</param>
/// <param name="apiKeyId">The id of the API key.</param>
/// <param name="apiKeySecret">The secret of the API key.</param>
public TurnierplanClientOptions(string applicationUri, string apiKey, string apiKeySecret)
: this(new Uri(applicationUri), apiKey, apiKeySecret)
public TurnierplanClientOptions(string applicationUri, string apiKeyId, string apiKeySecret)
: this(new Uri(applicationUri), apiKeyId, apiKeySecret)
{
}

Expand All @@ -37,7 +37,7 @@ public TurnierplanClientOptions(string applicationUri, string apiKey, string api
/// <summary>
/// The id of the API key.
/// </summary>
public string ApiKey { get; }
public string ApiKeyId { get; }

/// <summary>
/// The secret of the API key.
Expand Down