Class: Google::Reader::Stream
- Defined in:
- lib/google/reader/stream.rb
Class Method Summary collapse
-
.fetch(feed_url, options = {}) ⇒ Object
Params: xt - exclude target, e.g.
- .fetch_feed(feed_url, options = {}) ⇒ Object
Methods inherited from Base
get_entries, get_token, normalize_feed_url, parse, parse_json, user_info
Class Method Details
.fetch(feed_url, options = {}) ⇒ Object
Params: xt - exclude target, e.g. xt=user/-/state/com.google/read r - order (n - newest first, o - oldest first) ot - if r=o, only items posted after ot are returned (unix timestamp) ck - current timestamp? c - continuation n - count client - ?
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/google/reader/stream.rb', line 12 def self.fetch(feed_url, = {}) url = sprintf(STREAM_URL, feed_url) = { :query_hash => { :ck => Time.now.to_i, :n => 20 } }.deep_merge() json = get(url, ) data = parse_json(json) end |
.fetch_feed(feed_url, options = {}) ⇒ Object
24 25 26 27 |
# File 'lib/google/reader/stream.rb', line 24 def self.fetch_feed(feed_url, = {}) feed_url = 'feed/' + CGI.escape(normalize_feed_url(feed_url)) fetch feed_url, end |