person view add endpoint added

This commit is contained in:
2024-10-19 17:29:36 +02:00
Unverified
parent 84e78d3f4d
commit 28dcc102e6
6 changed files with 52 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ public class Persons
public string PutPerson { get; set; }
public string DeletePerson { get; set; }
public string GetPersonsViewRank { get; set; }
public string PostPersonsView { get; set; }
public string GetPersonPhoto { get; set; }
public string PutPersonPhoto { get; set; }
public string DeletePersonPhoto { get; set; }

View File

@@ -138,6 +138,18 @@ public class PersonsWebAPIService : BaseWebAPIService, IPersonsWebAPIService
.RegisterActionFor400BadRequest(badRequestAction)
.ExecuteAction();
}
public async Task PostPersonsView(long personId, Action? successAction = null, Action? notFoundAction = null)
{
string url = GetUrl(EndpointsConfiguration.Persons.PostPersonsView, personId);
HttpRequest request = new HttpRequest(HttpMethodType.Post, url);
HttpResponse response = await _httpClientService.SendRequestAsync(request);
response.RegisterActionFor2XXSuccess(successAction)
.RegisterActionFor404NotFound(notFoundAction)
.ExecuteAction();
}
#endregion

View File

@@ -94,6 +94,7 @@
"PutPerson": "/{0}",
"DeletePerson": "/{0}",
"GetPersonsViewRank": "/view",
"PostPersonsView": "/{0}/view",
"GetPersonPhoto": "/{0}/photo",
"PutPersonPhoto": "/{0}/photo",
"DeletePersonPhoto": "/{0}/photo",