Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExploreResponse = MediaType("application/vnd.feedpushr.explore.v2+json", func() {
Description("The search result")
TypeName("ExploreResponse")
ContentType("application/json")
Attributes(func() {
Attribute("title", String, "Feed title", func() {
Example("Blog news...")
})
Attribute("desc", String, "Feed description", func() {
Example("A short description...")
})
Attribute("xmlUrl", String, "URL of the XML feed", func() {
Example("http://www.hashicorp.com/feed.xml")
})
Attribute("htmlUrl", String, "URL of the feed website", func() {
Example("http://www.hashicorp.com/blog")
})
Required("title", "desc", "xmlUrl", "htmlUrl")
})
View("default", func() {
Attribute("title")
Attribute("desc")
Attribute("xmlUrl")
Attribute("htmlUrl")
})
})
ExploreResponse is the explore result specification media type.
var FeedResponse = MediaType("application/vnd.feedpushr.feed.v2+json", func() { Description("A RSS feed") TypeName("FeedResponse") ContentType("application/json") Attributes(func() { Attribute("id", String, "ID of feed (MD5 of the xmlUrl)", func() { Example("5bfb841c028281c0051828c115fd1f50") }) Attribute("xmlUrl", String, "URL of the XML feed", func() { Example("http://www.hashicorp.com/feed.xml") }) Attribute("htmlUrl", String, "URL of the feed website", func() { Example("http://www.hashicorp.com/blog") }) Attribute("hubUrl", String, "URL of the PubSubHubbud hub", func() { Example("http://pubsubhubbub.appspot.com") }) Attribute("title", String, "Title of the Feed", func() { Example("Hashicorp Blog") }) Attribute("tags", ArrayOf(String), "List of tags", func() { Example([]string{"foo", "bar"}) }) Attribute("status", String, "Aggregation status", func() { Enum("running", "stopped") }) Attribute("lastCheck", DateTime, "Last aggregation pass") Attribute("nextCheck", DateTime, "Next aggregation pass") Attribute("errorMsg", String, "Last aggregation error") Attribute("errorCount", Integer, "Number of consecutive aggregation errors") Attribute("nbProcessedItems", Integer, "Total number of processed items") Attribute("cdate", DateTime, "Date of creation") Attribute("mdate", DateTime, "Date of modification") Required("id", "xmlUrl", "title", "cdate", "mdate") }) View("default", func() { Attribute("id") Attribute("xmlUrl") Attribute("htmlUrl") Attribute("hubUrl") Attribute("title") Attribute("tags") Attribute("status") Attribute("lastCheck") Attribute("nextCheck") Attribute("errorMsg") Attribute("errorCount") Attribute("nbProcessedItems") Attribute("cdate") Attribute("mdate") }) View("tiny", func() { Description("tiny is the view used to list feeds") Attribute("id") Attribute("xmlUrl") Attribute("title") Attribute("tags") Attribute("cdate") }) View("link", func() { Attribute("id") Attribute("xmlUrl") }) })
FeedResponse is the feed resource media type.
var FeedsPageResponse = MediaType("application/vnd.feedpushr.feeds-page.v2+json", func() { Description("A pagignated list of feeds") TypeName("FeedsPageResponse") ContentType("application/json") Attributes(func() { Attribute("total", Integer, "Total number of feeds", func() { Example(99) }) Attribute("current", Integer, "Current page number", func() { Example(1) }) Attribute("size", Integer, "Max number of feeds by page", func() { Example(100) }) Attribute("data", CollectionOf(FeedResponse), "List of feeds") Required("total", "current", "size", "data") }) View("default", func() { Attribute("total") Attribute("current") Attribute("size") Attribute("data") }) })
FeedsPageResponse is the feeds page resource media type.
var FilterResponse = MediaType("application/vnd.feedpushr.filter.v2+json", func() { Description("A filter") TypeName("FilterResponse") ContentType("application/json") Attributes(func() { Attribute("id", String, "ID of the filter") Attribute("alias", String, "Alias of the filter", func() { Example("foo") }) Attribute("name", String, "Name of the filter", func() { Example("fetch") }) Attribute("desc", String, "Description of the filter", func() { Example("This filter will...") }) Attribute("props", HashOf(String, Any), "Filter properties", NoExample) Attribute("condition", String, "Conditional expression of the filter", func() { Example("\"foo\" in Tags") }) Attribute("enabled", Boolean, "Status", func() { Default(false) }) Attribute("nbSuccess", Integer, "Number of success", func() { Default(0) Example(10) }) Attribute("nbError", Integer, "Number of error", func() { Default(0) Example(10) }) Required("id", "alias", "name", "desc", "condition", "props") }) View("default", func() { Attribute("id") Attribute("alias") Attribute("name") Attribute("desc") Attribute("props") Attribute("condition") Attribute("enabled") Attribute("nbSuccess") Attribute("nbError") }) })
FilterResponse is the filter resource media type.
var FilterSpecResponse = MediaType("application/vnd.feedpushr.filter-spec.v2+json", func() {
Description("The filter specification")
TypeName("FilterSpecResponse")
ContentType("application/json")
Attributes(func() {
Attribute("name", String, "Name of the filter", func() {
Example("title")
})
Attribute("desc", String, "Description of the filter", func() {
Example("Add a prefix to the tittle...")
})
Attribute("props", CollectionOf("application/vnd.feedpushr.prop-spec.v2+json"))
Required("name", "desc", "props")
})
View("default", func() {
Attribute("name")
Attribute("desc")
Attribute("props")
})
})
FilterSpecResponse is the filter specification media type.
var HALLink = MediaType("application/vnd.feedpushr.hal-links.v2+json", func() {
Description("HAL link")
TypeName("HALLink")
ContentType("application/json")
Attributes(func() {
Attribute("href", String, "Link's destination", func() {
Example("url")
})
Required("href")
})
View("default", func() {
Attribute("href")
})
})
HALLink is the HAL link media type.
var InfoResponse = MediaType("application/vnd.feedpushr.info.v2+json", func() { Description("API info") TypeName("Info") ContentType("application/json") Attributes(func() { Attribute("name", String, "Service name", func() { Example("feedpushr") }) Attribute("desc", String, "Service description", func() { Example("Feed aggregator daemon with sugar on top") }) Attribute("version", String, "Service version", func() { Example("v3.0.0") }) Attribute("_links", HashOf(String, HALLink), "HAL links") Required("name", "desc", "version", "_links") }) View("default", func() { Attribute("name") Attribute("desc") Attribute("version") Attribute("_links") }) })
InfoInfoResponse is the API info media type.
var OPMLImportJobResponse = MediaType("application/vnd.feedpushr.ompl-import-job.v2+json", func() {
TypeName("OPMLImportJobResponse")
ContentType("application/json")
Attributes(func() {
Attribute("id", String, "ID of the import job")
Required("id")
})
View("default", func() {
Attribute("id")
})
})
OPMLImportJobResponse is OPM import job media type.
var OutputResponse = MediaType("application/vnd.feedpushr.output.v2+json", func() { Description("The output channel") TypeName("OutputResponse") ContentType("application/json") Attributes(func() { Attribute("id", String, "ID of the output") Attribute("alias", String, "Alias of the output channel", func() { Example("foo") }) Attribute("name", String, "Name of the output channel", func() { Example("fetch") }) Attribute("desc", String, "Description of the output channel", func() { Example("New articles are sent as JSON document to...") }) Attribute("props", HashOf(String, Any), "Output channel properties", NoExample) Attribute("condition", String, "Conditional expression of the filter", func() { Example("\"foo\" in Tags") }) Attribute("filters", CollectionOf(FilterResponse), "Filters", NoExample) Attribute("enabled", Boolean, "Status", func() { Default(false) }) Attribute("nbSuccess", Integer, "Number of success", func() { Default(0) Example(10) }) Attribute("nbError", Integer, "Number of error", func() { Default(0) Example(10) }) Required("id", "alias", "name", "desc", "condition", "props") }) View("default", func() { Attribute("id") Attribute("name") Attribute("alias") Attribute("desc") Attribute("props") Attribute("condition") Attribute("filters") Attribute("enabled") Attribute("nbSuccess") Attribute("nbError") }) })
OutputResponse is the output resource media type.
var OutputSpecResponse = MediaType("application/vnd.feedpushr.output-spec.v2+json", func() {
Description("The output channel specification")
TypeName("OutputSpecResponse")
ContentType("application/json")
Attributes(func() {
Attribute("name", String, "Name of the output channel", func() {
Example("fetch")
})
Attribute("desc", String, "Description of the output channel", func() {
Example("New articles are sent as JSON document to...")
})
Attribute("props", CollectionOf("application/vnd.feedpushr.prop-spec.v2+json"))
Required("name", "desc", "props")
})
View("default", func() {
Attribute("name")
Attribute("desc")
Attribute("props")
})
})
OutputSpecResponse is the output specification media type.
var PropSpecResponse = MediaType("application/vnd.feedpushr.prop-spec.v2+json", func() {
Description("The specification of a property")
TypeName("PropSpec")
ContentType("application/json")
Attributes(func() {
Attribute("name", String, "Name of the property", func() {
Example("url")
})
Attribute("desc", String, "Description of the output channel", func() {
Example("New articles are sent as JSON document to...")
})
Attribute("type", String, "Property type ('text', 'url', ...)", func() {
Example("text")
})
Attribute("options", HashOf(String, String), "Property options")
Required("name", "desc", "type")
})
View("default", func() {
Attribute("name")
Attribute("desc")
Attribute("type")
Attribute("options")
})
})
PropSpecResponse is the property specification media type.
var SubscriptionPayload = Type("SubscriptionPayload", func() {
Attribute("alias", func() {
MinLength(2)
Example("Best app ever")
})
Attribute("uri", func() {
MinLength(5)
Example("https://api:KEY@api.nunux.org/keeper/v2/documents")
})
})
SubscriptionPayload defines the data structure used in the create subscription request body.
Functions ¶
This section is empty.
Types ¶
This section is empty.