Class: Jirafe::Callback::JirafeCallback

Inherits:
Object
  • Object
show all
Includes:
HTTParty, ResponseParser
Defined in:
lib/jirafe/callback/jirafe_callback.rb

Direct Known Subclasses

Event

Class Method Summary collapse

Methods included from ResponseParser

included

Class Method Details

.callback_urlObject



16
17
18
# File 'lib/jirafe/callback/jirafe_callback.rb', line 16

def callback_url
  "/cmb"
end

.loggerObject



12
13
14
# File 'lib/jirafe/callback/jirafe_callback.rb', line 12

def logger
  Jirafe.config.logger
end

.notify(site_id) ⇒ Object



20
21
22
23
24
25
# File 'lib/jirafe/callback/jirafe_callback.rb', line 20

def notify(site_id)
  raise Jirafe::Error::MissingSiteId if site_id.nil?
  response = post(callback_url, {:body => {"siteId" => site_id }})
  check_response_for_exception(response)
  true
end