Class: FeedlyApi::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/feedly_api/feed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client = Client.new, feed_id) ⇒ Feed

Returns a new instance of Feed.



10
11
12
13
14
15
# File 'lib/feedly_api/feed.rb', line 10

def initialize(client = Client.new, feed_id)
  @client = client
  @id = feed_id

  fetch_feed_info
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/feedly_api/feed.rb', line 3

def client
  @client
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/feedly_api/feed.rb', line 3

def id
  @id
end

#subscribersObject (readonly)

Returns the value of attribute subscribers.



3
4
5
# File 'lib/feedly_api/feed.rb', line 3

def subscribers
  @subscribers
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/feedly_api/feed.rb', line 3

def title
  @title
end

#velocityObject (readonly)

Returns the value of attribute velocity.



3
4
5
# File 'lib/feedly_api/feed.rb', line 3

def velocity
  @velocity
end

#websiteObject (readonly)

Returns the value of attribute website.



3
4
5
# File 'lib/feedly_api/feed.rb', line 3

def website
  @website
end

Instance Method Details

#items(args = {}) ⇒ Object



17
18
19
# File 'lib/feedly_api/feed.rb', line 17

def items(args = {})
  @client.get_feed_contents(@id, args).fetch(:items) {[]}
end