Module: Selligent::Client::CIM
- Included in:
- Selligent::Client
- Defined in:
- lib/selligent/client/cim.rb
Overview
Implements the CIM endpoints
/organizations/:organization/cim/*
Instance Method Summary collapse
-
#cim_cancel(request_id) ⇒ Object
Cancel a CIM request.
-
#cim_collect(api_name, data) ⇒ Object
Collects, for the selected lists, all data available in the Engage environment, including Site and Recommendations.
-
#cim_optout(api_name, data) ⇒ Object
Unsubscribes a subject from the selected lists.
-
#cim_remove(api_name, data) ⇒ Object
Permanently removes the data after 30 days.
-
#cim_result(request_id) ⇒ Object
Get the result of a CIM collect request.
-
#cim_state(request_id) ⇒ Object
Get the state of a CIM request.
Instance Method Details
#cim_cancel(request_id) ⇒ Object
Cancel a CIM request
49 50 51 |
# File 'lib/selligent/client/cim.rb', line 49 def cim_cancel(request_id) delete("#{base_url}/cim/request/#{request_id}") end |
#cim_collect(api_name, data) ⇒ Object
Collects, for the selected lists, all data available in the Engage environment, including Site and Recommendations. Once the data has been gathered, it can be downloaded and made available in a JSON file. The dashboard indicates when the file is available for download
33 34 35 |
# File 'lib/selligent/client/cim.rb', line 33 def cim_collect(api_name, data) post("#{base_url}/cim/#{api_name}/collect", data) end |
#cim_optout(api_name, data) ⇒ Object
Unsubscribes a subject from the selected lists
38 39 40 |
# File 'lib/selligent/client/cim.rb', line 38 def cim_optout(api_name, data) post("#{base_url}/cim/#{api_name}/optout", data) end |
#cim_remove(api_name, data) ⇒ Object
Permanently removes the data after 30 days. No restore of the data is possible.
44 45 46 |
# File 'lib/selligent/client/cim.rb', line 44 def cim_remove(api_name, data) post("#{base_url}/cim/#{api_name}/remove", data) end |
#cim_result(request_id) ⇒ Object
Get the result of a CIM collect request
59 60 61 |
# File 'lib/selligent/client/cim.rb', line 59 def cim_result(request_id) get("#{base_url}/cim/request/#{request_id}") end |
#cim_state(request_id) ⇒ Object
Get the state of a CIM request
54 55 56 |
# File 'lib/selligent/client/cim.rb', line 54 def cim_state(request_id) get("#{base_url}/cim/request/#{request_id}/state") end |