-
Notifications
You must be signed in to change notification settings - Fork 45
0.8.0 Release Notes
ANS 0.8.0 introduces a new element type and a new features for the distributor trait. Both additions enable support for the new Content Restrictions feature in Arc.
A "restricted" element represents an piece of content (story, image, gallery, video, or collection) that is not visible to a particular reader because of legal reasons. This element indicates to consumers the id and type of the restricted item as well as information about the restriction rule that causes the content to be removed. This information can be used for debugging purposes or for surfacing errors to the user.
{
"_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"type": "restricted_content",
"version": "0.8.0",
"restricted_content": {
"type": "reference",
"referent": {
"id": "BBBDFEGHIJKLMNOPQRSTUVWXYZ",
"type": "gallery"
}
},
"reasons": [{
"restriction_id": "CCCDFEGHIJKLMNOPQRSTUVWXYZ",
"message": "This content is not available on website baltimore-sun because of restriction 'Tribune-only restriction'."
}]
}
ANS 0.8.0 introduces a new option for document distributor data. Instead of specifying the distributor directly on the document, you can now instead link a distributor by ID.
In Arc, support for configuring distributors that can be referenced this way will be added in an upcoming release.
{
"type": "story",
"version": "0.8.0",
"distributor": {
"id": "DDDDEFGHIJKLMNOPQRSTUVWXYZ",
"mode": "reference"
}
}
The old model of hard-coding distributor values into a document is still supported. (We now refer to that use case as "custom distributor" data.) Note that we use the new mode
field to differentiate the new referenced distributor data from the custom mode. For backwards compatibility, this field may be omitted when using custom mode.
{
"type": "story",
"version": "0.8.0",
"distributor": {
"name": "Arc Publishing",
"category": "staff",
"subcategory": "photo team",
"mode": "custom"
}
}