You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

568 lines
18 KiB

8 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="theme-color" content="#375EAB">
  7. <title>rss - The Go Programming Language</title>
  8. <link type="text/css" rel="stylesheet" href="../../../../../lib/godoc/style.css">
  9. <link rel="stylesheet" href="../../../../../lib/godoc/jquery.treeview.css">
  10. <script type="text/javascript">window.initFuncs = [];</script>
  11. </head>
  12. <body>
  13. <div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
  14. ...
  15. </div><!-- #lowframe -->
  16. <div id="topbar" class="wide"><div class="container">
  17. <div class="top-heading" id="heading-wide"><a href="http://localhost:6060/">The Go Programming Language</a></div>
  18. <div class="top-heading" id="heading-narrow"><a href="http://localhost:6060/">Go</a></div>
  19. <a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
  20. <form method="GET" action="http://localhost:6060/search">
  21. <div id="menu">
  22. <a href="http://localhost:6060/doc/">Documents</a>
  23. <a href="http://localhost:6060/pkg/">Packages</a>
  24. <a href="http://localhost:6060/project/">The Project</a>
  25. <a href="http://localhost:6060/help/">Help</a>
  26. <a href="http://localhost:6060/blog/">Blog</a>
  27. <input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
  28. </div>
  29. </form>
  30. </div></div>
  31. <div id="page" class="wide">
  32. <div class="container">
  33. <h1>Package rss</h1>
  34. <div id="nav"></div>
  35. <!--
  36. Copyright 2009 The Go Authors. All rights reserved.
  37. Use of this source code is governed by a BSD-style
  38. license that can be found in the LICENSE file.
  39. -->
  40. <!--
  41. Note: Static (i.e., not template-generated) href and id
  42. attributes start with "pkg-" to make it impossible for
  43. them to conflict with generated attributes (some of which
  44. correspond to Go identifiers).
  45. -->
  46. <script type='text/javascript'>
  47. document.ANALYSIS_DATA = null;
  48. document.CALLGRAPH = null;
  49. </script>
  50. <div id="short-nav">
  51. <dl>
  52. <dd><code>import "github.com/mmcdole/gofeed/rss"</code></dd>
  53. </dl>
  54. <dl>
  55. <dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
  56. <dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
  57. </dl>
  58. </div>
  59. <!-- The package's Name is printed as title by the top-level template -->
  60. <div id="pkg-overview" class="toggleVisible">
  61. <div class="collapsed">
  62. <h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
  63. </div>
  64. <div class="expanded">
  65. <h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
  66. </div>
  67. </div>
  68. <div id="pkg-index" class="toggleVisible">
  69. <div class="collapsed">
  70. <h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
  71. </div>
  72. <div class="expanded">
  73. <h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
  74. <!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
  75. <div id="manual-nav">
  76. <dl>
  77. <dd><a href="index.html#Category">type Category</a></dd>
  78. <dd><a href="index.html#Cloud">type Cloud</a></dd>
  79. <dd><a href="index.html#Enclosure">type Enclosure</a></dd>
  80. <dd><a href="index.html#Feed">type Feed</a></dd>
  81. <dd>&nbsp; &nbsp; <a href="index.html#Feed.String">func (f Feed) String() string</a></dd>
  82. <dd><a href="index.html#GUID">type GUID</a></dd>
  83. <dd><a href="index.html#Image">type Image</a></dd>
  84. <dd><a href="index.html#Item">type Item</a></dd>
  85. <dd><a href="index.html#Parser">type Parser</a></dd>
  86. <dd>&nbsp; &nbsp; <a href="index.html#Parser.Parse">func (rp *Parser) Parse(feed io.Reader) (*Feed, error)</a></dd>
  87. <dd><a href="index.html#Source">type Source</a></dd>
  88. <dd><a href="index.html#TextInput">type TextInput</a></dd>
  89. </dl>
  90. </div><!-- #manual-nav -->
  91. <h4>Package files</h4>
  92. <p>
  93. <span style="font-size:90%">
  94. <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go">feed.go</a>
  95. <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/parser.go">parser.go</a>
  96. </span>
  97. </p>
  98. </div><!-- .expanded -->
  99. </div><!-- #pkg-index -->
  100. <div id="pkg-callgraph" class="toggle" style="display: none">
  101. <div class="collapsed">
  102. <h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
  103. </div> <!-- .expanded -->
  104. <div class="expanded">
  105. <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
  106. <p>
  107. In the call graph viewer below, each node
  108. is a function belonging to this package
  109. and its children are the functions it
  110. calls&mdash;perhaps dynamically.
  111. </p>
  112. <p>
  113. The root nodes are the entry points of the
  114. package: functions that may be called from
  115. outside the package.
  116. There may be non-exported or anonymous
  117. functions among them if they are called
  118. dynamically from another package.
  119. </p>
  120. <p>
  121. Click a node to visit that function's source code.
  122. From there you can visit its callers by
  123. clicking its declaring <code>func</code>
  124. token.
  125. </p>
  126. <p>
  127. Functions may be omitted if they were
  128. determined to be unreachable in the
  129. particular programs or tests that were
  130. analyzed.
  131. </p>
  132. <!-- Zero means show all package entry points. -->
  133. <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
  134. </div>
  135. </div> <!-- #pkg-callgraph -->
  136. <h2 id="Category">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=4101:4206#L85">Category</a></h2>
  137. <pre>type Category struct {
  138. Domain <a href="../../../../builtin/index.html#string">string</a> `json:&#34;domain,omitempty&#34;`
  139. Value <a href="../../../../builtin/index.html#string">string</a> `json:&#34;value,omitempty&#34;`
  140. }</pre>
  141. <p>
  142. Category is category metadata for Feeds and Entries
  143. </p>
  144. <h2 id="Cloud">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=4671:4961#L103">Cloud</a></h2>
  145. <pre>type Cloud struct {
  146. Domain <a href="../../../../builtin/index.html#string">string</a> `json:&#34;domain,omitempty&#34;`
  147. Port <a href="../../../../builtin/index.html#string">string</a> `json:&#34;port,omitempty&#34;`
  148. Path <a href="../../../../builtin/index.html#string">string</a> `json:&#34;path,omitempty&#34;`
  149. RegisterProcedure <a href="../../../../builtin/index.html#string">string</a> `json:&#34;registerProcedure,omitempty&#34;`
  150. Protocol <a href="../../../../builtin/index.html#string">string</a> `json:&#34;protocol,omitempty&#34;`
  151. }</pre>
  152. <p>
  153. Cloud allows processes to register with a
  154. cloud to be notified of updates to the channel,
  155. implementing a lightweight publish-subscribe protocol
  156. for RSS feeds
  157. </p>
  158. <h2 id="Enclosure">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=3548:3691#L65">Enclosure</a></h2>
  159. <pre>type Enclosure struct {
  160. URL <a href="../../../../builtin/index.html#string">string</a> `json:&#34;url,omitempty&#34;`
  161. Length <a href="../../../../builtin/index.html#string">string</a> `json:&#34;length,omitempty&#34;`
  162. Type <a href="../../../../builtin/index.html#string">string</a> `json:&#34;type,omitempty&#34;`
  163. }</pre>
  164. <p>
  165. Enclosure is a media object that is attached to
  166. the item
  167. </p>
  168. <h2 id="Feed">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=114:2046#L1">Feed</a></h2>
  169. <pre>type Feed struct {
  170. Title <a href="../../../../builtin/index.html#string">string</a> `json:&#34;title,omitempty&#34;`
  171. Link <a href="../../../../builtin/index.html#string">string</a> `json:&#34;link,omitempty&#34;`
  172. Description <a href="../../../../builtin/index.html#string">string</a> `json:&#34;description,omitempty&#34;`
  173. Language <a href="../../../../builtin/index.html#string">string</a> `json:&#34;language,omitempty&#34;`
  174. Copyright <a href="../../../../builtin/index.html#string">string</a> `json:&#34;copyright,omitempty&#34;`
  175. ManagingEditor <a href="../../../../builtin/index.html#string">string</a> `json:&#34;managingEditor,omitempty&#34;`
  176. WebMaster <a href="../../../../builtin/index.html#string">string</a> `json:&#34;webMaster,omitempty&#34;`
  177. PubDate <a href="../../../../builtin/index.html#string">string</a> `json:&#34;pubDate,omitempty&#34;`
  178. PubDateParsed *<a href="../../../../time/index.html">time</a>.<a href="../../../../time/index.html#Time">Time</a> `json:&#34;pubDateParsed,omitempty&#34;`
  179. LastBuildDate <a href="../../../../builtin/index.html#string">string</a> `json:&#34;lastBuildDate,omitempty&#34;`
  180. LastBuildDateParsed *<a href="../../../../time/index.html">time</a>.<a href="../../../../time/index.html#Time">Time</a> `json:&#34;lastBuildDateParsed,omitempty&#34;`
  181. Categories []*<a href="index.html#Category">Category</a> `json:&#34;categories,omitempty&#34;`
  182. Generator <a href="../../../../builtin/index.html#string">string</a> `json:&#34;generator,omitempty&#34;`
  183. Docs <a href="../../../../builtin/index.html#string">string</a> `json:&#34;docs,omitempty&#34;`
  184. TTL <a href="../../../../builtin/index.html#string">string</a> `json:&#34;ttl,omitempty&#34;`
  185. Image *<a href="index.html#Image">Image</a> `json:&#34;image,omitempty&#34;`
  186. Rating <a href="../../../../builtin/index.html#string">string</a> `json:&#34;rating,omitempty&#34;`
  187. SkipHours []<a href="../../../../builtin/index.html#string">string</a> `json:&#34;skipHours,omitempty&#34;`
  188. SkipDays []<a href="../../../../builtin/index.html#string">string</a> `json:&#34;skipDays,omitempty&#34;`
  189. Cloud *<a href="index.html#Cloud">Cloud</a> `json:&#34;cloud,omitempty&#34;`
  190. TextInput *<a href="index.html#TextInput">TextInput</a> `json:&#34;textInput,omitempty&#34;`
  191. DublinCoreExt *ext.<a href="index.html#DublinCoreExtension">DublinCoreExtension</a> `json:&#34;dcExt,omitempty&#34;`
  192. ITunesExt *ext.<a href="index.html#ITunesFeedExtension">ITunesFeedExtension</a> `json:&#34;itunesExt,omitempty&#34;`
  193. Extensions ext.<a href="index.html#Extensions">Extensions</a> `json:&#34;extensions,omitempty&#34;`
  194. Items []*<a href="index.html#Item">Item</a> `json:&#34;items&#34;`
  195. Version <a href="../../../../builtin/index.html#string">string</a> `json:&#34;version&#34;`
  196. }</pre>
  197. <p>
  198. Feed is an RSS Feed
  199. </p>
  200. <h3 id="Feed.String">func (Feed) <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=2048:2077#L30">String</a></h3>
  201. <pre>func (f <a href="index.html#Feed">Feed</a>) String() <a href="../../../../builtin/index.html#string">string</a></pre>
  202. <h2 id="GUID">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=3736:3852#L72">GUID</a></h2>
  203. <pre>type GUID struct {
  204. Value <a href="../../../../builtin/index.html#string">string</a> `json:&#34;value,omitempty&#34;`
  205. IsPermalink <a href="../../../../builtin/index.html#string">string</a> `json:&#34;isPermalink,omitempty&#34;`
  206. }</pre>
  207. <p>
  208. GUID is a unique identifier for an item
  209. </p>
  210. <h2 id="Image">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=3188:3483#L54">Image</a></h2>
  211. <pre>type Image struct {
  212. URL <a href="../../../../builtin/index.html#string">string</a> `json:&#34;url,omitempty&#34;`
  213. Link <a href="../../../../builtin/index.html#string">string</a> `json:&#34;link,omitempty&#34;`
  214. Title <a href="../../../../builtin/index.html#string">string</a> `json:&#34;title,omitempty&#34;`
  215. Width <a href="../../../../builtin/index.html#string">string</a> `json:&#34;width,omitempty&#34;`
  216. Height <a href="../../../../builtin/index.html#string">string</a> `json:&#34;height,omitempty&#34;`
  217. Description <a href="../../../../builtin/index.html#string">string</a> `json:&#34;description,omitempty&#34;`
  218. }</pre>
  219. <p>
  220. Image is an image that represents the feed
  221. </p>
  222. <h2 id="Item">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=2173:3140#L36">Item</a></h2>
  223. <pre>type Item struct {
  224. Title <a href="../../../../builtin/index.html#string">string</a> `json:&#34;title,omitempty&#34;`
  225. Link <a href="../../../../builtin/index.html#string">string</a> `json:&#34;link,omitempty&#34;`
  226. Description <a href="../../../../builtin/index.html#string">string</a> `json:&#34;description,omitempty&#34;`
  227. Author <a href="../../../../builtin/index.html#string">string</a> `json:&#34;author,omitempty&#34;`
  228. Categories []*<a href="index.html#Category">Category</a> `json:&#34;categories,omitempty&#34;`
  229. Comments <a href="../../../../builtin/index.html#string">string</a> `json:&#34;comments,omitempty&#34;`
  230. Enclosure *<a href="index.html#Enclosure">Enclosure</a> `json:&#34;enclosure,omitempty&#34;`
  231. GUID *<a href="index.html#GUID">GUID</a> `json:&#34;guid,omitempty&#34;`
  232. PubDate <a href="../../../../builtin/index.html#string">string</a> `json:&#34;pubDate,omitempty&#34;`
  233. PubDateParsed *<a href="../../../../time/index.html">time</a>.<a href="../../../../time/index.html#Time">Time</a> `json:&#34;pubDateParsed,omitempty&#34;`
  234. Source *<a href="index.html#Source">Source</a> `json:&#34;source,omitempty&#34;`
  235. DublinCoreExt *ext.<a href="index.html#DublinCoreExtension">DublinCoreExtension</a> `json:&#34;dcExt,omitempty&#34;`
  236. ITunesExt *ext.<a href="index.html#ITunesItemExtension">ITunesItemExtension</a> `json:&#34;itunesExt,omitempty&#34;`
  237. Extensions ext.<a href="index.html#Extensions">Extensions</a> `json:&#34;extensions,omitempty&#34;`
  238. }</pre>
  239. <p>
  240. Item is an RSS Item
  241. </p>
  242. <h2 id="Parser">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/parser.go?s=189:209#L4">Parser</a></h2>
  243. <pre>type Parser struct{}</pre>
  244. <p>
  245. Parser is a RSS Parser
  246. </p>
  247. <h3 id="Parser.Parse">func (*Parser) <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/parser.go?s=256:310#L7">Parse</a></h3>
  248. <pre>func (rp *<a href="index.html#Parser">Parser</a>) Parse(feed <a href="../../../../io/index.html">io</a>.<a href="../../../../io/index.html#Reader">Reader</a>) (*<a href="index.html#Feed">Feed</a>, <a href="../../../../builtin/index.html#error">error</a>)</pre>
  249. <p>
  250. Parse parses an xml feed into an rss.Feed
  251. </p>
  252. <h2 id="Source">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=3946:4044#L79">Source</a></h2>
  253. <pre>type Source struct {
  254. Title <a href="../../../../builtin/index.html#string">string</a> `json:&#34;title,omitempty&#34;`
  255. URL <a href="../../../../builtin/index.html#string">string</a> `json:&#34;url,omitempty&#34;`
  256. }</pre>
  257. <p>
  258. Source contains feed information for another
  259. feed if a given item came from that feed
  260. </p>
  261. <h2 id="TextInput">type <a href="http://localhost:6060/src/github.com/mmcdole/gofeed/rss/feed.go?s=4290:4499#L92">TextInput</a></h2>
  262. <pre>type TextInput struct {
  263. Title <a href="../../../../builtin/index.html#string">string</a> `json:&#34;title,omitempty&#34;`
  264. Description <a href="../../../../builtin/index.html#string">string</a> `json:&#34;description,omitempty&#34;`
  265. Name <a href="../../../../builtin/index.html#string">string</a> `json:&#34;name,omitempty&#34;`
  266. Link <a href="../../../../builtin/index.html#string">string</a> `json:&#34;link,omitempty&#34;`
  267. }</pre>
  268. <p>
  269. TextInput specifies a text input box that
  270. can be displayed with the channel
  271. </p>
  272. <div id="footer">
  273. Build version go1.6.<br>
  274. Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
  275. the content of this page is licensed under the
  276. Creative Commons Attribution 3.0 License,
  277. and code is licensed under a <a href="http://localhost:6060/LICENSE">BSD license</a>.<br>
  278. <a href="http://localhost:6060/doc/tos.html">Terms of Service</a> |
  279. <a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
  280. </div>
  281. </div><!-- .container -->
  282. </div><!-- #page -->
  283. <!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
  284. <script type="text/javascript" src="../../../../../lib/godoc/jquery.js"></script>
  285. <script type="text/javascript" src="../../../../../lib/godoc/jquery.treeview.js"></script>
  286. <script type="text/javascript" src="../../../../../lib/godoc/jquery.treeview.edit.js"></script>
  287. <script type="text/javascript" src="../../../../../lib/godoc/godocs.js"></script>
  288. </body>
  289. </html>