README.md
1# RSS
2
3This package allows us to fetch Rss and Atom feeds from the internet.
4They are parsed into an object tree which is a hybrid of both the RSS and Atom
5standards.
6
7Supported feeds are:
8- Rss v0.91, 0.92 and 2.0
9- Atom 1.0
10
11The package allows us to maintain cache timeout management. This prevents us
12from querying the servers for feed updates too often and risk ip bans. Apart
13from setting a cache timeout manually, the package also optionally adheres to
14the TTL, SkipDays and SkipHours values specified in the feeds themselves.
15
16Note that the TTL, SkipDays and SkipHour fields are only part of the RSS spec.
17For Atom feeds, we use the CacheTimeout in the Feed struct.
18
19Because the object structure is a hybrid between both RSS and Atom specs, not
20all fields will be filled when requesting either an RSS or Atom feed. I have
21tried to create as many shared fields as possible but some of them simply do
22not occur in either the RSS or Atom spec.
23
24The Feed object supports notifications of new channels and items.
25This is achieved by passing 2 function handlers to the feeder.New() function.
26They will be called whenever a feed is updated from the remote source and
27either a new channel or a new item is found that previously did not exist.
28This allows you to easily monitor a feed for changes. See feed_test.go for
29an example of how this works.
30
31## DEPENDENCIES
32
33[github.com/jteeuwen/go-pkg-xmlx](http://github.com/jteeuwen/go-pkg-xmlx)
34
35## USAGE
36
37
38An idiomatic example program can be found in [testdata/example.go](https://github.com/jteeuwen/go-pkg-rss/blob/master/testdata/example.go).
39
40