PersonRolesEditActorComponent added
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
public class Media
|
||||
{
|
||||
public string Base { get; set; }
|
||||
public string GetAllMedia { get; set; }
|
||||
public string GetMedia { get; set; }
|
||||
public string GetMediaGenres { get; set; }
|
||||
public string PostMediaGenre { get; set; }
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace WatchIt.Website.Services.WebAPI.Media;
|
||||
|
||||
public interface IMediaWebAPIService
|
||||
{
|
||||
Task GetAllMedia(MediaQueryParameters? query = null, Action<IEnumerable<MediaResponse>>? successAction = null);
|
||||
Task GetMedia(long mediaId, Action<MediaResponse>? successAction = null, Action? notFoundAction = null);
|
||||
|
||||
Task GetMediaGenres(long mediaId, Action<IEnumerable<GenreResponse>>? successAction = null, Action? notFoundAction = null);
|
||||
|
||||
@@ -35,6 +35,18 @@ public class MediaWebAPIService : BaseWebAPIService, IMediaWebAPIService
|
||||
|
||||
#region Main
|
||||
|
||||
public async Task GetAllMedia(MediaQueryParameters? query = null, Action<IEnumerable<MediaResponse>>? successAction = null)
|
||||
{
|
||||
string url = GetUrl(EndpointsConfiguration.Media.GetAllMedia);
|
||||
|
||||
HttpRequest request = new HttpRequest(HttpMethodType.Get, url);
|
||||
request.Query = query;
|
||||
|
||||
HttpResponse response = await _httpClientService.SendRequestAsync(request);
|
||||
response.RegisterActionFor2XXSuccess(successAction)
|
||||
.ExecuteAction();
|
||||
}
|
||||
|
||||
public async Task GetMedia(long mediaId, Action<MediaResponse>? successAction = null, Action? notFoundAction = null)
|
||||
{
|
||||
string url = GetUrl(EndpointsConfiguration.Media.GetMedia, mediaId);
|
||||
|
||||
Reference in New Issue
Block a user