Skip to content

Commit

Permalink
(GH-367) SenderAuthentication.GetAllReverseDnsAsync must return Pagin…
Browse files Browse the repository at this point in the history
…atedResponseWithLinks
  • Loading branch information
Jericho committed Aug 9, 2024
1 parent 1505d74 commit 110d178
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task RunAsync(IBaseClient client, TextWriter log, CancellationToken
await log.WriteLineAsync("\n***** SENDER AUTHENTICATION: Reverse DNS *****").ConfigureAwait(false);

var reverseDnsRecords = await client.SenderAuthentication.GetAllReverseDnsAsync(null, 50, 0, null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"All AuthenticatedSender reverse DNS retrieved. There are {reverseDnsRecords.Length} records").ConfigureAwait(false);
await log.WriteLineAsync($"All AuthenticatedSender reverse DNS retrieved. There are {reverseDnsRecords.Records.Length} records").ConfigureAwait(false);


await log.WriteLineAsync("\n***** SENDER AUTHENTICATION: LINKS *****").ConfigureAwait(false);
Expand Down
4 changes: 2 additions & 2 deletions Source/StrongGrid/Resources/ISenderAuthentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ public interface ISenderAuthentication
/// <param name="onBehalfOf">The user to impersonate.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>
/// An array of <see cref="ReverseDns" />.
/// The <see cref="PaginatedResponseWithLinks{ReverseDns}" />.
/// </returns>
Task<ReverseDns[]> GetAllReverseDnsAsync(string segmentPrefix = null, int limit = 50, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default);
Task<PaginatedResponseWithLinks<ReverseDns>> GetAllReverseDnsAsync(string segmentPrefix = null, int limit = 50, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default);

/// <summary>
/// Get a specific reverse DNS.
Expand Down
6 changes: 3 additions & 3 deletions Source/StrongGrid/Resources/SenderAuthentication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ public Task<AuthenticatedDomain> AssociateDomainAsync(long domainId, string user
/// <param name="onBehalfOf">The user to impersonate.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>
/// An array of <see cref="ReverseDns" />.
/// The <see cref="PaginatedResponseWithLinks{ReverseDns}" />.
/// </returns>
public Task<ReverseDns[]> GetAllReverseDnsAsync(string segmentPrefix = null, int limit = 50, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default)
public Task<PaginatedResponseWithLinks<ReverseDns>> GetAllReverseDnsAsync(string segmentPrefix = null, int limit = 50, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default)
{
return _client
.GetAsync($"{_endpoint}/ips")
Expand All @@ -307,7 +307,7 @@ public Task<ReverseDns[]> GetAllReverseDnsAsync(string segmentPrefix = null, int
.WithArgument("offset", offset)
.WithArgument("ip", segmentPrefix)
.WithCancellationToken(cancellationToken)
.AsObject<ReverseDns[]>();
.AsPaginatedResponseWithLinks<ReverseDns>();
}

/// <summary>
Expand Down

0 comments on commit 110d178

Please sign in to comment.