Module: ScormEngine::Api::Endpoints::Registrations::LaunchHistory
- Included in:
- ScormEngine::Api::Endpoints
- Defined in:
- lib/scorm_engine/api/endpoints/registrations/launch_history.rb
Instance Method Summary collapse
-
#get_registration_launch_history(options = {}) ⇒ Array<ScormEngine::Models::RegistrationLaunchHistory>
Get launch history data associated with this registration.
Instance Method Details
#get_registration_launch_history(options = {}) ⇒ Array<ScormEngine::Models::RegistrationLaunchHistory>
Get launch history data associated with this registration
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/scorm_engine/api/endpoints/registrations/launch_history.rb', line 28 def get_registration_launch_history( = {}) (, :registration_id) = .dup registration_id = .delete(:registration_id) [:includeHistoryLog] = !!.delete(:include_history_log) response = get("registrations/#{registration_id}/launchHistory", ) result = if response.success? response.body["launchHistory"].map do |history| ScormEngine::Models::RegistrationLaunchHistory.new_from_api(history) end end Response.new(raw_response: response, result: result) end |