Class: KM::Resque::ApiClient
- Inherits:
-
Object
- Object
- KM::Resque::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
6 7 8 9 10 11 |
# File 'lib/km/resque/api_client.rb', line 6 def alias(identifier1, identifier2, ) hit('a', { '_n' => identifier2, '_p' => identifier1, '_t' => }) end |
#api_key ⇒ Object
26 27 28 |
# File 'lib/km/resque/api_client.rb', line 26 def api_key @api_key ||= KM::Resque.configuration.key end |
#host ⇒ Object
30 31 32 |
# File 'lib/km/resque/api_client.rb', line 30 def host @host ||= KM::Resque.configuration.host end |
#port ⇒ Object
34 35 36 |
# File 'lib/km/resque/api_client.rb', line 34 def port @port ||= KM::Resque.configuration.port end |
#record(identifier, event_name, properties, timestamp) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/km/resque/api_client.rb', line 13 def record(identifier, event_name, properties, ) hit('e', { '_p' => identifier, '_n' => event_name, '_t' => }.merge(properties || {})) end |
#set(identifier, properties, timestamp) ⇒ Object
20 21 22 23 24 |
# File 'lib/km/resque/api_client.rb', line 20 def set(identifier, properties, ) hit('s', { '_p' => identifier, '_t' => }.merge(properties)) end |