Class: Kameleoon::Network::ActivityEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/kameleoon/network/activity_event.rb

Overview

ActivityEvent represents an activity tracking event.

Constant Summary collapse

EVENT_TYPE =
'activity'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActivityEvent

Returns a new instance of ActivityEvent.



17
18
19
# File 'lib/kameleoon/network/activity_event.rb', line 17

def initialize
  @sent = false
end

Instance Attribute Details

#sentObject (readonly)

Returns the value of attribute sent.



15
16
17
# File 'lib/kameleoon/network/activity_event.rb', line 15

def sent
  @sent
end

Instance Method Details

#mark_as_sentObject



29
30
31
# File 'lib/kameleoon/network/activity_event.rb', line 29

def mark_as_sent
  @sent = true
end

#obtain_full_post_text_lineObject



21
22
23
24
25
26
27
# File 'lib/kameleoon/network/activity_event.rb', line 21

def obtain_full_post_text_line
  params = {
    eventType: EVENT_TYPE,
    nonce: Kameleoon::Utils.generate_random_string(Kameleoon::NONCE_LENGTH)
  }
  UriHelper.encode_query(params)
end