]> gitweb.factorcode.org Git - factor.git/blob - basis/furnace/syndication/syndication-docs.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / basis / furnace / syndication / syndication-docs.factor
1 USING: help.markup help.syntax io.streams.string kernel sequences strings urls syndication calendar ;
2 IN: furnace.syndication
3
4 HELP: <feed-action>
5 { $values { "action" feed-action } }
6 { $description "Creates a new Atom feed action." } ;
7
8 HELP: >entry
9 { $values
10      { "object" object }
11      { "entry" entry }
12 }
13 { $contract "Converts an object into an Atom feed entry. The default implementation constructs an entry by calling "
14 { $link feed-entry-title } ", "
15 { $link feed-entry-description } ", "
16 { $link feed-entry-date } ", and "
17 { $link feed-entry-url } "." } ;
18
19 HELP: feed-action
20 { $class-description "The class of feed actions. Contains several slots, documented in " { $link "furnace.syndication.config" } "." } ;
21
22 HELP: feed-entry-date
23 { $values
24      { "object" object }
25      { "timestamp" timestamp }
26 }
27 { $contract "Outputs a feed entry timestmap." } ;
28
29 HELP: feed-entry-description
30 { $values
31      { "object" object }
32      { "description" null }
33 }
34 { $contract "Outputs a feed entry description." } ;
35
36 HELP: feed-entry-title
37 { $values
38      { "object" object }
39      { "string" string }
40 }
41 { $contract "Outputs a feed entry title." } ;
42
43 HELP: feed-entry-url
44 { $values
45      { "object" object }
46      { "url" url }
47 }
48 { $contract "Outputs a feed entry URL." } ;
49
50 ARTICLE: "furnace.syndication.config" "Configuring Atom feed actions"
51 "Instances of " { $link feed-action } " have three slots which need to be set:"
52 { $table
53     { { $slot "title" } "The title of the feed as a string" }
54     { { $slot "url" } { "The feed " { $link url } } }
55     { { $slot "entries" } { "A quotation with stack effect " { $snippet "( -- seq )" } ", which produces a sequence of objects responding to the " { $link "furnace.syndication.protocol" } " protocol" } }
56 } ;
57
58 ARTICLE: "furnace.syndication.protocol" "Atom feed entry protocol"
59 "An Atom feed action takes a sequence of objects and converts them into Atom feed entries. The objects must implement a protocol consisting of either a single generic word:"
60 { $subsection >entry }
61 "Or a series of generic words, called by the default implementation of " { $link >entry } ":"
62 { $subsection feed-entry-title }
63 { $subsection feed-entry-description }
64 { $subsection feed-entry-date }
65 { $subsection feed-entry-url } ;
66
67 ARTICLE: "furnace.syndication" "Furnace Atom syndication support"
68 "The " { $vocab-link "furnace.syndication" } " vocabulary builds on the " { $link "syndication" } " library by providing easy support for generating Atom feeds from " { $link "furnace.actions" } "."
69 { $subsection <feed-action> }
70 { $subsection "furnace.syndication.config" }
71 { $subsection "furnace.syndication.protocol" } ;
72
73 ABOUT: "furnace.syndication"