Refactoring, database structure changed
This commit is contained in:
118
WatchIt.Website/Clients/IAccountsClient.cs
Normal file
118
WatchIt.Website/Clients/IAccountsClient.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using Refit;
|
||||
using WatchIt.Database.Model.Media;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.Account;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.AccountBackgroundPicture;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.AccountEmail;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.AccountLogout;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.AccountPassword;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.AccountProfileInfo;
|
||||
using WatchIt.DTO.Models.Controllers.Accounts.AccountUsername;
|
||||
using WatchIt.DTO.Models.Controllers.Media.Medium.Query;
|
||||
using WatchIt.DTO.Models.Controllers.Media.Medium.Response;
|
||||
using WatchIt.DTO.Models.Controllers.People.Person;
|
||||
using WatchIt.DTO.Models.Controllers.People.Person.Query;
|
||||
using WatchIt.DTO.Models.Controllers.Photos.Photo;
|
||||
using WatchIt.DTO.Models.Generics.Image;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IAccountsClient
|
||||
{
|
||||
#region Main
|
||||
|
||||
[Get("/")]
|
||||
Task<IApiResponse<IEnumerable<AccountResponse>>> GetAccounts([Query] AccountFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_profile_pictures")] bool includeProfilePictures = false);
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<IApiResponse<AccountResponse>> GetAccount(long id, [Query][AliasAs("include_profile_pictures")] bool includeProfilePictures = false);
|
||||
|
||||
[Post("/")]
|
||||
Task<IApiResponse<AccountResponse>> PostAccount([Body] AccountRequest body);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Profile picture
|
||||
|
||||
[Get("/{id}/profile_picture")]
|
||||
Task<IApiResponse<ImageResponse>> GetAccountProfilePicture(long id);
|
||||
|
||||
[Put("/profile_picture")]
|
||||
Task<IApiResponse<ImageResponse>> PutAccountProfilePicture([Authorize]string token, [Body] ImageRequest body);
|
||||
|
||||
[Delete("/profile_picture")]
|
||||
Task<IApiResponse> DeleteAccountProfilePicture([Authorize]string token);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Background picture
|
||||
|
||||
[Get("/{id}/background_picture")]
|
||||
Task<IApiResponse<PhotoResponse>> GetAccountBackgroundPicture(long id);
|
||||
|
||||
[Put("/background_picture")]
|
||||
Task<IApiResponse<PhotoResponse>> PutAccountBackgroundPicture([Authorize]string token, [Body] AccountBackgroundPictureRequest body);
|
||||
|
||||
[Delete("/background_picture")]
|
||||
Task<IApiResponse> DeleteAccountBackgroundPicture([Authorize]string token);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Profile edit
|
||||
|
||||
[Patch("/profile_info")]
|
||||
Task<IApiResponse> PatchAccountProfileInfo([Authorize]string token, [Body] AccountProfileInfoRequest body);
|
||||
|
||||
[Patch("/username")]
|
||||
Task<IApiResponse> PatchAccountUsername([Authorize]string token, [Body] AccountUsernameRequest body);
|
||||
|
||||
[Patch("/email")]
|
||||
Task<IApiResponse> PatchAccountEmail([Authorize]string token, [Body] AccountEmailRequest body);
|
||||
|
||||
[Patch("/password")]
|
||||
Task<IApiResponse> PatchAccountPassword([Authorize]string token, [Body] AccountPasswordRequest body);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Log out
|
||||
|
||||
[Delete("/logout")]
|
||||
Task<IApiResponse> Logout([Body] AccountLogoutRequest body);
|
||||
|
||||
[Delete("/logout_all")]
|
||||
Task<IApiResponse> LogoutAll([Authorize]string token);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Follows
|
||||
|
||||
[Get("/{id}/follows")]
|
||||
Task<IApiResponse<IEnumerable<AccountResponse>>> GetAccountFollows(long id, [Query] AccountFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/{id}/followers")]
|
||||
Task<IApiResponse<IEnumerable<AccountResponse>>> GetAccountFollowers(long id, [Query] AccountFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Post("/follows/{followed_account_id}")]
|
||||
Task<IApiResponse> PostAccountFollow([Authorize]string token, [AliasAs("followed_account_id")] long followedAccountId);
|
||||
|
||||
[Delete("/follows/{followed_account_id}")]
|
||||
Task<IApiResponse> DeleteAccountFollow([Authorize]string token, [AliasAs("followed_account_id")] long followedAccountId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Ratings
|
||||
|
||||
[Get("/{id}/media")]
|
||||
Task<IApiResponse<IEnumerable<MediumUserRatedResponse>>> GetAccountRatedMedia(long id, [Query] MediumFilterQuery? filterQuery = null, [Query] MediumUserRatedFilterQuery<Medium>? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/{id}/media/movies")]
|
||||
Task<IApiResponse<IEnumerable<MediumMovieUserRatedResponse>>> GetAccountRatedMediaMovies(long id, [Query] MediumMovieFilterQuery? filterQuery = null, [Query] MediumUserRatedFilterQuery<MediumMovie>? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/{id}/media/series")]
|
||||
Task<IApiResponse<IEnumerable<MediumSeriesUserRatedResponse>>> GetAccountRatedMediaSeries(long id, [Query] MediumSeriesFilterQuery? filterQuery = null, [Query] MediumUserRatedFilterQuery<MediumSeries>? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/{id}/people")]
|
||||
Task<IApiResponse<IEnumerable<PersonUserRatedResponse>>> GetAccountRatedPeople(long id, [Query] PersonFilterQuery? filterQuery = null, [Query] PersonUserRatedFilterQuery? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
13
WatchIt.Website/Clients/IAuthenticationClient.cs
Normal file
13
WatchIt.Website/Clients/IAuthenticationClient.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.Authentication;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IAuthenticationClient
|
||||
{
|
||||
[Post("/authenticate")]
|
||||
Task<IApiResponse<AuthenticationResponse>> Authenticate([Body] AuthenticationRequest body);
|
||||
|
||||
[Post("/authenticate_refresh")]
|
||||
Task<IApiResponse<AuthenticationResponse>> AuthenticateRefresh([Body] AuthenticationRefreshRequest body);
|
||||
}
|
||||
20
WatchIt.Website/Clients/IGendersClient.cs
Normal file
20
WatchIt.Website/Clients/IGendersClient.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.Genders.Gender;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IGendersClient
|
||||
{
|
||||
[Get("/")]
|
||||
Task<IApiResponse<IEnumerable<GenderResponse>>> GetGenders([Query] GenderFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<IApiResponse<GenderResponse>> GetGender(short id);
|
||||
|
||||
[Post("/")]
|
||||
Task<IApiResponse<GenderResponse>> PostGender([Authorize]string token, [Body] GenderRequest body);
|
||||
|
||||
[Delete("/{id}")]
|
||||
Task<IApiResponse> DeleteGender([Authorize]string token, short id);
|
||||
}
|
||||
20
WatchIt.Website/Clients/IGenresClient.cs
Normal file
20
WatchIt.Website/Clients/IGenresClient.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.Genres.Genre;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IGenresClient
|
||||
{
|
||||
[Get("/")]
|
||||
Task<IApiResponse<IEnumerable<GenreResponse>>> GetGenres([Query] GenreFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<IApiResponse<GenreResponse>> GetGenre(short id);
|
||||
|
||||
[Post("/")]
|
||||
Task<IApiResponse<GenreResponse>> PostGenre([Authorize]string token, [Body] GenreRequest body);
|
||||
|
||||
[Delete("/{id}")]
|
||||
Task<IApiResponse> DeleteGenre([Authorize]string token, short id);
|
||||
}
|
||||
107
WatchIt.Website/Clients/IMediaClient.cs
Normal file
107
WatchIt.Website/Clients/IMediaClient.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.Genres.Genre;
|
||||
using WatchIt.DTO.Models.Controllers.Media.Medium.Query;
|
||||
using WatchIt.DTO.Models.Controllers.Media.Medium.Request;
|
||||
using WatchIt.DTO.Models.Controllers.Media.Medium.Response;
|
||||
using WatchIt.DTO.Models.Controllers.Photos.Photo;
|
||||
using WatchIt.DTO.Models.Generics.Image;
|
||||
using WatchIt.DTO.Models.Generics.Rating;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IMediaClient
|
||||
{
|
||||
#region Main
|
||||
|
||||
[Get("/")]
|
||||
Task<IApiResponse<IEnumerable<MediumResponse>>> GetMedia([Query(CollectionFormat.Multi)] MediumFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<IApiResponse<MediumResponse>> GetMedium(long id, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/movies")]
|
||||
Task<IApiResponse<IEnumerable<MediumMovieResponse>>> GetMediumMovies([Query(CollectionFormat.Multi)] MediumMovieFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/movies/{id}")]
|
||||
Task<IApiResponse<MediumMovieResponse>> GetMediumMovie(long id, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/series")]
|
||||
Task<IApiResponse<IEnumerable<MediumSeriesResponse>>> GetMediumSeries([Query(CollectionFormat.Multi)] MediumSeriesFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/series/{id}")]
|
||||
Task<IApiResponse<MediumSeriesResponse>> GetMediumSeries(long id, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Post("/movies")]
|
||||
Task<IApiResponse<MediumMovieResponse>> PostMediumMovie([Authorize]string token, [Body] MediumMovieRequest body);
|
||||
|
||||
[Post("/series")]
|
||||
Task<IApiResponse<MediumSeriesResponse>> PostMediumSeries([Authorize]string token, [Body] MediumSeriesRequest body);
|
||||
|
||||
[Put("/movies/{id}")]
|
||||
Task<IApiResponse<MediumMovieResponse>> PutMediumMovie([Authorize]string token, long id, [Body] MediumMovieRequest body);
|
||||
|
||||
[Put("/series/{id}")]
|
||||
Task<IApiResponse<MediumSeriesResponse>> PutMediumSeries([Authorize]string token, long id, [Body] MediumSeriesRequest body);
|
||||
|
||||
[Delete("/{id}")]
|
||||
Task<IApiResponse> DeleteMedium([Authorize]string token, long id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Genres
|
||||
|
||||
[Get("/{id}/genres")]
|
||||
Task<IApiResponse<IEnumerable<GenreResponse>>> GetMediumGenres(long id, [Query] GenreFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Post("/{id}/genres/{genre_id}")]
|
||||
Task<IApiResponse> PostMediumGenre([Authorize]string token, long id, [AliasAs("genre_id")] short genreId);
|
||||
|
||||
[Delete("/{id}/genres/{genre_id}")]
|
||||
Task<IApiResponse> DeleteMediumGenre([Authorize]string token, long id, [AliasAs("genre_id")] short genreId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Rating
|
||||
|
||||
[Get("/{id}/rating")]
|
||||
Task<IApiResponse<RatingOverallResponse>> GetMediumRating(long id);
|
||||
|
||||
[Get("/{id}/rating/{account_id}")]
|
||||
Task<IApiResponse<RatingUserResponse>> GetMediumUserRating(long id, [AliasAs("account_id")] long accountId);
|
||||
|
||||
[Put("/{id}/rating")]
|
||||
Task<IApiResponse> PutMediumRating([Authorize]string token, long id, [Body] RatingRequest body);
|
||||
|
||||
[Delete("/{id}/rating")]
|
||||
Task<IApiResponse> DeleteMediumRating([Authorize]string token, long id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region View Count
|
||||
|
||||
[Put("/{id}/view_count")]
|
||||
Task<IApiResponse> PutMediumViewCount(long id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Picture
|
||||
|
||||
[Get("/{id}/picture")]
|
||||
Task<IApiResponse<ImageResponse>> GetMediumPicture(long id);
|
||||
|
||||
[Put("/{id}/picture")]
|
||||
Task<IApiResponse<ImageResponse>> PutMediumPicture([Authorize]string token, long id, [Body] ImageRequest body);
|
||||
|
||||
[Delete("/{id}/picture")]
|
||||
Task<IApiResponse> DeleteMediumPicture([Authorize]string token, long id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Photos
|
||||
|
||||
[Get("/{id}/photos/background")]
|
||||
Task<IApiResponse<PhotoResponse?>> GetMediumBackgroundPhoto(long id);
|
||||
|
||||
#endregion
|
||||
}
|
||||
60
WatchIt.Website/Clients/IPeopleClient.cs
Normal file
60
WatchIt.Website/Clients/IPeopleClient.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.People.Person;
|
||||
using WatchIt.DTO.Models.Controllers.People.Person.Query;
|
||||
using WatchIt.DTO.Models.Generics.Image;
|
||||
using WatchIt.DTO.Models.Generics.Rating;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IPeopleClient
|
||||
{
|
||||
#region Main
|
||||
|
||||
[Get("/")]
|
||||
Task<IApiResponse<IEnumerable<PersonResponse>>> GetPeople([Query] PersonFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<IApiResponse<PersonResponse>> GetPerson(long id, [Query][AliasAs("include_pictures")] bool includePictures = false);
|
||||
|
||||
[Post("/")]
|
||||
Task<IApiResponse<PersonResponse>> PostPerson([Authorize]string token, [Body] PersonRequest body);
|
||||
|
||||
[Put("/{id}")]
|
||||
Task<IApiResponse<PersonResponse>> PutPerson([Authorize]string token, long id, [Body] PersonRequest body);
|
||||
|
||||
[Delete("/{id}")]
|
||||
Task<IApiResponse> DeletePerson([Authorize]string token, long id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Rating
|
||||
|
||||
[Get("/{id}/rating")]
|
||||
Task<IApiResponse<RatingOverallResponse>> GetPersonRating(long id);
|
||||
|
||||
[Get("/{id}/rating/{account_id}")]
|
||||
Task<IApiResponse<RatingUserOverallResponse>> GetPersonUserRating(long id, [AliasAs("account_id")] long accountId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region View Count
|
||||
|
||||
[Put("/{id}/view_count")]
|
||||
Task<IApiResponse> PutPeopleViewCount(long id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Picture
|
||||
|
||||
[Get("/{id}/picture")]
|
||||
Task<IApiResponse<ImageResponse>> GetPersonPicture(long id);
|
||||
|
||||
[Put("/{id}/picture")]
|
||||
Task<IApiResponse<ImageResponse>> PutPersonPicture([Authorize]string token, long id, [Body] ImageRequest body);
|
||||
|
||||
[Delete("/{id}/picture")]
|
||||
Task<IApiResponse> DeletePersonPicture([Authorize]string token, long id);
|
||||
|
||||
#endregion
|
||||
}
|
||||
41
WatchIt.Website/Clients/IPhotosClient.cs
Normal file
41
WatchIt.Website/Clients/IPhotosClient.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.Photos.Photo;
|
||||
using WatchIt.DTO.Models.Controllers.Photos.PhotoBackground;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IPhotosClient
|
||||
{
|
||||
#region Main
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<IApiResponse<PhotoResponse>> GetPhoto(Guid id);
|
||||
|
||||
[Get("/")]
|
||||
Task<IApiResponse<IEnumerable<PhotoResponse>>> GetPhotos([Query] PhotoFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Post("/")]
|
||||
Task<IApiResponse<PhotoResponse>> PostPhoto([Authorize]string token, [Body] PhotoRequest body);
|
||||
|
||||
[Put("/{id}")]
|
||||
Task<IApiResponse> PutPhoto([Authorize]string token, Guid id, [Body] PhotoRequest body);
|
||||
|
||||
[Delete("/{id}")]
|
||||
Task<IApiResponse> DeletePhoto([Authorize]string token, Guid id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Background
|
||||
|
||||
[Get("/background")]
|
||||
Task<IApiResponse<PhotoResponse>> GetPhotoBackground();
|
||||
|
||||
[Put("/{photo_id}/background")]
|
||||
Task<IApiResponse<PhotoBackgroundResponse>> PutPhotoBackground([Authorize]string token, [AliasAs("photo_id")] Guid photoId, [Body] PhotoBackgroundRequest body);
|
||||
|
||||
[Delete("/{photo_id}/background")]
|
||||
Task<IApiResponse> DeletePhotoBackground([Authorize]string token, [AliasAs("photo_id")] Guid photoId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
92
WatchIt.Website/Clients/IRolesClient.cs
Normal file
92
WatchIt.Website/Clients/IRolesClient.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
using Refit;
|
||||
using WatchIt.DTO.Models.Controllers.Roles.Role.Query;
|
||||
using WatchIt.DTO.Models.Controllers.Roles.Role.Request;
|
||||
using WatchIt.DTO.Models.Controllers.Roles.Role.Response;
|
||||
using WatchIt.DTO.Models.Controllers.Roles.RoleActorType;
|
||||
using WatchIt.DTO.Models.Controllers.Roles.RoleCreatorType;
|
||||
using WatchIt.DTO.Models.Generics.Rating;
|
||||
using WatchIt.DTO.Query;
|
||||
|
||||
namespace WatchIt.Website.Clients;
|
||||
|
||||
public interface IRolesClient
|
||||
{
|
||||
#region Main - CRUD
|
||||
|
||||
[Get("/actors")]
|
||||
Task<IApiResponse<IEnumerable<RoleActorResponse>>> GetRoleActors([Query] RoleActorFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/actors/{id}")]
|
||||
Task<IApiResponse<RoleActorResponse>> GetRoleActor(Guid id);
|
||||
|
||||
[Get("/creators")]
|
||||
Task<IApiResponse<IEnumerable<RoleCreatorResponse>>> GetRoleCreators([Query] RoleCreatorFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/creators/{id}")]
|
||||
Task<IApiResponse<RoleCreatorResponse>> GetRoleCreator(Guid id);
|
||||
|
||||
[Post("/actors")]
|
||||
Task<IApiResponse<RoleActorResponse>> PostRoleActor([Authorize]string token, [Body] RoleActorRequest body);
|
||||
|
||||
[Post("/creators")]
|
||||
Task<IApiResponse<RoleCreatorResponse>> PostRoleCreator([Authorize]string token, [Body] RoleCreatorRequest body);
|
||||
|
||||
[Put("/actors/{id}")]
|
||||
Task<IApiResponse<RoleActorResponse>> PutRoleActor([Authorize]string token, Guid id, [Body] RoleActorRequest body);
|
||||
|
||||
[Put("/creators/{id}")]
|
||||
Task<IApiResponse<RoleCreatorResponse>> PutRoleCreator([Authorize]string token, Guid id, [Body] RoleCreatorRequest body);
|
||||
|
||||
[Delete("/{id}")]
|
||||
Task<IApiResponse> DeleteRole([Authorize]string token, Guid id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Main - Rating
|
||||
|
||||
[Get("/{id}/rating")]
|
||||
Task<IApiResponse<RatingOverallResponse>> GetRoleRating(Guid id);
|
||||
|
||||
[Get("/{id}/rating/{account_id}")]
|
||||
Task<IApiResponse<RatingUserResponse>> GetRoleUserRating(Guid id, [AliasAs("account_id")] long accountId);
|
||||
|
||||
[Put("/{id}/rating")]
|
||||
Task<IApiResponse> PutRoleRating([Authorize]string token, Guid id, [Body] RatingRequest body);
|
||||
|
||||
[Delete("/{id}/rating")]
|
||||
Task<IApiResponse> DeleteRoleRating([Authorize]string token, Guid id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region ActorTypes
|
||||
|
||||
[Get("/actors/types")]
|
||||
Task<IApiResponse<IEnumerable<RoleActorTypeResponse>>> GetRoleActorTypes([Query] RoleActorTypeFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/actors/types/{role_actor_type_id}")]
|
||||
Task<IApiResponse<RoleActorTypeResponse>> GetRoleActorType([AliasAs("role_actor_type_id")] short roleActorTypeId);
|
||||
|
||||
[Post("/actors/types")]
|
||||
Task<IApiResponse<RoleActorTypeResponse>> PostRoleActorType([Authorize]string token, [Body] RoleActorTypeRequest body);
|
||||
|
||||
[Delete("/actors/types/{role_actor_type_id}")]
|
||||
Task<IApiResponse> DeleteRoleActorType([Authorize]string token, [AliasAs("role_actor_type_id")] short roleActorTypeId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreatorTypes
|
||||
|
||||
[Get("/creators/types")]
|
||||
Task<IApiResponse<IEnumerable<RoleCreatorTypeResponse>>> GetRoleCreatorTypes([Query] RoleCreatorTypeFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
|
||||
|
||||
[Get("/creators/types/{role_creator_type_id}")]
|
||||
Task<IApiResponse<RoleCreatorTypeResponse>> GetRoleCreatorType([AliasAs("role_creator_type_id")] short roleCreatorTypeId);
|
||||
|
||||
[Post("/creators/types")]
|
||||
Task<IApiResponse<RoleCreatorTypeResponse>> PostRoleCreatorType([Authorize]string token, [Body] RoleCreatorTypeRequest body);
|
||||
|
||||
[Delete("/creators/types/{role_creator_type_id}")]
|
||||
Task<IApiResponse> DeleteRoleCreatorType([Authorize]string token, [AliasAs("role_creator_type_id")] short roleCreatorTypeId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user