Class: RusticiSoftwareCloudV2::CourseApi

Inherits:
Object
  • Object
show all
Defined in:
lib/rustici_software_cloud_v2/api/course_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CourseApi

Returns a new instance of CourseApi.



19
20
21
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

Get a link to preview a course. Returns the launch link to use to preview this course.

Parameters:

  • course_id
  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :css_url (String)

Returns:



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)
  data
end

Get a link to preview a course. Returns the launch link to use to preview this course.

Parameters:

  • course_id
  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :css_url (String)

Returns:

  • (Array<(LaunchLinkSchema, Fixnum, Hash)>)

    LaunchLinkSchema data, response status code and response headers



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
81
82
83
84
# 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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link"
  end
  # verify the required parameter 'launch_link_request' is set
  if @api_client.config.client_side_validation && launch_link_request.nil?
    fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link"
  end
  # resource path
  local_var_path = '/courses/{courseId}/preview'.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

Get a link to preview a particular course version. Returns the link to use to preview a particular version of a course.

Parameters:

  • course_id
  • version_id

    The course version

  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



92
93
94
95
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 92

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)
  data
end

Get a link to preview a particular course version. Returns the link to use to preview a particular version of a course.

Parameters:

  • course_id
  • version_id

    The course version

  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LaunchLinkSchema, Fixnum, Hash)>)

    LaunchLinkSchema data, response status code and response headers



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
142
143
144
145
146
147
148
149
150
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 104

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link_with_version"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.build_course_preview_launch_link_with_version"
  end
  # verify the required parameter 'launch_link_request' is set
  if @api_client.config.client_side_validation && launch_link_request.nil?
    fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link_with_version"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/preview'.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.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • import_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist. (default to false)

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

Returns:



159
160
161
162
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 159

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)
  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.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • import_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist.

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



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
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 172

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_fetch_and_import_course_job"
  end
  # verify the required parameter 'import_request' is set
  if @api_client.config.client_side_validation && import_request.nil?
    fail ArgumentError, "Missing the required parameter 'import_request' when calling CourseApi.create_fetch_and_import_course_job"
  end
  # resource path
  local_var_path = '/courses/importJobs'

  # 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.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist. (default to false)

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

  • :file (File)

    The zip file of the course contents to import.

Returns:



226
227
228
229
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 226

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)
  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.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist.

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

  • :file (File)

    The zip file of the course contents to import.

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



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
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 239

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_upload_and_import_course_job"
  end
  # resource path
  local_var_path = '/courses/importJobs/upload'

  # 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

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


287
288
289
290
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 287

def delete_course(course_id, opts = {})
  delete_course_with_http_info(course_id, opts)
  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.

Parameters:

  • course_id
  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


341
342
343
344
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 341

def delete_course_configuration_setting(course_id, setting_id, opts = {})
  delete_course_configuration_setting_with_http_info(course_id, setting_id, opts)
  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 &#x60;settingId&#x60; 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.

Parameters:

  • course_id
  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 352

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_configuration_setting"
  end
  # verify the required parameter 'setting_id' is set
  if @api_client.config.client_side_validation && setting_id.nil?
    fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_configuration_setting"
  end
  # resource path
  local_var_path = '/courses/{courseId}/configuration/{settingId}'.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.

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


400
401
402
403
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 400

def delete_course_tags(course_id, tags, opts = {})
  delete_course_tags_with_http_info(course_id, tags, opts)
  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.

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 411

def delete_course_tags_with_http_info(course_id, tags, 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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_tags"
  end
  # verify the required parameter 'tags' is set
  if @api_client.config.client_side_validation && tags.nil?
    fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.delete_course_tags"
  end
  # resource path
  local_var_path = '/courses/{courseId}/tags'.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(tags)
  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.

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


459
460
461
462
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 459

def delete_course_version(course_id, version_id, opts = {})
  delete_course_version_with_http_info(course_id, version_id, opts)
  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.

Parameters:

  • course_id
  • version_id

    The course version

  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


519
520
521
522
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 519

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)
  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 &#x60;settingId&#x60; value for this course and version.

Parameters:

  • course_id
  • version_id

    The course version

  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 531

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version_configuration_setting"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version_configuration_setting"
  end
  # verify the required parameter 'setting_id' is set
  if @api_client.config.client_side_validation && setting_id.nil?
    fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_version_configuration_setting"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/configuration/{settingId}'.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 &#x60;versionId&#x60; of &#x60;courseId&#x60;. If this is the last remaining version of this course, the course itself will be deleted and no longer accessible.

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 470

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}'.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 &#x60;courseId&#x60;. When a course is deleted, so is everything connected to this course. This includes: - Registrations - Invitations - Dispatches - Debug Logs

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 297

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course"
  end
  # resource path
  local_var_path = '/courses/{courseId}'.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.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

Returns:



584
585
586
587
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 584

def get_course(course_id, opts = {})
  data, _status_code, _headers = get_course_with_http_info(course_id, opts)
  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.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN) — default: default to false

Returns:



643
644
645
646
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 643

def get_course_configuration(course_id, opts = {})
  data, _status_code, _headers = get_course_configuration_with_http_info(course_id, opts)
  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.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN)

Returns:

  • (Array<(SettingListSchema, Fixnum, Hash)>)

    SettingListSchema data, response status code and response headers



654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 654

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/configuration'.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`.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:



703
704
705
706
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 703

def get_course_statements(course_id, opts = {})
  data, _status_code, _headers = get_course_statements_with_http_info(course_id, opts)
  data
end

#get_course_statements_with_http_info(course_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>

Get course xAPI statements. Get xAPI statements for &#x60;courseId&#x60;.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:

  • (Array<(XapiStatementResult, Fixnum, Hash)>)

    XapiStatementResult data, response status code and response headers



717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 717

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_statements"
  end
  # resource path
  local_var_path = '/courses/{courseId}/xAPIStatements'.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.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



765
766
767
768
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 765

def get_course_tags(course_id, opts = {})
  data, _status_code, _headers = get_course_tags_with_http_info(course_id, opts)
  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.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TagListSchema, Fixnum, Hash)>)

    TagListSchema data, response status code and response headers



775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 775

def get_course_tags_with_http_info(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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_tags"
  end
  # resource path
  local_var_path = '/courses/{courseId}/tags'.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.

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN) — default: default to false

Returns:



821
822
823
824
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 821

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)
  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.

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN)

Returns:

  • (Array<(SettingListSchema, Fixnum, Hash)>)

    SettingListSchema data, response status code and response headers



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 833

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_configuration"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/configuration'.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`

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

Returns:



885
886
887
888
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 885

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)
  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 &#x60;versionId&#x60; of &#x60;courseId&#x60;

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

Returns:

  • (Array<(CourseSchema, Fixnum, Hash)>)

    CourseSchema data, response status code and response headers



898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 898

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_info"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_info"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}'.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`

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:



953
954
955
956
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 953

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)
  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 &#x60;versionId&#x60; of &#x60;courseId&#x60;

Parameters:

  • course_id
  • version_id

    The course version

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:

  • (Array<(XapiStatementResult, Fixnum, Hash)>)

    XapiStatementResult data, response status code and response headers



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 968

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_statements"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_statements"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/xAPIStatements'.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.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

Returns:



1024
1025
1026
1027
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1024

def get_course_versions(course_id, opts = {})
  data, _status_code, _headers = get_course_versions_with_http_info(course_id, opts)
  data
end

#get_course_versions_with_http_info(course_id, opts = {}) ⇒ Array<(CourseListNonPagedSchema, Fixnum, Hash)>

Get details on a course&#39;s versions. Get information about all versions of &#x60;courseId&#x60;. This can be useful to see information such as registration counts and modification times across the versions of a course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

Returns:

  • (Array<(CourseListNonPagedSchema, Fixnum, Hash)>)

    CourseListNonPagedSchema data, response status code and response headers



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1038

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_versions"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions'.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 &#x60;courseId&#x60;. Futher detail can be obtained with the optional query parameters flags.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

Returns:

  • (Array<(CourseSchema, Fixnum, Hash)>)

    CourseSchema data, response status code and response headers



596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 596

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course"
  end
  # resource path
  local_var_path = '/courses/{courseId}'.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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :filter (String)

    Optional string which filters results by a specified field (described by filterBy).

  • :filter_by (String)

    Optional enum parameter for specifying the field on which to run the filter. Defaults to course_id.

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results. Defaults to creation_date_desc.

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

  • :tags (Array<String>)

Returns:



1094
1095
1096
1097
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1094

def get_courses(opts = {})
  data, _status_code, _headers = get_courses_with_http_info(opts)
  data
end

#get_courses_with_http_info(opts = {}) ⇒ Array<(CourseListSchema, Fixnum, Hash)>

Get all courses. Get all courses for the &#x60;appId&#x60; which was used to authenticate this call.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :filter (String)

    Optional string which filters results by a specified field (described by filterBy).

  • :filter_by (String)

    Optional enum parameter for specifying the field on which to run the filter. Defaults to course_id.

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results. Defaults to creation_date_desc.

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

  • :tags (Array<String>)

Returns:

  • (Array<(CourseListSchema, Fixnum, Hash)>)

    CourseListSchema data, response status code and response headers



1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1112

def get_courses_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_courses ...'
  end
  if @api_client.config.client_side_validation && 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 @api_client.config.client_side_validation && 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'

  # 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.

Parameters:

  • import_job_id

    Id received when the import job was submitted to the importJobs resource.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1167
1168
1169
1170
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1167

def get_import_job_status(import_job_id, opts = {})
  data, _status_code, _headers = get_import_job_status_with_http_info(import_job_id, opts)
  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.

Parameters:

  • import_job_id

    Id received when the import job was submitted to the importJobs resource.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ImportJobResultSchema, Fixnum, Hash)>)

    ImportJobResultSchema data, response status code and response headers



1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1177

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
  if @api_client.config.client_side_validation && import_job_id.nil?
    fail ArgumentError, "Missing the required parameter 'import_job_id' when calling CourseApi.get_import_job_status"
  end
  # resource path
  local_var_path = '/courses/importJobs/{importJobId}'.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.

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1222
1223
1224
1225
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1222

def put_course_tags(course_id, tags, opts = {})
  put_course_tags_with_http_info(course_id, tags, opts)
  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.

Parameters:

  • batch

    Object representing an array of ids to apply an array of tags to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1280
1281
1282
1283
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1280

def put_course_tags_batch(batch, opts = {})
  put_course_tags_batch_with_http_info(batch, opts)
  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.

Parameters:

  • batch

    Object representing an array of ids to apply an array of tags to.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1290

def put_course_tags_batch_with_http_info(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
  if @api_client.config.client_side_validation && batch.nil?
    fail ArgumentError, "Missing the required parameter 'batch' when calling CourseApi.put_course_tags_batch"
  end
  # resource path
  local_var_path = '/courses/tags'

  # 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.

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1233

def put_course_tags_with_http_info(course_id, tags, 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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.put_course_tags"
  end
  # verify the required parameter 'tags' is set
  if @api_client.config.client_side_validation && tags.nil?
    fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.put_course_tags"
  end
  # resource path
  local_var_path = '/courses/{courseId}/tags'.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(tags)
  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.

Parameters:

  • course_id
  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1334
1335
1336
1337
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1334

def set_course_configuration(course_id, configuration_settings, opts = {})
  set_course_configuration_with_http_info(course_id, configuration_settings, opts)
  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.

Parameters:

  • course_id
  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1345

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_configuration"
  end
  # verify the required parameter 'configuration_settings' is set
  if @api_client.config.client_side_validation && configuration_settings.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/configuration'.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.

Parameters:

  • course_id
  • title
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1393
1394
1395
1396
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1393

def set_course_title(course_id, title, opts = {})
  set_course_title_with_http_info(course_id, title, opts)
  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.

Parameters:

  • course_id
  • title
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1404

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_title"
  end
  # verify the required parameter 'title' is set
  if @api_client.config.client_side_validation && title.nil?
    fail ArgumentError, "Missing the required parameter 'title' when calling CourseApi.set_course_title"
  end
  # resource path
  local_var_path = '/courses/{courseId}/title'.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.

Parameters:

  • course_id
  • version_id

    The course version

  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1453
1454
1455
1456
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1453

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)
  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.

Parameters:

  • course_id
  • version_id

    The course version

  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1465

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
  if @api_client.config.client_side_validation && course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_version_configuration"
  end
  # verify the required parameter 'version_id' is set
  if @api_client.config.client_side_validation && version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.set_course_version_configuration"
  end
  # verify the required parameter 'configuration_settings' is set
  if @api_client.config.client_side_validation && configuration_settings.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_version_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/configuration'.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