Class: Google::Reader::Subscription
- Defined in:
- lib/google/reader/subscription.rb
Class Method Summary collapse
Methods inherited from Base
get_entries, get_token, parse, parse_json, user_info
Class Method Details
.all ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/google/reader/subscription.rb', line 6 def all parse_json(get(SUBSCRIPTION_LIST_URL))['subscriptions'].inject([]) do |subs, s| subs << OpenStruct.new( :firstitemmsec => s['firstitemmsec'], :title => s['title'], :google_id => s['id'], :categories => s['categories'].inject([]) { |cats, c| cats << OpenStruct.new(:google_id => c['id'], :name => c['label']) }) end end |