Sha256: c026d961538bc32969a39b84f91e92fb13159a6997f7247769c4fec27b554b17
Contents?: true
Size: 1.12 KB
Versions: 1
Compression:
Stored size: 1.12 KB
Contents
module Rubyoverflow class PostTimelineEvents < PagedBase attr_reader :post_timelines def initialize(hash, request_path = '') dash = PostTimelineEventsDash.new hash super(dash, request_path) @post_timelines = Array.new dash.post_timelines.each {|postTimeHash| @post_timelines.push(PostTimelineEvent.new postTimeHash)} end #Retrieves the next set of PostTimelineEvents using the same parameters used to retrieve the current set def get_next_set hash,url = perform_next_page_request PostTimelineEvents.new hash,url end class << self #Retrieve a set of PostTimelineEvent for a set of question(s) by their id(s) # #id can be an int, string, or an array of ints or strings # #Maps to 'questions/{id}/timeline' def retrieve_by_question(id, parameters = {}) id = convert_to_id_list(id) hash, url = request('questions/' + id.to_s + '/timeline', parameters) PostTimelineEvents.new hash, url end end end class PostTimelineEventsDash < PagedDash property :post_timelines end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubyoverflow-1.0.2 | lib/rubyoverflow/postTimelineEvents.rb |