Recently, support for getting only the latest breach was added to the V3 API of HaveIBeenPwned.com. We should implement it as well.
Let's expand IHaveIBeenPwnedBreachesClient and add the new methods and implement them in HaveIBeenPwnedClient.
/// <summary>
/// Get the latest breach for an account
/// </summary>
/// <param name="account">
/// The account to get the latest breach for
/// </param>
/// <returns>
/// An awaitable <see cref="Task{TResult}"/> with the latest
/// <see cref="Breach"/> the account was found in
/// </returns>
Task<Breach> GetLatestBreachAsync(string account);
/// <summary>
/// Get the latest breach for an account
/// </summary>
/// <param name="account">
/// The account to get the latest breach for
/// </param>
/// <param name="cancellationToken">
/// The <see cref="CancellationToken"/> for this operation
/// </param>
/// <returns>
/// An awaitable <see cref="Task{TResult}"/> with the latest
/// <see cref="Breach"/> the account was found in
/// </returns>
Task<Breach> GetLatestBreachAsync(string account, CancellationToken cancellationToken);
Recently, support for getting only the latest breach was added to the V3 API of HaveIBeenPwned.com. We should implement it as well.
Let's expand
IHaveIBeenPwnedBreachesClient
and add the new methods and implement them inHaveIBeenPwnedClient
.