Profile: card
The card profile specified a free-form callout content item without any prescription on the content it contains. Cards are most often used to render short representations of content on a page like the NPR homepage.
See also:
Structure
The 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 |
displaySize | string | No | the relative size to display the card on a webpage |
Brandings
Similar to the brandings array defined by the publishable profile, the 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,
brandingsmust contain one or more links - Links in
brandingsmust start withhttporhttps - Links in
brandingscannot haverels
Example card document
{
"id": "12345",
"profiles": [
{
"href": "/v1/profiles/card"
},
{
"href": "/v1/profiles/document"
}
],
"title": "Death Star destroyed",
"emphasisLevel": "high",
"attentionLabel": "BREAKING",
"teaser": "A small rebel force exploited a previously-unknown weakness in the base's ventilation system",
"eyebrowText": "Check it out",
"eyebrowLink": {
"href": "https://www.google.com"
},
"isHighPriority": true,
"brandings": [
{
"href": "https://organization.api.npr.org/v4/services/s1"
}
]
}