Class: Rubyoverflow::UserTimelineEvents
- Defined in:
- lib/rubyoverflow/userTimelineEvents.rb
Instance Attribute Summary collapse
-
#user_timelines ⇒ Object
readonly
Returns the value of attribute user_timelines.
Attributes inherited from PagedBase
#page, #pagesize, #query_parameters, #request_path, #total
Class Method Summary collapse
-
.retrieve_by_user(id, parameters = {}) ⇒ Object
Retrieves a set of timeline events for a set of user(s) by their id(s).
Instance Method Summary collapse
-
#get_next_set ⇒ Object
Retrieves the next set of UserTimelineEvents using the same parameters used to retrieve the current set.
-
#initialize(hash, request_path = '') ⇒ UserTimelineEvents
constructor
A new instance of UserTimelineEvents.
Methods inherited from PagedBase
#next_page_parameters, #perform_next_page_request
Methods inherited from Base
change_end_point, client, convert_if_array, convert_to_id_list, #find_parse_querystring, request, #request
Constructor Details
#initialize(hash, request_path = '') ⇒ UserTimelineEvents
Returns a new instance of UserTimelineEvents.
4 5 6 7 8 9 |
# File 'lib/rubyoverflow/userTimelineEvents.rb', line 4 def initialize(hash, request_path = '') dash = UserTimelineEventsDash.new hash super(dash, request_path) @user_timelines = Array.new dash.user_timelines.each{|timelineHash| @user_timelines.push(UserTimelineEvent.new timelineHash)} end |
Instance Attribute Details
#user_timelines ⇒ Object (readonly)
Returns the value of attribute user_timelines.
3 4 5 |
# File 'lib/rubyoverflow/userTimelineEvents.rb', line 3 def user_timelines @user_timelines end |
Class Method Details
.retrieve_by_user(id, parameters = {}) ⇒ Object
Retrieves a set of timeline events for a set of user(s) by their id(s)
id can be an int, string or an array of ints or strings
Maps to ‘users/id/timeline
23 24 25 26 27 |
# File 'lib/rubyoverflow/userTimelineEvents.rb', line 23 def retrieve_by_user(id, parameters = {}) id = convert_to_id_list(id) hash, url = request('users/' + id.to_s + '/timeline',parameters) UserTimelineEvents.new hash, url end |
Instance Method Details
#get_next_set ⇒ Object
Retrieves the next set of UserTimelineEvents using the same parameters used to retrieve the current set
12 13 14 15 |
# File 'lib/rubyoverflow/userTimelineEvents.rb', line 12 def get_next_set hash,url = perform_next_page_request UserTimelineEvents.new hash,url end |