Class: AnalyticsEventsSender::Appmetrica
- Inherits:
-
Object
- Object
- AnalyticsEventsSender::Appmetrica
- Defined in:
- lib/analytics_events_sender/appmetrica.rb
Constant Summary collapse
- BASE_URL =
'https://api.appmetrica.yandex.com/logs/v1/import/events.csv'.freeze
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
11 12 13 14 15 |
# File 'lib/analytics_events_sender/appmetrica.rb', line 11 def call response = HTTParty.post(complete_url, body: prepared_params, format: :json) return false unless response.success? end |
#ininialize(user, params = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/analytics_events_sender/appmetrica.rb', line 5 def ininialize(user, params = {}) @user = user @params = params @event_name = params.dig(:notification_type) end |