Class: Urbanairship::Reports::IndividualResponseStats
- Inherits:
-
Object
- Object
- Urbanairship::Reports::IndividualResponseStats
- Defined in:
- lib/urbanairship/reports/response_statistics.rb
Constant Summary
Constants included from Common
Instance Method Summary collapse
- #get(push_id: required('push_id')) ⇒ Object
-
#initialize(client: required('client')) ⇒ IndividualResponseStats
constructor
A new instance of IndividualResponseStats.
Methods included from Loggable
create_logger, logger, #logger
Methods included from Common
#apid_path, #channel_path, #compact_helper, #create_and_send_path, #custom_events_path, #device_token_path, #experiments_path, #lists_path, #named_users_path, #open_channel_path, #pipelines_path, #push_path, #reports_path, #required, #schedules_path, #segments_path, #tag_lists_path, #try_helper
Constructor Details
#initialize(client: required('client')) ⇒ IndividualResponseStats
Returns a new instance of IndividualResponseStats.
41 42 43 |
# File 'lib/urbanairship/reports/response_statistics.rb', line 41 def initialize(client: required('client')) @client = client end |
Instance Method Details
#get(push_id: required('push_id')) ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/urbanairship/reports/response_statistics.rb', line 45 def get(push_id: required('push_id')) fail ArgumentError, 'push_id cannot be nil' if push_id.nil? path = reports_path('responses/' + push_id) response = @client.send_request(method: 'GET', path: path) logger.info("Retrieved info on push_id: #{push_id}") response end |