Class: TheCity::GroupCheckinReader
- Defined in:
- lib/readers/group_checkin_reader.rb
Instance Attribute Summary
Attributes inherited from ApiReader
Instance Method Summary collapse
-
#initialize(group_id, checkin_id, by_id = 'id', cacher = nil) ⇒ GroupCheckinReader
constructor
Constructor.
Methods inherited from ApiReader
#load_feed, #rate_limit, #rate_limit_remaining
Constructor Details
#initialize(group_id, checkin_id, by_id = 'id', cacher = nil) ⇒ GroupCheckinReader
Constructor.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/readers/group_checkin_reader.rb', line 10 def initialize(group_id, checkin_id, by_id='id', cacher = nil) #@class_key = "groups_#{group_id}_checkins_#{checkin_id}" @url_data_path = case by_id when 'id' "/groups/#{group_id}/checkins/#{checkin_id}" when 'pager_number' "/groups/#{group_id}/checkins/by_pager_number?pager_number=#{URI.escape(checkin_id)}" when 'callboard_number' "/groups/#{group_id}/checkins/by_callboard_number?callboard_number=#{URI.escape(checkin_id)}" else "/groups/#{group_id}/checkins/#{checkin_id}" end #@url_data_params = options # The object to store and load the cache. @cacher = cacher unless cacher.nil? end |