Class: RusticiSoftwareCloudV2::CourseApi
- Inherits:
-
Object
- Object
- RusticiSoftwareCloudV2::CourseApi
- Defined in:
- lib/rustici_software_cloud_v2/api/course_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#build_course_preview_launch_link(course_id, launch_link_request, opts = {}) ⇒ LaunchLinkSchema
Get a link to preview a course.
-
#build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts = {}) ⇒ Array<(LaunchLinkSchema, Fixnum, Hash)>
Get a link to preview a course.
-
#build_course_preview_launch_link_with_version(course_id, version_id, launch_link_request, opts = {}) ⇒ LaunchLinkSchema
Get a link to preview a particular course version.
-
#build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts = {}) ⇒ Array<(LaunchLinkSchema, Fixnum, Hash)>
Get a link to preview a particular course version.
-
#create_fetch_and_import_course_job(course_id, import_request, opts = {}) ⇒ StringResultSchema
Fetch and import a course.
-
#create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>
Fetch and import a course.
-
#create_upload_and_import_course_job(course_id, opts = {}) ⇒ StringResultSchema
Upload and import a course.
-
#create_upload_and_import_course_job_with_http_info(course_id, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>
Upload and import a course.
-
#delete_course(course_id, opts = {}) ⇒ nil
Delete a course.
-
#delete_course_configuration_setting(course_id, setting_id, opts = {}) ⇒ nil
Clear a course configuration.
-
#delete_course_configuration_setting_with_http_info(course_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Clear a course configuration.
-
#delete_course_tags(course_id, tags, opts = {}) ⇒ nil
Delete course tags.
-
#delete_course_tags_with_http_info(course_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete course tags.
-
#delete_course_version(course_id, version_id, opts = {}) ⇒ nil
Delete a course version.
-
#delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {}) ⇒ nil
Clear a configuration setting for a version of a course.
-
#delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Clear a configuration setting for a version of a course.
-
#delete_course_version_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a course version.
-
#delete_course_with_http_info(course_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a course.
-
#get_course(course_id, opts = {}) ⇒ CourseSchema
Get course details.
-
#get_course_configuration(course_id, opts = {}) ⇒ SettingListSchema
Get course configuration.
-
#get_course_configuration_with_http_info(course_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>
Get course configuration.
-
#get_course_statements(course_id, opts = {}) ⇒ XapiStatementResult
Get course xAPI statements.
-
#get_course_statements_with_http_info(course_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>
Get course xAPI statements.
-
#get_course_tags(course_id, opts = {}) ⇒ TagListSchema
Get course tags.
-
#get_course_tags_with_http_info(course_id, opts = {}) ⇒ Array<(TagListSchema, Fixnum, Hash)>
Get course tags.
-
#get_course_version_configuration(course_id, version_id, opts = {}) ⇒ SettingListSchema
Get configuration for a version of a course.
-
#get_course_version_configuration_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>
Get configuration for a version of a course.
-
#get_course_version_info(course_id, version_id, opts = {}) ⇒ CourseSchema
Get details on a course version.
-
#get_course_version_info_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(CourseSchema, Fixnum, Hash)>
Get details on a course version.
-
#get_course_version_statements(course_id, version_id, opts = {}) ⇒ XapiStatementResult
Get xAPI statements for a course version.
-
#get_course_version_statements_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>
Get xAPI statements for a course version.
-
#get_course_versions(course_id, opts = {}) ⇒ CourseListNonPagedSchema
Get details on a course’s versions.
-
#get_course_versions_with_http_info(course_id, opts = {}) ⇒ Array<(CourseListNonPagedSchema, Fixnum, Hash)>
Get details on a course's versions.
-
#get_course_with_http_info(course_id, opts = {}) ⇒ Array<(CourseSchema, Fixnum, Hash)>
Get course details.
-
#get_courses(opts = {}) ⇒ CourseListSchema
Get all courses.
-
#get_courses_with_http_info(opts = {}) ⇒ Array<(CourseListSchema, Fixnum, Hash)>
Get all courses.
-
#get_import_job_status(import_job_id, opts = {}) ⇒ ImportJobResultSchema
Get course import job status.
-
#get_import_job_status_with_http_info(import_job_id, opts = {}) ⇒ Array<(ImportJobResultSchema, Fixnum, Hash)>
Get course import job status.
-
#initialize(api_client = ApiClient.default) ⇒ CourseApi
constructor
A new instance of CourseApi.
-
#put_course_tags(course_id, tags, opts = {}) ⇒ nil
Set course tags.
-
#put_course_tags_batch(batch, opts = {}) ⇒ nil
Set tags on courses.
-
#put_course_tags_batch_with_http_info(batch, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set tags on courses.
-
#put_course_tags_with_http_info(course_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set course tags.
-
#set_course_configuration(course_id, configuration_settings, opts = {}) ⇒ nil
Set course configuration.
-
#set_course_configuration_with_http_info(course_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set course configuration.
-
#set_course_title(course_id, title, opts = {}) ⇒ nil
Set the title of a course.
-
#set_course_title_with_http_info(course_id, title, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set the title of a course.
-
#set_course_version_configuration(course_id, version_id, configuration_settings, opts = {}) ⇒ nil
Set configuration for a version of a course.
-
#set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set configuration for a version of a course.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CourseApi
Returns a new instance of CourseApi.
18 19 20 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 18 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#build_course_preview_launch_link(course_id, launch_link_request, opts = {}) ⇒ LaunchLinkSchema
Get a link to preview a course. Returns the launch link to use to preview this course.
29 30 31 32 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 29 def build_course_preview_launch_link(course_id, launch_link_request, opts = {}) data, _status_code, _headers = build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts) return data end |
#build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts = {}) ⇒ Array<(LaunchLinkSchema, Fixnum, Hash)>
Get a link to preview a course. Returns the launch link to use to preview this course.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 41 def build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.build_course_preview_launch_link ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link" if course_id.nil? # verify the required parameter 'launch_link_request' is set fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link" if launch_link_request.nil? # resource path local_var_path = "/courses/{courseId}/preview".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} query_params[:'cssUrl'] = opts[:'css_url'] if !opts[:'css_url'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(launch_link_request) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LaunchLinkSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#build_course_preview_launch_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#build_course_preview_launch_link_with_version(course_id, version_id, launch_link_request, opts = {}) ⇒ LaunchLinkSchema
Get a link to preview a particular course version. Returns the link to use to preview a particular version of a course.
89 90 91 92 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 89 def build_course_preview_launch_link_with_version(course_id, version_id, launch_link_request, opts = {}) data, _status_code, _headers = build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts) return data end |
#build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts = {}) ⇒ Array<(LaunchLinkSchema, Fixnum, Hash)>
Get a link to preview a particular course version. Returns the link to use to preview a particular version of a course.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 101 def build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.build_course_preview_launch_link_with_version ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link_with_version" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.build_course_preview_launch_link_with_version" if version_id.nil? # verify the required parameter 'launch_link_request' is set fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link_with_version" if launch_link_request.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}/preview".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(launch_link_request) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LaunchLinkSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#build_course_preview_launch_link_with_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_fetch_and_import_course_job(course_id, import_request, opts = {}) ⇒ StringResultSchema
Fetch and import a course. An import job will be started to fetch and import the referenced file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided. To check the progress of the import job, GetImportJobStatus should be called with the job ID returned from this call.
151 152 153 154 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 151 def create_fetch_and_import_course_job(course_id, import_request, opts = {}) data, _status_code, _headers = create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts) return data end |
#create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>
Fetch and import a course. An import job will be started to fetch and import the referenced file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided. To check the progress of the import job, GetImportJobStatus should be called with the job ID returned from this call.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 164 def create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.create_fetch_and_import_course_job ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_fetch_and_import_course_job" if course_id.nil? # verify the required parameter 'import_request' is set fail ArgumentError, "Missing the required parameter 'import_request' when calling CourseApi.create_fetch_and_import_course_job" if import_request.nil? # resource path local_var_path = "/courses/importJobs".sub('{format}','json') # query parameters query_params = {} query_params[:'courseId'] = course_id query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil? query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(import_request) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StringResultSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#create_fetch_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_upload_and_import_course_job(course_id, opts = {}) ⇒ StringResultSchema
Upload and import a course. An import job will be started to import the posted file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided. To check the progress of the import job, GetImportJobStatus should be called with the job ID returned from this call.
215 216 217 218 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 215 def create_upload_and_import_course_job(course_id, opts = {}) data, _status_code, _headers = create_upload_and_import_course_job_with_http_info(course_id, opts) return data end |
#create_upload_and_import_course_job_with_http_info(course_id, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>
Upload and import a course. An import job will be started to import the posted file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided. To check the progress of the import job, GetImportJobStatus should be called with the job ID returned from this call.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 228 def create_upload_and_import_course_job_with_http_info(course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.create_upload_and_import_course_job ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_upload_and_import_course_job" if course_id.nil? # resource path local_var_path = "/courses/importJobs/upload".sub('{format}','json') # query parameters query_params = {} query_params[:'courseId'] = course_id query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil? query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params["file"] = opts[:'file'] if !opts[:'file'].nil? # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StringResultSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#create_upload_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_course(course_id, opts = {}) ⇒ nil
Delete a course. Delete course identified by courseId. When a course is deleted, so is everything connected to this course. This includes: - Registrations - Invitations - Dispatches - Debug Logs
275 276 277 278 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 275 def delete_course(course_id, opts = {}) delete_course_with_http_info(course_id, opts) return nil end |
#delete_course_configuration_setting(course_id, setting_id, opts = {}) ⇒ nil
Clear a course configuration. Clears the value of the given settingId for this course. The effective setting value will become any value set at the application level (if this value is set at the application level) or the default setting.
328 329 330 331 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 328 def delete_course_configuration_setting(course_id, setting_id, opts = {}) delete_course_configuration_setting_with_http_info(course_id, setting_id, opts) return nil end |
#delete_course_configuration_setting_with_http_info(course_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Clear a course configuration. Clears the value of the given `settingId` for this course. The effective setting value will become any value set at the application level (if this value is set at the application level) or the default setting.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 339 def delete_course_configuration_setting_with_http_info(course_id, setting_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.delete_course_configuration_setting ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_configuration_setting" if course_id.nil? # verify the required parameter 'setting_id' is set fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_configuration_setting" if setting_id.nil? # resource path local_var_path = "/courses/{courseId}/configuration/{settingId}".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#delete_course_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_course_tags(course_id, tags, opts = {}) ⇒ nil
Delete course tags. Delete the provided tags from this course.
384 385 386 387 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 384 def (course_id, , opts = {}) (course_id, , opts) return nil end |
#delete_course_tags_with_http_info(course_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete course tags. Delete the provided tags from this course.
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 395 def (course_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.delete_course_tags ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_tags" if course_id.nil? # verify the required parameter 'tags' is set fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.delete_course_tags" if .nil? # resource path local_var_path = "/courses/{courseId}/tags".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#delete_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_course_version(course_id, version_id, opts = {}) ⇒ nil
Delete a course version. Delete versionId of courseId. If this is the last remaining version of this course, the course itself will be deleted and no longer accessible.
440 441 442 443 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 440 def delete_course_version(course_id, version_id, opts = {}) delete_course_version_with_http_info(course_id, version_id, opts) return nil end |
#delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {}) ⇒ nil
Clear a configuration setting for a version of a course. Clears the settingId value for this course and version.
497 498 499 500 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 497 def delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {}) delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts) return nil end |
#delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Clear a configuration setting for a version of a course. Clears the `settingId` value for this course and version.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 509 def delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.delete_course_version_configuration_setting ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version_configuration_setting" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version_configuration_setting" if version_id.nil? # verify the required parameter 'setting_id' is set fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_version_configuration_setting" if setting_id.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}/configuration/{settingId}".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#delete_course_version_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_course_version_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a course version. Delete `versionId` of `courseId`. If this is the last remaining version of this course, the course itself will be deleted and no longer accessible.
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 451 def delete_course_version_with_http_info(course_id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.delete_course_version ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version" if version_id.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#delete_course_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_course_with_http_info(course_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a course. Delete course identified by `courseId`. When a course is deleted, so is everything connected to this course. This includes: - Registrations - Invitations - Dispatches - Debug Logs
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 285 def delete_course_with_http_info(course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.delete_course ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course" if course_id.nil? # resource path local_var_path = "/courses/{courseId}".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#delete_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course(course_id, opts = {}) ⇒ CourseSchema
Get course details. Get detailed information about courseId. Futher detail can be obtained with the optional query parameters flags.
557 558 559 560 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 557 def get_course(course_id, opts = {}) data, _status_code, _headers = get_course_with_http_info(course_id, opts) return data end |
#get_course_configuration(course_id, opts = {}) ⇒ SettingListSchema
Get course configuration. Returns all effective configuration settings for this course. For any setting which is not explicitly set at the course level, the effective value will be either the value set at the application level (if there is one) or the default value for the setting.
615 616 617 618 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 615 def get_course_configuration(course_id, opts = {}) data, _status_code, _headers = get_course_configuration_with_http_info(course_id, opts) return data end |
#get_course_configuration_with_http_info(course_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>
Get course configuration. Returns all effective configuration settings for this course. For any setting which is not explicitly set at the course level, the effective value will be either the value set at the application level (if there is one) or the default value for the setting.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 626 def get_course_configuration_with_http_info(course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_configuration ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_configuration" if course_id.nil? # resource path local_var_path = "/courses/{courseId}/configuration".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SettingListSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_statements(course_id, opts = {}) ⇒ XapiStatementResult
Get course xAPI statements. Get xAPI statements for courseId.
674 675 676 677 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 674 def get_course_statements(course_id, opts = {}) data, _status_code, _headers = get_course_statements_with_http_info(course_id, opts) return data end |
#get_course_statements_with_http_info(course_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>
Get course xAPI statements. Get xAPI statements for `courseId`.
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 688 def get_course_statements_with_http_info(course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_statements ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_statements" if course_id.nil? # resource path local_var_path = "/courses/{courseId}/xAPIStatements".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XapiStatementResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_tags(course_id, opts = {}) ⇒ TagListSchema
Get course tags. Get a list of the tags for this course.
735 736 737 738 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 735 def (course_id, opts = {}) data, _status_code, _headers = (course_id, opts) return data end |
#get_course_tags_with_http_info(course_id, opts = {}) ⇒ Array<(TagListSchema, Fixnum, Hash)>
Get course tags. Get a list of the tags for this course.
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 745 def (course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_tags ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_tags" if course_id.nil? # resource path local_var_path = "/courses/{courseId}/tags".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TagListSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_version_configuration(course_id, version_id, opts = {}) ⇒ SettingListSchema
Get configuration for a version of a course. Returns all configuration settings for this course and version.
790 791 792 793 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 790 def get_course_version_configuration(course_id, version_id, opts = {}) data, _status_code, _headers = get_course_version_configuration_with_http_info(course_id, version_id, opts) return data end |
#get_course_version_configuration_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>
Get configuration for a version of a course. Returns all configuration settings for this course and version.
802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 802 def get_course_version_configuration_with_http_info(course_id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_version_configuration ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_configuration" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_configuration" if version_id.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}/configuration".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SettingListSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_version_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_version_info(course_id, version_id, opts = {}) ⇒ CourseSchema
Get details on a course version. Get specific version versionId of courseId
851 852 853 854 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 851 def get_course_version_info(course_id, version_id, opts = {}) data, _status_code, _headers = get_course_version_info_with_http_info(course_id, version_id, opts) return data end |
#get_course_version_info_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(CourseSchema, Fixnum, Hash)>
Get details on a course version. Get specific version `versionId` of `courseId`
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 864 def get_course_version_info_with_http_info(course_id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_version_info ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_info" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_info" if version_id.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil? query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CourseSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_version_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_version_statements(course_id, version_id, opts = {}) ⇒ XapiStatementResult
Get xAPI statements for a course version. Get xAPI statements for version versionId of courseId
916 917 918 919 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 916 def get_course_version_statements(course_id, version_id, opts = {}) data, _status_code, _headers = get_course_version_statements_with_http_info(course_id, version_id, opts) return data end |
#get_course_version_statements_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>
Get xAPI statements for a course version. Get xAPI statements for version `versionId` of `courseId`
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 931 def get_course_version_statements_with_http_info(course_id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_version_statements ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_statements" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_statements" if version_id.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}/xAPIStatements".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'XapiStatementResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_version_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_versions(course_id, opts = {}) ⇒ CourseListNonPagedSchema
Get details on a course’s versions. Get information about all versions of courseId. This can be useful to see information such as registration counts and modification times across the versions of a course.
984 985 986 987 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 984 def get_course_versions(course_id, opts = {}) data, _status_code, _headers = get_course_versions_with_http_info(course_id, opts) return data end |
#get_course_versions_with_http_info(course_id, opts = {}) ⇒ Array<(CourseListNonPagedSchema, Fixnum, Hash)>
Get details on a course's versions. Get information about all versions of `courseId`. This can be useful to see information such as registration counts and modification times across the versions of a course.
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 998 def get_course_versions_with_http_info(course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course_versions ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_versions" if course_id.nil? # resource path local_var_path = "/courses/{courseId}/versions".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil? query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CourseListNonPagedSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_course_with_http_info(course_id, opts = {}) ⇒ Array<(CourseSchema, Fixnum, Hash)>
Get course details. Get detailed information about `courseId`. Futher detail can be obtained with the optional query parameters flags.
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 569 def get_course_with_http_info(course_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_course ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course" if course_id.nil? # resource path local_var_path = "/courses/{courseId}".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil? query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CourseSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_courses(opts = {}) ⇒ CourseListSchema
Get all courses. Get all courses for the appId which was used to authenticate this call.
1053 1054 1055 1056 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1053 def get_courses(opts = {}) data, _status_code, _headers = get_courses_with_http_info(opts) return data end |
#get_courses_with_http_info(opts = {}) ⇒ Array<(CourseListSchema, Fixnum, Hash)>
Get all courses. Get all courses for the `appId` which was used to authenticate this call.
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1071 def get_courses_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_courses ..." end if opts[:'filter_by'] && !['title', 'course_id', 'tags'].include?(opts[:'filter_by']) fail ArgumentError, 'invalid value for "filter_by", must be one of title, course_id, tags' end if opts[:'order_by'] && !['title_asc', 'title_desc', 'creation_date_asc', 'creation_date_desc'].include?(opts[:'order_by']) fail ArgumentError, 'invalid value for "order_by", must be one of title_asc, title_desc, creation_date_asc, creation_date_desc' end # resource path local_var_path = "/courses".sub('{format}','json') # query parameters query_params = {} query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'filterBy'] = opts[:'filter_by'] if !opts[:'filter_by'].nil? query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil? query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil? query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CourseListSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_courses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_import_job_status(import_job_id, opts = {}) ⇒ ImportJobResultSchema
Get course import job status. Check the status of an import job. This can be called incrementally to check to progress of a call to either of the import options.
1127 1128 1129 1130 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1127 def get_import_job_status(import_job_id, opts = {}) data, _status_code, _headers = get_import_job_status_with_http_info(import_job_id, opts) return data end |
#get_import_job_status_with_http_info(import_job_id, opts = {}) ⇒ Array<(ImportJobResultSchema, Fixnum, Hash)>
Get course import job status. Check the status of an import job. This can be called incrementally to check to progress of a call to either of the import options.
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1137 def get_import_job_status_with_http_info(import_job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.get_import_job_status ..." end # verify the required parameter 'import_job_id' is set fail ArgumentError, "Missing the required parameter 'import_job_id' when calling CourseApi.get_import_job_status" if import_job_id.nil? # resource path local_var_path = "/courses/importJobs/{importJobId}".sub('{format}','json').sub('{' + 'importJobId' + '}', import_job_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ImportJobResultSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#get_import_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_course_tags(course_id, tags, opts = {}) ⇒ nil
Set course tags. Set the tags for this course. Note: any tags currently on this course will be overwritten with the new array of tags.
1181 1182 1183 1184 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1181 def (course_id, , opts = {}) (course_id, , opts) return nil end |
#put_course_tags_batch(batch, opts = {}) ⇒ nil
Set tags on courses. Sets all of the provided tags on all of the provided courses.
1236 1237 1238 1239 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1236 def (batch, opts = {}) (batch, opts) return nil end |
#put_course_tags_batch_with_http_info(batch, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set tags on courses. Sets all of the provided tags on all of the provided courses.
1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1246 def (batch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.put_course_tags_batch ..." end # verify the required parameter 'batch' is set fail ArgumentError, "Missing the required parameter 'batch' when calling CourseApi.put_course_tags_batch" if batch.nil? # resource path local_var_path = "/courses/tags".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(batch) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#put_course_tags_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_course_tags_with_http_info(course_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set course tags. Set the tags for this course. Note: any tags currently on this course will be overwritten with the new array of tags.
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1192 def (course_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.put_course_tags ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.put_course_tags" if course_id.nil? # verify the required parameter 'tags' is set fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.put_course_tags" if .nil? # resource path local_var_path = "/courses/{courseId}/tags".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#put_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_course_configuration(course_id, configuration_settings, opts = {}) ⇒ nil
Set course configuration. Set configuration settings for this course. Setting a value at this level will override any value which is set at the application level.
1289 1290 1291 1292 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1289 def set_course_configuration(course_id, configuration_settings, opts = {}) set_course_configuration_with_http_info(course_id, configuration_settings, opts) return nil end |
#set_course_configuration_with_http_info(course_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set course configuration. Set configuration settings for this course. Setting a value at this level will override any value which is set at the application level.
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1300 def set_course_configuration_with_http_info(course_id, configuration_settings, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.set_course_configuration ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_configuration" if course_id.nil? # verify the required parameter 'configuration_settings' is set fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_configuration" if configuration_settings.nil? # resource path local_var_path = "/courses/{courseId}/configuration".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(configuration_settings) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#set_course_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_course_title(course_id, title, opts = {}) ⇒ nil
Set the title of a course. Sets the course title for the provided courseId.
1345 1346 1347 1348 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1345 def set_course_title(course_id, title, opts = {}) set_course_title_with_http_info(course_id, title, opts) return nil end |
#set_course_title_with_http_info(course_id, title, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set the title of a course. Sets the course title for the provided courseId.
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1356 def set_course_title_with_http_info(course_id, title, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.set_course_title ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_title" if course_id.nil? # verify the required parameter 'title' is set fail ArgumentError, "Missing the required parameter 'title' when calling CourseApi.set_course_title" if title.nil? # resource path local_var_path = "/courses/{courseId}/title".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(title) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#set_course_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_course_version_configuration(course_id, version_id, configuration_settings, opts = {}) ⇒ nil
Set configuration for a version of a course. Set configuration settings for this course and version.
1402 1403 1404 1405 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1402 def set_course_version_configuration(course_id, version_id, configuration_settings, opts = {}) set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts) return nil end |
#set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Set configuration for a version of a course. Set configuration settings for this course and version.
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 |
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1414 def set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CourseApi.set_course_version_configuration ..." end # verify the required parameter 'course_id' is set fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_version_configuration" if course_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.set_course_version_configuration" if version_id.nil? # verify the required parameter 'configuration_settings' is set fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_version_configuration" if configuration_settings.nil? # resource path local_var_path = "/courses/{courseId}/versions/{versionId}/configuration".sub('{format}','json').sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(configuration_settings) auth_names = ['APP_NORMAL', 'OAUTH'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CourseApi#set_course_version_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |