]> gitweb.factorcode.org Git - factor.git/blob - basis/syndication/syndication-docs.factor
scryfall: add more filter/reject words, better mtga parser
[factor.git] / basis / syndication / syndication-docs.factor
1 USING: calendar help.markup help.syntax present strings urls
2 xml.data xml.writer ;
3 IN: syndication
4
5 HELP: entry
6 { $description "An Atom or RSS feed entry. Has the following slots:"
7     { $table
8         { { $strong "Name" } { $strong "Class" } }
9         { "title" { $link string } }
10         { "url" { "any class supported by " { $link present } } }
11         { "description" { $link string } }
12         { "date" { $link timestamp } }
13     }
14 } ;
15
16 HELP: <entry>
17 { $values { "entry" entry } }
18 { $description "Creates a new entry." } ;
19
20 HELP: feed
21 { $description "An Atom or RSS feed. Has the following slots:"
22     { $table
23         { { $strong "Name" } { $strong "Class" } }
24         { "title" { $link string } }
25         { "url" { "any class supported by " { $link present } } }
26         { "entries" { "a sequence of " { $link entry } " instances" } }
27     }
28 } ;
29
30 HELP: <feed>
31 { $values { "feed" feed } }
32 { $description "Creates a new feed." } ;
33
34 HELP: download-feed
35 { $values { "url" url } { "feed" feed } }
36 { $description "Downloads a feed from a URL using the " { $link "http.client" } "." } ;
37
38 HELP: parse-feed
39 { $values { "seq" "a string or a byte array" } { "feed" feed } }
40 { $description "Parses a feed." } ;
41
42 HELP: xml>feed
43 { $values { "xml" xml } { "feed" feed } }
44 { $description "Parses a feed in XML form." } ;
45
46 HELP: feed>xml
47 { $values { "feed" feed } { "xml" xml } }
48 { $description "Converts a feed to Atom XML form." }
49 { $notes "The result of this word can then be passed to " { $link write-xml } ", or stored in an HTTP response object." } ;
50
51 ARTICLE: "syndication" "Atom and RSS feed syndication"
52 "The " { $vocab-link "syndication" } " vocabulary implements support for reading Atom and RSS feeds, and writing Atom feeds."
53 $nl
54 "Data types:"
55 { $subsections
56     feed
57     <feed>
58     entry
59     <entry>
60 }
61 "Reading feeds:"
62 { $subsections
63     download-feed
64     parse-feed
65     xml>feed
66 }
67 "Writing feeds:"
68 { $subsections feed>xml }
69 "The " { $vocab-link "furnace.syndication" } " vocabulary builds on top of this vocabulary to enable easy generation of Atom feeds from web applications. The " { $vocab-link "webapps.planet" } " vocabulary is a complete example of a web application which reads and exports feeds."
70 { $see-also "urls" } ;
71
72 ABOUT: "syndication"