using Umbraco.Cms.Core.Services.OperationStatus; namespace Umbraco.Cms.Core.Services; /// /// Defines a service for asynchronously retrieving embeddable HTML markup for a specified resource using the oEmbed /// protocol. /// public interface IOEmbedService { /// /// Asynchronously retrieves the embeddable HTML markup for the specified resource. /// /// The returned markup is suitable for embedding in web pages. The width and height parameters /// may be ignored by some providers depending on their capabilities. /// The URI of the resource to retrieve markup for. Must be a valid, absolute URI. /// The optional maximum width, in pixels, for the embedded content. If null, the default width is used. /// The optional maximum height, in pixels, for the embedded content. If null, the default height is used. /// A token to monitor for cancellation requests. The operation is canceled if the token is triggered. /// A task that represents the asynchronous operation. The result contains an Attempt with the HTML markup if /// successful, or an oEmbed operation status indicating the reason for failure. Task> GetMarkupAsync(Uri url, int? width, int? height, CancellationToken cancellationToken); }