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 launch link to preview a Course Returns the launch link to use to preview the course. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. >Note: >The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 28

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 launch link to preview a Course Returns the launch link to use to preview the course. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. >Note: >The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

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

    the optional parameters

Returns:

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

    LaunchLinkSchema data, response status code and response headers



39
40
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 39

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 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 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 = {}

  # 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 launch link to preview a Course Version Returns the launch link to use to preview the course version. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. >Note: >The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

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

    the optional parameters

Returns:



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

Get a launch link to preview a Course Version Returns the launch link to use to preview the course version. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. &gt;Note: &gt;The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

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

    the optional parameters

Returns:

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

    LaunchLinkSchema data, response status code and response headers



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
142
143
144
145
146
147
# 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
  if 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 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 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

Create a Course from a package fetched from an external source Creates a course from a package fetched and imported from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

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:



156
157
158
159
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 156

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

Create a Course from a package fetched from an external source Creates a course from a package fetched and imported from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

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



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

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 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 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_no_upload_and_import_course_job(course_id, import_request, opts = {}) ⇒ StringResultSchema

Create a Course from a fetched or referenced external media file Creates a course from one of two methods, fetchRequest or mediaFileReferenceRequest. In either case, an import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. - A fetchRequest performs the same actions as CreateFetchAndImportCourseJob. A course will be created from a package fetched from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. - A mediaFileReferenceRequest will not store the file in SCORM Cloud. Instead it will reference the media file at the time the learner needs to view the file from the provided url. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes. >Info: >Unless working with media files, it is typical to use one of the other two import methods. >- CreateUploadAndImportCourseJob would be used if the course is in your local file system. >- CreateFetchAndImportCourseJob would be better suited for situations where the course is uploaded remotely but is accessible via a public url.

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:



223
224
225
226
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 223

def create_no_upload_and_import_course_job(course_id, import_request, opts = {})
  data, _status_code, _headers = create_no_upload_and_import_course_job_with_http_info(course_id, import_request, opts)
  data
end

#create_no_upload_and_import_course_job_with_http_info(course_id, import_request, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Create a Course from a fetched or referenced external media file Creates a course from one of two methods, fetchRequest or mediaFileReferenceRequest. In either case, an import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. - A fetchRequest performs the same actions as CreateFetchAndImportCourseJob. A course will be created from a package fetched from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. - A mediaFileReferenceRequest will not store the file in SCORM Cloud. Instead it will reference the media file at the time the learner needs to view the file from the provided url. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes. &gt;Info: &gt;Unless working with media files, it is typical to use one of the other two import methods. &gt;- CreateUploadAndImportCourseJob would be used if the course is in your local file system. &gt;- CreateFetchAndImportCourseJob would be better suited for situations where the course is uploaded remotely but is accessible via a public url.

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



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

def create_no_upload_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_no_upload_and_import_course_job ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_no_upload_and_import_course_job"
  end
  # verify the required parameter 'import_request' is set
  if import_request.nil?
    fail ArgumentError, "Missing the required parameter 'import_request' when calling CourseApi.create_no_upload_and_import_course_job"
  end
  # resource path
  local_var_path = '/courses/importJobs/noUpload'

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

Create a Course from an uploaded package Creates a course from a package uploaded from your file system. The package will be sent as part of the request and will be stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

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.

  • :uploaded_content_type (String)

    The MIME type identifier for the content to be uploaded. This is required if uploading a media file (.pdf, .mp3, or .mp4). (default to application/zip)

  • :content_metadata (String)

    Serialized &#39;mediaFileMetadata&#39; schema.

  • :file (File)

    The zip file of the course contents to import.

Returns:



292
293
294
295
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 292

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

Create a Course from an uploaded package Creates a course from a package uploaded from your file system. The package will be sent as part of the request and will be stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

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.

  • :uploaded_content_type (String)

    The MIME type identifier for the content to be uploaded. This is required if uploading a media file (.pdf, .mp3, or .mp4).

  • :content_metadata (String)

    Serialized &#39;mediaFileMetadata&#39; schema.

  • :file (File)

    The zip file of the course contents to import.

Returns:

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

    StringResultSchema data, response status code and response headers



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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 307

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 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'])
  header_params[:'uploadedContentType'] = opts[:'uploaded_content_type'] if !opts[:'uploaded_content_type'].nil?

  # form parameters
  form_params = {}
  form_params['contentMetadata'] = opts[:'content_metadata'] if !opts[:'content_metadata'].nil?
  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 Deletes the specified course. >Caution: >When a course is deleted, so is everything connected to the course. This includes: >- Registrations >- Invitations >- Dispatches >- Debug Logs

Parameters:

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

    the optional parameters

Returns:

  • (nil)


357
358
359
360
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 357

def delete_course(course_id, opts = {})
  delete_course_with_http_info(course_id, opts)
  nil
end

#delete_course_asset(course_id, relative_path, opts = {}) ⇒ nil

Delete an asset file from a Course Deletes the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file. >Caution: >This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseAssetFile or UploadCourseAssetFile endpoints.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

  • (nil)


411
412
413
414
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 411

def delete_course_asset(course_id, relative_path, opts = {})
  delete_course_asset_with_http_info(course_id, relative_path, opts)
  nil
end

#delete_course_asset_with_http_info(course_id, relative_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an asset file from a Course Deletes the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file. &gt;Caution: &gt;This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseAssetFile or UploadCourseAssetFile endpoints.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 422

def delete_course_asset_with_http_info(course_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.delete_course_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # 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_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_configuration_setting(course_id, setting_id, opts = {}) ⇒ nil

Delete a configuration setting explicitly set for a Course Clears the specified setting from the course. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


471
472
473
474
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 471

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

Delete a configuration setting explicitly set for a Course Clears the specified setting from the course. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 482

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 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 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 tags from a Course Deletes the specified tags from the course. Deleting tags that do not exist will still result in a success.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


530
531
532
533
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 530

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 tags from a Course Deletes the specified tags from the course. Deleting tags that do not exist will still result in a success.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
577
578
579
580
581
582
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 541

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 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 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 Deletes the specified version of the course. If deleting the last remaining version of the course, the course itself will be deleted and no longer accessible. >Caution: >When a course is deleted, so is everything connected to this course. This includes: >- Registrations >- Invitations >- Dispatches >- Debug Logs

Parameters:

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

    the optional parameters

Returns:

  • (nil)


589
590
591
592
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 589

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_asset(course_id, version_id, relative_path, opts = {}) ⇒ nil

Delete an asset file from a Course Version Deletes the asset file at the specified relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file. >Caution: >This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseVersionAssetFile or UploadCourseVersionAssetFile endpoints.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

  • (nil)


649
650
651
652
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 649

def delete_course_version_asset(course_id, version_id, relative_path, opts = {})
  delete_course_version_asset_with_http_info(course_id, version_id, relative_path, opts)
  nil
end

#delete_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an asset file from a Course Version Deletes the asset file at the specified relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file. &gt;Caution: &gt;This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseVersionAssetFile or UploadCourseVersionAssetFile endpoints.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
694
695
696
697
698
699
700
701
702
703
704
705
706
707
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 661

def delete_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_version_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version_asset"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.delete_course_version_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # 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_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {}) ⇒ nil

Delete a configuration setting explicitly set for a Course Version Clears the specified setting from the course version. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


715
716
717
718
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 715

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

Delete a configuration setting explicitly set for a Course Version Clears the specified setting from the course version. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
760
761
762
763
764
765
766
767
768
769
770
771
772
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 727

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 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 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 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 Deletes the specified version of the course. If deleting the last remaining version of the course, the course itself will be deleted and no longer accessible. &gt;Caution: &gt;When a course is deleted, so is everything connected to this course. This includes: &gt;- Registrations &gt;- Invitations &gt;- Dispatches &gt;- Debug Logs

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
637
638
639
640
641
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 600

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 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 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 Deletes the specified course. &gt;Caution: &gt;When a course is deleted, so is everything connected to the course. This includes: &gt;- Registrations &gt;- Invitations &gt;- Dispatches &gt;- Debug Logs

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 367

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 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 detailed information about a Course Returns detailed information about the course. This includes title, update date, learning standard, and version.

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:



780
781
782
783
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 780

def get_course(course_id, opts = {})
  data, _status_code, _headers = get_course_with_http_info(course_id, opts)
  data
end

#get_course_asset(course_id, relative_path, opts = {}) ⇒ File

Download an asset file from a Course Downloads the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

  • (File)


839
840
841
842
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 839

def get_course_asset(course_id, relative_path, opts = {})
  data, _status_code, _headers = get_course_asset_with_http_info(course_id, relative_path, opts)
  data
end

#get_course_asset_with_http_info(course_id, relative_path, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download an asset file from a Course Downloads the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

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

    File data, response status code and response headers



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
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 850

def get_course_asset_with_http_info(course_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.get_course_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # 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 => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_configuration(course_id, opts = {}) ⇒ SettingListSchema

Get effective configuration settings for a Course Returns the effective configuration settings for the course. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

Returns:



900
901
902
903
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 900

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 effective configuration settings for a Course Returns the effective configuration settings for the course. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

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



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
943
944
945
946
947
948
949
950
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 911

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 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_file_list(course_id, opts = {}) ⇒ FileListSchema

Get a list of asset files in a Course Returns a list of asset files in the course. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

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

    the optional parameters

Returns:



956
957
958
959
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 956

def get_course_file_list(course_id, opts = {})
  data, _status_code, _headers = get_course_file_list_with_http_info(course_id, opts)
  data
end

#get_course_file_list_with_http_info(course_id, opts = {}) ⇒ Array<(FileListSchema, Fixnum, Hash)>

Get a list of asset files in a Course Returns a list of asset files in the course. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

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

    the optional parameters

Returns:

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

    FileListSchema data, response status code and response headers



966
967
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 966

def get_course_file_list_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_file_list ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_file_list"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset/list'.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 => 'FileListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_file_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_statements(course_id, opts = {}) ⇒ XapiStatementResult

Get xAPI statements for a Course Returns xAPI statements for the course.

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)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:



1014
1015
1016
1017
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1014

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 xAPI statements for a Course Returns xAPI statements for the course.

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)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:

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

    XapiStatementResult data, response status code and response headers



1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1028

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 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 tags for a Course Returns the tags for the course.

Parameters:

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

    the optional parameters

Returns:



1076
1077
1078
1079
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1076

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 tags for a Course Returns the tags for the course.

Parameters:

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

    the optional parameters

Returns:

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

    TagListSchema data, response status code and response headers



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
1121
1122
1123
1124
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1086

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 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_asset(course_id, version_id, relative_path, opts = {}) ⇒ File

Download an asset file from a specific Course Version Downloads the asset file at the provided relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

  • (File)


1132
1133
1134
1135
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1132

def get_course_version_asset(course_id, version_id, relative_path, opts = {})
  data, _status_code, _headers = get_course_version_asset_with_http_info(course_id, version_id, relative_path, opts)
  data
end

#get_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download an asset file from a specific Course Version Downloads the asset file at the provided relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

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

    the optional parameters

Returns:

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

    File data, response status code and response headers



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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1144

def get_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_asset"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.get_course_version_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # 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 => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_asset\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 effective configuration settings for a Course Version Returns the effective configuration settings for the course version. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

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

    the optional parameters

Options Hash (opts):

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

Returns:



1199
1200
1201
1202
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1199

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 effective configuration settings for a Course Version Returns the effective configuration settings for the course version. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

  • course_id
  • version_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



1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1211

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 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 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_file_list(course_id, version_id, opts = {}) ⇒ FileListSchema

Get a list of asset files in a Course Version Returns a list of asset files in the course version. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

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

    the optional parameters

Returns:



1261
1262
1263
1264
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1261

def get_course_version_file_list(course_id, version_id, opts = {})
  data, _status_code, _headers = get_course_version_file_list_with_http_info(course_id, version_id, opts)
  data
end

#get_course_version_file_list_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(FileListSchema, Fixnum, Hash)>

Get a list of asset files in a Course Version Returns a list of asset files in the course version. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

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

    the optional parameters

Returns:

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

    FileListSchema data, response status code and response headers



1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1272

def get_course_version_file_list_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_file_list ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_file_list"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_file_list"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset/list'.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(: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 => 'FileListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_file_list\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 detailed information about a Course Version Returns detailed information about the course version. This includes update date and registration count (if optional value is passed in).

Parameters:

  • course_id
  • version_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:



1323
1324
1325
1326
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1323

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 detailed information about a Course Version Returns detailed information about the course version. This includes update date and registration count (if optional value is passed in).

Parameters:

  • course_id
  • version_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



1336
1337
1338
1339
1340
1341
1342
1343
1344
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1336

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 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 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 Returns xAPI statements for the course version.

Parameters:

  • course_id
  • version_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)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:



1391
1392
1393
1394
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1391

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 Returns xAPI statements for the course version.

Parameters:

  • course_id
  • version_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)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:

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

    XapiStatementResult data, response status code and response headers



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
1446
1447
1448
1449
1450
1451
1452
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1406

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 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 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 a list of a Course’s Versions Returns information about all versions of the course. 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)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :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:



1462
1463
1464
1465
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1462

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 a list of a Course&#39;s Versions Returns information about all versions of the course. 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)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :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



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
1511
1512
1513
1514
1515
1516
1517
1518
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1476

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 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 detailed information about a Course Returns detailed information about the course. This includes title, update date, learning standard, and version.

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



792
793
794
795
796
797
798
799
800
801
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
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 792

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 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 a list of Courses Returns a list of courses. Can be filtered using the request parameters to provide a subset of results. >Note: >This request is paginated and will only provide a limited amount of resources at a time. If there are more results to be collected, a ‘more` token provided with the response which can be passed to get the next page of results. When passing this token, no other filter parameters can be sent as part of the request. The resources will continue to respect the filters passed in by the original request.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :datetime_filter (String)

    Specifies field that &#x60;since&#x60; and &#x60;until&#x60; parameters are applied against (default to updated)

  • :tags (Array<String>)

    Filter items matching any tag provided (not all)

  • :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. (default to course_id)

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results. (default to created_desc)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

  • :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)

  • :include_registration_count (BOOLEAN)

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

Returns:



1533
1534
1535
1536
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1533

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 a list of Courses Returns a list of courses. Can be filtered using the request parameters to provide a subset of results. &gt;Note: &gt;This request is paginated and will only provide a limited amount of resources at a time. If there are more results to be collected, a &#x60;more&#x60; token provided with the response which can be passed to get the next page of results. When passing this token, no other filter parameters can be sent as part of the request. The resources will continue to respect the filters passed in by the original request.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :datetime_filter (String)

    Specifies field that &#x60;since&#x60; and &#x60;until&#x60; parameters are applied against

  • :tags (Array<String>)

    Filter items matching any tag provided (not all)

  • :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.

  • :order_by (String)

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

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

  • :include_course_metadata (BOOLEAN)

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

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

Returns:

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

    CourseListSchema data, response status code and response headers



1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1552

def get_courses_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_courses ...'
  end
  # resource path
  local_var_path = '/courses'

  # query parameters
  query_params = {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'datetimeFilter'] = opts[:'datetime_filter'] if !opts[:'datetime_filter'].nil?
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].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[:'more'] = opts[:'more'] if !opts[:'more'].nil?
  query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?
  query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].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 import job status for a Course Check the status of a course import. This can be called incrementally to check the progress of a call to any of the import options. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • import_job_id

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

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

    the optional parameters

Returns:



1602
1603
1604
1605
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1602

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 import job status for a Course Check the status of a course import. This can be called incrementally to check the progress of a call to any of the import options. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

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



1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1612

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

#import_course_asset_file(course_id, asset_schema, opts = {}) ⇒ AssetFileSchema

Import an asset file for a Course Creates or updates an asset file fetched from the provided url into the course. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



1658
1659
1660
1661
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1658

def import_course_asset_file(course_id, asset_schema, opts = {})
  data, _status_code, _headers = import_course_asset_file_with_http_info(course_id, asset_schema, opts)
  data
end

#import_course_asset_file_with_http_info(course_id, asset_schema, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Import an asset file for a Course Creates or updates an asset file fetched from the provided url into the course. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

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

    AssetFileSchema data, response status code and response headers



1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1670

def import_course_asset_file_with_http_info(course_id, asset_schema, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.import_course_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.import_course_asset_file"
  end
  # verify the required parameter 'asset_schema' is set
  if asset_schema.nil?
    fail ArgumentError, "Missing the required parameter 'asset_schema' when calling CourseApi.import_course_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].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(asset_schema)
  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 => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#import_course_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_course_version_asset_file(course_id, version_id, asset_schema, opts = {}) ⇒ AssetFileSchema

Import an asset file for a Course Version Creates or updates an asset file fetched from the provided url into the course version. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



1722
1723
1724
1725
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1722

def import_course_version_asset_file(course_id, version_id, asset_schema, opts = {})
  data, _status_code, _headers = import_course_version_asset_file_with_http_info(course_id, version_id, asset_schema, opts)
  data
end

#import_course_version_asset_file_with_http_info(course_id, version_id, asset_schema, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Import an asset file for a Course Version Creates or updates an asset file fetched from the provided url into the course version. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

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

    AssetFileSchema data, response status code and response headers



1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1735

def import_course_version_asset_file_with_http_info(course_id, version_id, asset_schema, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.import_course_version_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.import_course_version_asset_file"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.import_course_version_asset_file"
  end
  # verify the required parameter 'asset_schema' is set
  if asset_schema.nil?
    fail ArgumentError, "Missing the required parameter 'asset_schema' when calling CourseApi.import_course_version_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].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(asset_schema)
  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 => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#import_course_version_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_course_tags(course_id, tags, opts = {}) ⇒ nil

Add tags to a Course Applies the provided tags to the course. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1789
1790
1791
1792
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1789

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

Add a group of tags to a group of Courses Applies all of the provided tags on all of the provided courses. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

  • batch

    Array of ids, and array of tags for bulk tag operations

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

    the optional parameters

Returns:

  • (nil)


1847
1848
1849
1850
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1847

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

Add a group of tags to a group of Courses Applies all of the provided tags on all of the provided courses. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

  • batch

    Array of ids, and array of tags for bulk tag operations

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1857

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

Add tags to a Course Applies the provided tags to the course. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1800

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

Update configuration settings for a Course Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1901
1902
1903
1904
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1901

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

Update configuration settings for a Course Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1912

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

Update title for a Course Updates the title of the course.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1960
1961
1962
1963
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1960

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

Update title for a Course Updates the title of the course.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1971

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

Update configuration settings for a Course Version Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


2020
2021
2022
2023
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2020

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

Update configuration settings for a Course Version Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2032

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

#upload_course_asset_file(course_id, destination, opts = {}) ⇒ AssetFileSchema

Upload an asset file for a Course Creates or updates an asset file uploaded from your file system into the course. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

  • course_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



2086
2087
2088
2089
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2086

def upload_course_asset_file(course_id, destination, opts = {})
  data, _status_code, _headers = upload_course_asset_file_with_http_info(course_id, destination, opts)
  data
end

#upload_course_asset_file_with_http_info(course_id, destination, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Upload an asset file for a Course Creates or updates an asset file uploaded from your file system into the course. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

  • course_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

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

    AssetFileSchema data, response status code and response headers



2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2099

def upload_course_asset_file_with_http_info(course_id, destination, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.upload_course_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.upload_course_asset_file"
  end
  # verify the required parameter 'destination' is set
  if destination.nil?
    fail ArgumentError, "Missing the required parameter 'destination' when calling CourseApi.upload_course_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset/upload'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].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['destination'] = destination
  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 => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#upload_course_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_course_version_asset_file(course_id, version_id, destination, opts = {}) ⇒ AssetFileSchema

Upload an asset file for Course Version Creates or updates an asset file uploaded from your file system into the course version. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

  • course_id
  • version_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



2154
2155
2156
2157
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2154

def upload_course_version_asset_file(course_id, version_id, destination, opts = {})
  data, _status_code, _headers = upload_course_version_asset_file_with_http_info(course_id, version_id, destination, opts)
  data
end

#upload_course_version_asset_file_with_http_info(course_id, version_id, destination, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Upload an asset file for Course Version Creates or updates an asset file uploaded from your file system into the course version. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

  • course_id
  • version_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

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

    AssetFileSchema data, response status code and response headers



2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2168

def upload_course_version_asset_file_with_http_info(course_id, version_id, destination, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.upload_course_version_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.upload_course_version_asset_file"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.upload_course_version_asset_file"
  end
  # verify the required parameter 'destination' is set
  if destination.nil?
    fail ArgumentError, "Missing the required parameter 'destination' when calling CourseApi.upload_course_version_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset/upload'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].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['destination'] = destination
  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 => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#upload_course_version_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end