get all accounts endpoint added
This commit is contained in:
@@ -150,6 +150,19 @@ public class AccountsClientService(IHttpClientService httpClientService, IConfig
|
||||
.ExecuteAction();
|
||||
}
|
||||
|
||||
public async Task GetAccounts(AccountQueryParameters query, Action<IEnumerable<AccountResponse>>? successAction = null)
|
||||
{
|
||||
string url = GetUrl(EndpointsConfiguration.Accounts.GetAccounts);
|
||||
HttpRequest request = new HttpRequest(HttpMethodType.Get, url)
|
||||
{
|
||||
Query = query
|
||||
};
|
||||
|
||||
HttpResponse response = await httpClientService.SendRequestAsync(request);
|
||||
response.RegisterActionFor2XXSuccess(successAction)
|
||||
.ExecuteAction();
|
||||
}
|
||||
|
||||
public async Task GetAccount(long id, Action<AccountResponse>? successAction = null, Action? notFoundAction = null)
|
||||
{
|
||||
string url = GetUrl(EndpointsConfiguration.Accounts.GetAccount, id);
|
||||
|
||||
@@ -18,6 +18,7 @@ public interface IAccountsClientService
|
||||
Task GetAccountProfileBackground(long id, Action<PhotoResponse>? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? notFoundAction = null);
|
||||
Task PutAccountProfileBackground(AccountProfileBackgroundRequest data, Action<PhotoResponse>? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? unauthorizedAction = null);
|
||||
Task DeleteAccountProfileBackground(Action? successAction = null, Action? unauthorizedAction = null);
|
||||
Task GetAccounts(AccountQueryParameters query, Action<IEnumerable<AccountResponse>>? successAction = null);
|
||||
Task GetAccount(long id, Action<AccountResponse>? successAction = null, Action? notFoundAction = null);
|
||||
Task PutAccountProfileInfo(AccountProfileInfoRequest data, Action? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? unauthorizedAction = null);
|
||||
Task PatchAccountUsername(AccountUsernameRequest data, Action? successAction = null, Action<IDictionary<string, string[]>>? badRequestAction = null, Action? unauthorizedAction = null);
|
||||
|
||||
@@ -13,6 +13,7 @@ public class Accounts
|
||||
public string GetAccountProfileBackground { get; set; }
|
||||
public string PutAccountProfileBackground { get; set; }
|
||||
public string DeleteAccountProfileBackground { get; set; }
|
||||
public string GetAccounts { get; set; }
|
||||
public string GetAccount { get; set; }
|
||||
public string PutAccountProfileInfo { get; set; }
|
||||
public string PatchAccountUsername { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user