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