Commit Graph

43 Commits

Author SHA1 Message Date
A. Svensson 4142b8628b Allow setting a custom user agent. 2015-11-30 20:03:41 +01:00
Andrew a314f2edf7 Just typo fix 2015-11-25 15:20:58 +01:00
Michael Handler 110a94b207 Add IgnoreCacheOnce() to Feed objects.
When called, the Feed object will ignore any cached data or refresh hint
metadata, and always attempt to download the feed data from the source.
Resets to normal (cache-abiding) behavior after a successful retrieval.
2015-03-01 22:41:15 -08:00
Michael K 07c9e4322a Added comment 2014-11-29 01:20:34 +01:00
Michael K f5b1056458 Added missing this 2014-11-29 01:20:34 +01:00
Michael K 13b293d8cd Added a new function; time till next update as time.Duration 2014-11-28 16:55:58 +01:00
Michael K ee66dbdb55 Store time of last update as time.Time
This commit breaks the API, because LastUpdate() now returns a
time.Time object instead of an int64.
2014-11-28 16:53:09 +01:00
Michael K 525d2bdc03 Made use of SecondsTillUpdate()
Increases code comprehensibility
2014-11-28 16:44:20 +01:00
Michael K 4840ef15a3 Update lastupdate only when fetching 2014-11-28 14:55:38 +01:00
Jim Teeuwen 87b95b233d Merge pull request #51 from michael-k/goto
Removed goto
2014-11-26 20:18:00 +01:00
Michael K 2ffad35d97 Removed goto 2014-11-26 16:21:39 +01:00
Michael K 6c373508f8 Removed faulty empty line 2014-11-26 16:12:54 +01:00
Michael K 1dd67de72f Fixed typo 2014-11-26 16:10:39 +01:00
Michael K d66a691370 Added missing punctuation marks 2014-11-26 16:09:51 +01:00
Jim Teeuwen c7f7ccd37e Merge pull request #46 from JalfResi/split-handlers
Separating singular handler type to ease reuse/chaining
2014-10-14 20:28:18 +02:00
Ben Davies 18dc81ecf7 Typo in comment 2014-10-14 18:53:00 +01:00
Ben Davies 5d9fc9c561 Ensured that New() feed function is functionally equivalent still 2014-10-14 18:51:13 +01:00
Paulius Maruška 1e531bd310 Fixes #44, crash when no handlers
Recent database handler changes made the library crash, when feed
object is created without channel, item handlers (passing nils).
These simple changes seem to fix the problem and the library works
again.
2014-10-10 21:35:26 +03:00
Jim Teeuwen c753ba0962 Merge pull request #43 from JalfResi/database-handlers
Database and handler types
2014-10-04 15:24:39 +02:00
Ben Davies b6de09f2a3 Added databse handler to New() so that it functionally identical to old approach 2014-10-04 12:48:45 +01:00
Ben Davies cb314c235b Refactored the handler functions into interface types. Follows the /net/http handlers pattern. Handlers are now chainable. Moved database checking from notifyHandlers. Implemented database feature as chainable handler 2014-10-04 12:45:05 +01:00
Ben Davies c01c0416b8 Added check to ensure that period is found in version string of RSS node 2014-09-28 12:30:58 +01:00
Ben Davies d4964c8450 Added specific error types rather than generic error types 2014-09-25 13:27:05 +01:00
Harm Aarts 0aaac62e64 Add check if the handler exists. 2013-12-05 16:23:32 +01:00
Harm Aarts 6b6086e389 Adds Key() 2013-12-05 16:04:00 +01:00
Harm Aarts 3b336dc54b Adds the database for checking new channels/items.
In this iteration the key passed to the database is the Title which is
obviously silly.
I'm still looking for a configurable way of generating the unique key.
2013-12-05 15:31:49 +01:00
Harm Aarts d75037c0ab Removes notification of new channels
This is going to be moved to the stateful Feed, this is yet to be
implemented.
2013-12-05 14:10:22 +01:00
Jim Teeuwen 7b1a94122f Runs go fmt on all code. 2013-11-28 10:23:49 +01:00
Zack Bartel 2b83f94cf5 fix off by one slice index 2013-06-05 10:43:16 -07:00
Chris Grindstaff 9a77aeb2f6 Add testdata
RSS author parsing
2013-03-27 23:05:27 -04:00
Anschel Schaffer-Cohen cccaf19d93 Use upstream xmlx now that it has merged. 2013-03-19 14:12:11 -04:00
Anschel Schaffer-Cohen 069bcf4dc8 Use more flexible go-pkg-xmlx.
If/when the changes are pulled into jteeuwen's branch I can change the
path back.
2013-03-19 10:03:21 -04:00
jim teeuwen 6f6d1c9b3a Fix Feed.SecondsTilUpdate(). Last patch failed to convert stored time to seconds properly. Fixes issue #10. 2012-03-13 16:46:42 +01:00
jim teeuwen f51db12ad3 Add xmlx.CharsetFunc parameter to Feed.Fetch method. Can be used to supply a custom character encoding conversion routine to the xml decoder. Update test code accordingly. 2012-02-29 11:31:01 +01:00
jim teeuwen 45d4452c15 gofmt -s -w 2011-12-07 13:46:06 +01:00
jim teeuwen e44514e2cb Fix for weekly 2011.12.02 2011-12-02 12:50:42 +01:00
jim teeuwen e31aff8084 gofix error 2011-11-02 16:51:04 +01:00
jim teeuwen 59e30a75dc Fix Time.Weekday() call due to recent change in Go. 2011-09-19 02:25:09 +02:00
jim teeuwen 09a1cbe77d Changed depracated xmlx Node api to new one. 2011-05-11 17:40:56 +02:00
Ben Davies b6a52bbf24 Added SecondsTillUpdate() method. 2011-05-09 20:11:50 +01:00
jim teeuwen de8e1bd299 Fix for new Go release 2011-03-16 07:22:45 +01:00
jim teeuwen 6c6b659e88 Apply changes to go-pkg-xmlx allowing wildcards for namespace names. 2011-02-01 15:30:39 +01:00
jim teeuwen 1a851548db Making package easily usable with goinstall. Including the reference to go-pkg-xmlx and the build target in the makefile. 2011-01-20 22:57:04 +01:00
Renamed from src/feed.go (Browse further)