Class: KmResque::ApiClient
- Inherits:
-
Object
- Object
- KmResque::ApiClient
- Defined in:
- lib/km_resque/api_client.rb
Instance Method Summary collapse
- #alias(identifier1, identifier2, timestamp) ⇒ Object
- #api_key ⇒ Object
- #host ⇒ Object
- #port ⇒ Object
- #record(identifier, event_name, properties, timestamp) ⇒ Object
- #set(identifier, properties, timestamp) ⇒ Object
Instance Method Details
#alias(identifier1, identifier2, timestamp) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/km_resque/api_client.rb', line 5 def alias(identifier1, identifier2, ) hit('a', { '_n' => identifier2, '_p' => identifier1, '_t' => }) end |
#api_key ⇒ Object
25 26 27 |
# File 'lib/km_resque/api_client.rb', line 25 def api_key @api_key ||= KmResque.configuration.key end |
#host ⇒ Object
29 30 31 |
# File 'lib/km_resque/api_client.rb', line 29 def host @host ||= KmResque.configuration.host end |
#port ⇒ Object
33 34 35 |
# File 'lib/km_resque/api_client.rb', line 33 def port @port ||= KmResque.configuration.port end |
#record(identifier, event_name, properties, timestamp) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/km_resque/api_client.rb', line 12 def record(identifier, event_name, properties, ) hit('e', { '_p' => identifier, '_n' => event_name, '_t' => }.merge(properties || {})) end |
#set(identifier, properties, timestamp) ⇒ Object
19 20 21 22 23 |
# File 'lib/km_resque/api_client.rb', line 19 def set(identifier, properties, ) hit('s', { '_p' => identifier, '_t' => }.merge(properties)) end |