Media Delivery API (#14692)
* Introduce media API - controllers, services, tests, Swagger docs * Add path to media API response + add "by path" endpoint * Review comments * Implement filtering and sorting * Add explicit media access configuration * Cleanup * Adding default case as in the MediaApiControllerBase * Update src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Swap sort order calculation to align with Content API * Add CreateDate and UpdateDate to media responses * Mirror Content Delivery API behavior for empty children selector --------- Co-authored-by: Elitsa <elm@umbraco.dk> Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ using Umbraco.Cms.Core.PropertyEditors.ValueConverters;
|
||||
|
||||
namespace Umbraco.Cms.Core.Models.DeliveryApi;
|
||||
|
||||
internal sealed class ApiMediaWithCrops : IApiMedia
|
||||
public class ApiMediaWithCrops : IApiMedia
|
||||
{
|
||||
private readonly IApiMedia _inner;
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using Umbraco.Cms.Core.PropertyEditors.ValueConverters;
|
||||
|
||||
namespace Umbraco.Cms.Core.Models.DeliveryApi;
|
||||
|
||||
public sealed class ApiMediaWithCropsResponse : ApiMediaWithCrops
|
||||
{
|
||||
public ApiMediaWithCropsResponse(
|
||||
IApiMedia inner,
|
||||
ImageCropperValue.ImageCropperFocalPoint? focalPoint,
|
||||
IEnumerable<ImageCropperValue.ImageCropperCrop>? crops,
|
||||
string path,
|
||||
DateTime createDate,
|
||||
DateTime updateDate)
|
||||
: base(inner, focalPoint, crops)
|
||||
{
|
||||
Path = path;
|
||||
CreateDate = createDate;
|
||||
UpdateDate = updateDate;
|
||||
}
|
||||
|
||||
public string Path { get; }
|
||||
|
||||
public DateTime CreateDate { get; }
|
||||
|
||||
public DateTime UpdateDate { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user