Skip to content

Commit 0270c3c

Browse files
authored
Merge pull request #106 from ahwm/copilot/sub-pr-87
Fix code review feedback: API typo, null safety, duplicate property, docs
2 parents a9989ea + 863d15d commit 0270c3c

6 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/GodaddyWrapper/Client.Agreements.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public async Task<List<LegalAgreementResponse>> RetrieveAgreements(AgreementRetr
2222
httpClient.DefaultRequestHeaders.Add("X-Private-Label-Id", XPrivateLabelId);
2323
if (XMarketId != null)
2424
httpClient.DefaultRequestHeaders.Add("X-Market-Id", XMarketId);
25-
var response = await httpClient.GetAsync($"{V1_BASE}aggreements{QueryStringBuilder.RequestObjectToQueryString(request)}");
25+
var response = await httpClient.GetAsync($"{V1_BASE}agreements{QueryStringBuilder.RequestObjectToQueryString(request)}");
2626
await CheckResponseMessageIsValid(response);
2727
return await response.Content.ReadAsAsync<List<LegalAgreementResponse>>(JsonSettings);
2828
}

src/GodaddyWrapper/Client.Domain.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace GodaddyWrapper
99
{
1010
public partial class GoDaddyClient
1111
{
12-
private const string V1_BASE = "v1/";
1312

1413
/// <summary>
1514
/// Add the specified DNS Records to the specified Domain

src/GodaddyWrapper/Client.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ namespace GodaddyWrapper
2222
{
2323
public partial class GoDaddyClient
2424
{
25+
private const string V1_BASE = "v1/";
26+
private const string V2_BASE = "v2/";
27+
2528
private readonly HttpClient httpClient;
2629
private readonly static JsonSerializerOptions JsonSettings = JsonContext.Default.Options;
2730

src/GodaddyWrapper/Helper/QueryStringBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public static string DictionaryToQueryString(Dictionary<string, string> paramete
6969
var query = new StringBuilder("?");
7070
foreach (var kvp in parameters)
7171
{
72-
query.Append($"{kvp.Key}={Uri.EscapeDataString(kvp.Value)}&");
72+
if (kvp.Value != null)
73+
query.Append($"{kvp.Key}={Uri.EscapeDataString(kvp.Value)}&");
7374
}
7475
return query.ToString().TrimEnd('&');
7576
}

src/GodaddyWrapper/Requests/DomainUpdateV2.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,5 @@ public class DomainUpdateV2
3232
/// Whether or not privacy protection is enabled
3333
/// </summary>
3434
public bool? PrivacyEnabled { get; set; }
35-
36-
/// <summary>
37-
/// Whether or not the domain is set to auto-renew
38-
/// </summary>
39-
public bool? AutoRenewEnabled { get; set; }
4035
}
4136
}

src/GodaddyWrapper/Services.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace GodaddyWrapper
88
public static class ServicesExtension
99
{
1010
/// <summary>
11-
/// Add GoDaddy API client with v1 endpoints
11+
/// Add GoDaddy API client
1212
/// </summary>
1313
/// <param name="services"></param>
1414
/// <param name="accessKey"></param>

0 commit comments

Comments
 (0)