Profile: has-galleries

Profile Schema

The has-galleries profile designates a document that contains galleries. While any document can contain galleries without the has-galleries profile, clients looking for a gallery within a document will likely target the galleries array provided by this profile, so it is highly recommended that a document with a gallery lists a has-galleries profile.

Structure

has-galleries specifies one required attribute: galleries. galleries is an array of links to a gallery used by this document.

The galleries array must contain one or more links; all links must be asset links that begin with #/.

Example has-galleries document

{
    "id": "12345",
    "profiles": [
        {
            "href": "/v1/profiles/has-galleries",
            "rels": [
                "interface"
            ]
        },
        {
            "href": "/v1/profiles/document"
        }
    ],

    "galleries": [
        {
            "href": "#/assets/5678",
        }
    ],

    "assets": {
        "5678": {
            "id": "5678",
            "title": "Best Gallery",
            "layout": [
                {
                    "href": "#/assets/abc",
                },
            ],
            "profiles": [
                {
                    "href": "/v1/profiles/image-gallery",
                    "rels": [ "type" ]
                },
                {
                    "href": "/v1/profiles/container"
                },
                {
                    "href": "/v1/profiles/document"
                }
            ]
        },
        "abc": {
            "id": "abc",
            "profiles": [
                {
                    "href": "/v1/profiles/image"
                },
                {
                    "href": "/v1/profiles/document"
                }
            ],

            "title": "Naboo, prior to its destruction",
            "enclosures": [
                {
                    "href": "https://npr-media-host.org/images/naboo.jpg",
                    "hrefTemplate": "https://npr-media-host.org/images/naboo.jpg?w={width}&q={quality}&f={format}",
                    "rels": [
                        "image-standard",
                        "primary"
                    ],
                    "type": "image/jpeg",
                    "width": 3342,
                    "height": 2505
                }
            ],
            "producer": "Pulsar Photography",
            "provider": "Planetary Pictures Inc.",
            "providerLink": {
                "href": "https://www.planetpictures.com/"
            },
            "caption": "Naboo, shown two years prior to its destruction, was a largely peaceful planet with a diversity of inhabitants.",
            "displaySize": "small"
        }
    }
}

© 2024 npr