class Twingly::LiveFeed::Result
Represents a result from a request to the LiveFeed
API
@see Client#next_result
@attr [Time] ts the exact time when the result was built @attr [Time] from the timestamp that was sent in the request.
See {Client#timestamp}
@attr [Integer] number_of_posts
the number of posts this result contains @attr [Integer] max_number_of_posts
the maximum number of posts this result
could contain. See {Client#max_posts}
@attr [Time] first_post
the index time for the first post in the result @attr [Time] last_post
the index time for the last post in the result @attr [Time] next_timestamp
the timestamp that should be used to get the
next batch of posts
Attributes
first_post[RW]
from[RW]
last_post[RW]
max_number_of_posts[RW]
next_timestamp[RW]
number_of_posts[RW]
ts[RW]
Public Instance Methods
inspect()
click to toggle source
# File lib/twingly/livefeed/result.rb, line 27 def inspect instance_methods = [ "posts", "ts=#{self.ts}", "from=#{self.from}", "number_of_posts=#{self.number_of_posts}", "max_number_of_posts=#{self.max_number_of_posts}", "first_post=#{self.first_post}", "last_post=#{self.last_post}", "next_timestamp=#{self.next_timestamp}", ].join(", ") sprintf("#<%s:0x%x %s>", self.class.name, __id__, instance_methods) end
posts()
click to toggle source
@return [Array<Post>] all posts that matched the {Query}.
# File lib/twingly/livefeed/result.rb, line 23 def posts @posts ||= [] end