ToTheZeroth News

API Documentation

"Subscription" resource

Embedded as ttzn:subscription in the "subscriptions" collection

The "subscription" resource models a specific feed subscription.

The resource is represented by an application/hal+json [draft] object with the following structure.

Notes on regular expressions: If more than one of authorRegex, categoryRegex, descriptionRegex and titleRegex are supplied, they all have to match (or unmatch) for the item to be included in the subscription. Also, only MySQL regexes are supported, which means some limitations, first and foremost: no lookahead or lookbehind.

State properties
Property Type Mode Description
alias String Optional A title supplied by the user
authorRegex {
    
"pattern":
 
string,
    
"negate":
 
boolean
}
Optional A pattern to match the item authors property against
categoryRegex {
    
"pattern":
 
string,
    
"negate":
 
boolean
}
Optional A pattern to match the item categories property against
descriptionRegex {
    
"pattern":
 
string,
    
"negate":
 
boolean
}
Optional A pattern to match the item description property against
possiblyAliasedTitle String Read-only Equal to alias if set, otherwise equal to title
subscriptionId Integer Read-only A numerical ID (used in some URI templates)
title String Read-only The title, as published by the feed
titleRegex {
    
"pattern":
 
string,
    
"negate":
 
boolean
}
Optional A pattern to match the item title property against
url String Required
Immutable
The URL locating the feed's contents
Embedded resources
Relation Type Description
ttzn:tag Array of "tag" resources Representations of the attachment of a label to the subscription
Note: For updating several tags at once, see Batch updating
Resource links
Relation Description
curies A URI template [RFC6570] for expanding rel names with the ttzn prefix into the actual documentation URIs
Note: Not included when the resource is embedded
self The URI of the "subscription" resource
ttzn:addtag A URI template for the predetermined location of a new "tag" resource
ttzn:posts A URI for fetching the items belonging to the feed
up The URI of the "subscriptions" collection
Note: Not included when the resource is embedded in the collection