async fn get_oembed_data_from_provider(
    query_params: Query<OEmbedRequest>,
    pool: Data<PgPool>,
    user: AuthUser,
    app_conf: Data<ApplicationConfiguration>
) -> ControllerResult<Json<Value>>
Expand description

GET /api/v0/cms/gutenberg/oembed/preview?url=https%3A%2F%2Fyoutube.com%2Fwatch%3Fv%3D123123123 - Fetch oembed response from correct provider. Endpoint for proxying oembed requests to correct provider using url query param.

Example

Request:

GET /api/v0/cms/gutenberg/oembed/preview?url=https%3A%2F%2Fyoutube.com%2Fwatch%3Fv%3D123123123 HTTP/1.1
Content-Type: application/json

Response:

{
    "title":"AUTHOR - Title (OFFICIAL)",
    "author_name":"Author Name",
    "author_url":"https://www.youtube.com/author",
    "type":"video",
    "height":439,
    "width":780,
    "version":"1.0",
    "provider_name":"YouTube",
    "provider_url":"https://www.youtube.com/",
    "thumbnail_height":360,"thumbnail_width":480,
    "thumbnail_url":"https://i.ytimg.com/vi/JWBo/hqdefault.jpg",
    "html":"<iframe width=\"780\" height=\"439\" src=\"https://www.youtube.com/embed/JYjVo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"}
}