Profile: html-card
An html-card
document is a derivative of the card
profile. It specifies a free-form callout content item intended to contain HTML.
The html-card
profile is intended to be used as a “type” profile.
Structure
The html-card
profile specifies the following attributes:
Name | Type | Required? | Explanation |
---|---|---|---|
emphasisLevel | string | Yes | low , medium , or high |
title | string | No | The title to display when rendering this card |
attentionLabel | string | No | An extra label displayed alongside the card; common values are BREAKING or EXCLUSIVE |
teaser | string | No | A short description of the content represented by the card |
isHighPriority | boolean | No | Flag representing whether the card should be visually highlighted for priority |
eyebrowText | string | No | String representing a text eyebrow line for a card |
eyebrowLink | object | No | Link object representing an external linking eyebrow line for a card. MUST have an href attribute that starts with http or https, and MUST NOT have rels |
brandings | Link[] | No | A set of links to organization(s) that should be used to brand this content; see “Brandings” below |
Brandings
Similar to the brandings
array defined by the publishable
profile, the html-card
profile allows its content to be branded using a set of organization links. The brandings
array is subject to the following constraints:
- If present,
brandings
must contain one or more links - Links in
brandings
must start withhttp
orhttps
- Links in
brandings
cannot haverels
Example html-card document
{
"id": "12345",
"profiles": [
{
"href": "/v1/profiles/html-card",
"rels": [
"type"
]
}
],
"title": "Godzilla has arisen from the North Pacific Ocean",
"emphasisLevel": "high",
"attentionLabel": "THIS JUST IN",
"teaser": "What does the monster of nightmares want? What are his opinions on the gridlock in Washington? NPR finds out.",
"eyebrowText": "News",
"brandings": [
{
"href": "https://organization.api.npr.org/v4/services/s1"
}
]
}