rustici_software_cloud_v2 1.0.0beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. data/Gemfile +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +283 -0
  4. data/Rakefile +8 -0
  5. data/docs/ActivityResultSchema.md +20 -0
  6. data/docs/ApplicationListSchema.md +8 -0
  7. data/docs/ApplicationManagementApi.md +570 -0
  8. data/docs/ApplicationSchema.md +9 -0
  9. data/docs/ApplicationToken.md +10 -0
  10. data/docs/AuthenticationApi.md +64 -0
  11. data/docs/CommentSchema.md +10 -0
  12. data/docs/CompletionAmountSchema.md +8 -0
  13. data/docs/CourseActivitySchema.md +15 -0
  14. data/docs/CourseApi.md +1459 -0
  15. data/docs/CourseListNonPagedSchema.md +8 -0
  16. data/docs/CourseListSchema.md +9 -0
  17. data/docs/CourseReferenceSchema.md +10 -0
  18. data/docs/CourseSchema.md +20 -0
  19. data/docs/CourseTagsBatchSchema.md +9 -0
  20. data/docs/CreateRegistrationSchema.md +17 -0
  21. data/docs/CredentialCreatedSchema.md +12 -0
  22. data/docs/CredentialListSchema.md +8 -0
  23. data/docs/CredentialRequestSchema.md +9 -0
  24. data/docs/CredentialSchema.md +12 -0
  25. data/docs/ImportFetchRequestSchema.md +8 -0
  26. data/docs/ImportJobResultSchema.md +11 -0
  27. data/docs/ImportResultSchema.md +11 -0
  28. data/docs/IntegerResultSchema.md +8 -0
  29. data/docs/ItemValuePairSchema.md +9 -0
  30. data/docs/LaunchHistoryListSchema.md +8 -0
  31. data/docs/LaunchHistorySchema.md +17 -0
  32. data/docs/LaunchLinkRequestSchema.md +17 -0
  33. data/docs/LaunchLinkSchema.md +8 -0
  34. data/docs/LearnerPreferenceSchema.md +11 -0
  35. data/docs/LearnerSchema.md +11 -0
  36. data/docs/LinkSchema.md +8 -0
  37. data/docs/MessageSchema.md +8 -0
  38. data/docs/MetadataSchema.md +14 -0
  39. data/docs/ObjectiveSchema.md +20 -0
  40. data/docs/PermissionsSchema.md +9 -0
  41. data/docs/PingApi.md +57 -0
  42. data/docs/PingSchema.md +8 -0
  43. data/docs/PostBackSchema.md +12 -0
  44. data/docs/RegistrationApi.md +1490 -0
  45. data/docs/RegistrationCompletion.md +7 -0
  46. data/docs/RegistrationListSchema.md +9 -0
  47. data/docs/RegistrationSchema.md +27 -0
  48. data/docs/RegistrationSuccess.md +7 -0
  49. data/docs/RegistrationTagsBatchSchema.md +9 -0
  50. data/docs/ResponseError.md +8 -0
  51. data/docs/RuntimeInteractionSchema.md +18 -0
  52. data/docs/RuntimeObjectiveSchema.md +16 -0
  53. data/docs/RuntimeSchema.md +27 -0
  54. data/docs/ScoreSchema.md +8 -0
  55. data/docs/SettingItem.md +12 -0
  56. data/docs/SettingListSchema.md +8 -0
  57. data/docs/SettingMetadata.md +15 -0
  58. data/docs/SettingMetadataValidValues.md +9 -0
  59. data/docs/SettingValidValue.md +9 -0
  60. data/docs/SettingsIndividualSchema.md +10 -0
  61. data/docs/SettingsPostSchema.md +8 -0
  62. data/docs/SharedDataEntrySchema.md +9 -0
  63. data/docs/StaticPropertiesSchema.md +13 -0
  64. data/docs/StringResultSchema.md +8 -0
  65. data/docs/TagListSchema.md +8 -0
  66. data/docs/TagPostSchema.md +7 -0
  67. data/docs/TitleSchema.md +8 -0
  68. data/docs/TokenRequestSchema.md +9 -0
  69. data/docs/XapiAccount.md +9 -0
  70. data/docs/XapiActivity.md +10 -0
  71. data/docs/XapiActivityDefinition.md +19 -0
  72. data/docs/XapiAgentGroup.md +14 -0
  73. data/docs/XapiAttachment.md +14 -0
  74. data/docs/XapiContext.md +16 -0
  75. data/docs/XapiContextActivity.md +11 -0
  76. data/docs/XapiInteractionComponent.md +9 -0
  77. data/docs/XapiResult.md +13 -0
  78. data/docs/XapiScore.md +11 -0
  79. data/docs/XapiStatement.md +20 -0
  80. data/docs/XapiStatementReference.md +9 -0
  81. data/docs/XapiStatementResult.md +9 -0
  82. data/docs/XapiVerb.md +9 -0
  83. data/git_push.sh +55 -0
  84. data/lib/rustici_software_cloud_v2.rb +116 -0
  85. data/lib/rustici_software_cloud_v2/api/application_management_api.rb +574 -0
  86. data/lib/rustici_software_cloud_v2/api/authentication_api.rb +87 -0
  87. data/lib/rustici_software_cloud_v2/api/course_api.rb +1469 -0
  88. data/lib/rustici_software_cloud_v2/api/ping_api.rb +69 -0
  89. data/lib/rustici_software_cloud_v2/api/registration_api.rb +1499 -0
  90. data/lib/rustici_software_cloud_v2/api_client.rb +389 -0
  91. data/lib/rustici_software_cloud_v2/api_error.rb +38 -0
  92. data/lib/rustici_software_cloud_v2/configuration.rb +237 -0
  93. data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +341 -0
  94. data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +185 -0
  95. data/lib/rustici_software_cloud_v2/models/application_schema.rb +194 -0
  96. data/lib/rustici_software_cloud_v2/models/application_token.rb +201 -0
  97. data/lib/rustici_software_cloud_v2/models/comment_schema.rb +201 -0
  98. data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +184 -0
  99. data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +289 -0
  100. data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +185 -0
  101. data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +194 -0
  102. data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +202 -0
  103. data/lib/rustici_software_cloud_v2/models/course_schema.rb +328 -0
  104. data/lib/rustici_software_cloud_v2/models/course_tags_batch_schema.rb +204 -0
  105. data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +287 -0
  106. data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +223 -0
  107. data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +185 -0
  108. data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +194 -0
  109. data/lib/rustici_software_cloud_v2/models/credential_schema.rb +223 -0
  110. data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +190 -0
  111. data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +244 -0
  112. data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +215 -0
  113. data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +188 -0
  114. data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +192 -0
  115. data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +185 -0
  116. data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +317 -0
  117. data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +282 -0
  118. data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +188 -0
  119. data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +210 -0
  120. data/lib/rustici_software_cloud_v2/models/learner_schema.rb +216 -0
  121. data/lib/rustici_software_cloud_v2/models/link_schema.rb +188 -0
  122. data/lib/rustici_software_cloud_v2/models/message_schema.rb +188 -0
  123. data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +239 -0
  124. data/lib/rustici_software_cloud_v2/models/objective_schema.rb +355 -0
  125. data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +195 -0
  126. data/lib/rustici_software_cloud_v2/models/ping_schema.rb +188 -0
  127. data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +273 -0
  128. data/lib/rustici_software_cloud_v2/models/registration_completion.rb +31 -0
  129. data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +199 -0
  130. data/lib/rustici_software_cloud_v2/models/registration_schema.rb +360 -0
  131. data/lib/rustici_software_cloud_v2/models/registration_success.rb +31 -0
  132. data/lib/rustici_software_cloud_v2/models/registration_tags_batch_schema.rb +204 -0
  133. data/lib/rustici_software_cloud_v2/models/response_error.rb +188 -0
  134. data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +311 -0
  135. data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +305 -0
  136. data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +398 -0
  137. data/lib/rustici_software_cloud_v2/models/score_schema.rb +184 -0
  138. data/lib/rustici_software_cloud_v2/models/setting_item.rb +256 -0
  139. data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +190 -0
  140. data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +294 -0
  141. data/lib/rustici_software_cloud_v2/models/setting_metadata_valid_values.rb +209 -0
  142. data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +193 -0
  143. data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +203 -0
  144. data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +185 -0
  145. data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +192 -0
  146. data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +228 -0
  147. data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +188 -0
  148. data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +185 -0
  149. data/lib/rustici_software_cloud_v2/models/tag_post_schema.rb +174 -0
  150. data/lib/rustici_software_cloud_v2/models/title_schema.rb +183 -0
  151. data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +203 -0
  152. data/lib/rustici_software_cloud_v2/models/xapi_account.rb +203 -0
  153. data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +209 -0
  154. data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +301 -0
  155. data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +279 -0
  156. data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +267 -0
  157. data/lib/rustici_software_cloud_v2/models/xapi_context.rb +258 -0
  158. data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +219 -0
  159. data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +200 -0
  160. data/lib/rustici_software_cloud_v2/models/xapi_result.rb +231 -0
  161. data/lib/rustici_software_cloud_v2/models/xapi_score.rb +211 -0
  162. data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +294 -0
  163. data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +205 -0
  164. data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +200 -0
  165. data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +200 -0
  166. data/lib/rustici_software_cloud_v2/version.rb +15 -0
  167. data/rustici_software_cloud_v2.gemspec +45 -0
  168. data/spec/api_client_spec.rb +237 -0
  169. data/spec/configuration_spec.rb +42 -0
  170. data/spec/models/activity_result_schema_spec.rb +133 -0
  171. data/spec/models/application_list_schema_spec.rb +53 -0
  172. data/spec/models/application_schema_spec.rb +59 -0
  173. data/spec/models/application_token_spec.rb +65 -0
  174. data/spec/models/comment_schema_spec.rb +65 -0
  175. data/spec/models/completion_amount_schema_spec.rb +53 -0
  176. data/spec/models/course_activity_schema_spec.rb +99 -0
  177. data/spec/models/course_list_non_paged_schema_spec.rb +53 -0
  178. data/spec/models/course_list_schema_spec.rb +59 -0
  179. data/spec/models/course_reference_schema_spec.rb +65 -0
  180. data/spec/models/course_schema_spec.rb +129 -0
  181. data/spec/models/create_registration_schema_spec.rb +107 -0
  182. data/spec/models/credential_created_schema_spec.rb +77 -0
  183. data/spec/models/credential_list_schema_spec.rb +53 -0
  184. data/spec/models/credential_request_schema_spec.rb +59 -0
  185. data/spec/models/credential_schema_spec.rb +77 -0
  186. data/spec/models/import_fetch_request_schema_spec.rb +53 -0
  187. data/spec/models/import_job_result_schema_spec.rb +75 -0
  188. data/spec/models/import_result_schema_spec.rb +71 -0
  189. data/spec/models/integer_result_schema_spec.rb +53 -0
  190. data/spec/models/item_value_pair_schema_spec.rb +59 -0
  191. data/spec/models/launch_history_list_schema_spec.rb +53 -0
  192. data/spec/models/launch_history_schema_spec.rb +115 -0
  193. data/spec/models/launch_link_request_schema_spec.rb +107 -0
  194. data/spec/models/launch_link_schema_spec.rb +53 -0
  195. data/spec/models/learner_preference_schema_spec.rb +71 -0
  196. data/spec/models/learner_schema_spec.rb +71 -0
  197. data/spec/models/link_schema_spec.rb +53 -0
  198. data/spec/models/message_schema_spec.rb +53 -0
  199. data/spec/models/metadata_schema_spec.rb +89 -0
  200. data/spec/models/objective_schema_spec.rb +137 -0
  201. data/spec/models/permissions_schema_spec.rb +59 -0
  202. data/spec/models/ping_schema_spec.rb +53 -0
  203. data/spec/models/post_back_schema_spec.rb +85 -0
  204. data/spec/models/registration_completion_spec.rb +47 -0
  205. data/spec/models/registration_list_schema_spec.rb +59 -0
  206. data/spec/models/registration_schema_spec.rb +167 -0
  207. data/spec/models/registration_success_spec.rb +47 -0
  208. data/spec/models/response_error_spec.rb +53 -0
  209. data/spec/models/runtime_interaction_schema_spec.rb +117 -0
  210. data/spec/models/runtime_objective_schema_spec.rb +109 -0
  211. data/spec/models/runtime_schema_spec.rb +171 -0
  212. data/spec/models/score_schema_spec.rb +53 -0
  213. data/spec/models/setting_item_spec.rb +81 -0
  214. data/spec/models/setting_list_schema_spec.rb +53 -0
  215. data/spec/models/setting_metadata_spec.rb +99 -0
  216. data/spec/models/setting_metadata_valid_values_spec.rb +59 -0
  217. data/spec/models/settings_individual_schema_spec.rb +65 -0
  218. data/spec/models/settings_post_schema_spec.rb +53 -0
  219. data/spec/models/shared_data_entry_schema_spec.rb +59 -0
  220. data/spec/models/static_properties_schema_spec.rb +83 -0
  221. data/spec/models/string_result_schema_spec.rb +53 -0
  222. data/spec/models/title_schema_spec.rb +53 -0
  223. data/spec/models/token_request_schema_spec.rb +59 -0
  224. data/spec/spec_helper.rb +122 -0
  225. data/swagger-codegen.config +11 -0
  226. metadata +526 -0
@@ -0,0 +1,87 @@
1
+ =begin
2
+ #SCORM Cloud Rest API
3
+
4
+ #REST API used for SCORM Cloud integrations.
5
+
6
+ OpenAPI spec version: 2.0 beta
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.3
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module RusticiSoftwareCloudV2
16
+ class AuthenticationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Authenticates for a oauth token
23
+ # @param scope
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [Integer] :expiration (default to 300)
26
+ # @return [ApplicationToken]
27
+ def get_app_token(scope, opts = {})
28
+ data, _status_code, _headers = get_app_token_with_http_info(scope, opts)
29
+ data
30
+ end
31
+
32
+ # Authenticates for a oauth token
33
+ # @param scope
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [Integer] :expiration
36
+ # @return [Array<(ApplicationToken, Fixnum, Hash)>] ApplicationToken data, response status code and response headers
37
+ def get_app_token_with_http_info(scope, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AuthenticationApi.get_app_token ...'
40
+ end
41
+ # verify the required parameter 'scope' is set
42
+ if @api_client.config.client_side_validation && scope.nil?
43
+ fail ArgumentError, "Missing the required parameter 'scope' when calling AuthenticationApi.get_app_token"
44
+ end
45
+ if @api_client.config.client_side_validation && !opts[:'expiration'].nil? && opts[:'expiration'] > 43200
46
+ fail ArgumentError, 'invalid value for "opts[:"expiration"]" when calling AuthenticationApi.get_app_token, must be smaller than or equal to 43200.'
47
+ end
48
+
49
+ if @api_client.config.client_side_validation && !opts[:'expiration'].nil? && opts[:'expiration'] < 60
50
+ fail ArgumentError, 'invalid value for "opts[:"expiration"]" when calling AuthenticationApi.get_app_token, must be greater than or equal to 60.'
51
+ end
52
+
53
+ # resource path
54
+ local_var_path = '/oauth/authenticate/application/token'
55
+
56
+ # query parameters
57
+ query_params = {}
58
+
59
+ # header parameters
60
+ header_params = {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+ # HTTP header 'Content-Type'
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
65
+
66
+ # form parameters
67
+ form_params = {}
68
+ form_params['scope'] = scope
69
+ form_params['expiration'] = opts[:'expiration'] if !opts[:'expiration'].nil?
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = ['APP_NORMAL']
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'ApplicationToken')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: AuthenticationApi#get_app_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,1469 @@
1
+ =begin
2
+ #SCORM Cloud Rest API
3
+
4
+ #REST API used for SCORM Cloud integrations.
5
+
6
+ OpenAPI spec version: 2.0 beta
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.3
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module RusticiSoftwareCloudV2
16
+ class CourseApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns the launch link to use to preview this course
23
+ # @param course_id
24
+ # @param launch_link_request
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :css_url
27
+ # @return [LaunchLinkSchema]
28
+ def build_course_preview_launch_link(course_id, launch_link_request, opts = {})
29
+ data, _status_code, _headers = build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts)
30
+ data
31
+ end
32
+
33
+ # Returns the launch link to use to preview this course
34
+ # @param course_id
35
+ # @param launch_link_request
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :css_url
38
+ # @return [Array<(LaunchLinkSchema, Fixnum, Hash)>] LaunchLinkSchema data, response status code and response headers
39
+ def build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: CourseApi.build_course_preview_launch_link ...'
42
+ end
43
+ # verify the required parameter 'course_id' is set
44
+ if @api_client.config.client_side_validation && course_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link"
46
+ end
47
+ # verify the required parameter 'launch_link_request' is set
48
+ if @api_client.config.client_side_validation && launch_link_request.nil?
49
+ fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link"
50
+ end
51
+ # resource path
52
+ local_var_path = '/courses/{courseId}/preview'.sub('{' + 'courseId' + '}', course_id.to_s)
53
+
54
+ # query parameters
55
+ query_params = {}
56
+ query_params[:'cssUrl'] = opts[:'css_url'] if !opts[:'css_url'].nil?
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
+ # HTTP header 'Content-Type'
63
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = @api_client.object_to_http_body(launch_link_request)
70
+ auth_names = ['APP_NORMAL', 'OAUTH']
71
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => 'LaunchLinkSchema')
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: CourseApi#build_course_preview_launch_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ # Returns the link to use to preview this course
84
+ # @param course_id
85
+ # @param version_id The course version
86
+ # @param launch_link_request
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [LaunchLinkSchema]
89
+ def build_course_preview_launch_link_with_version(course_id, version_id, launch_link_request, opts = {})
90
+ data, _status_code, _headers = build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts)
91
+ data
92
+ end
93
+
94
+ # Returns the link to use to preview this course
95
+ # @param course_id
96
+ # @param version_id The course version
97
+ # @param launch_link_request
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(LaunchLinkSchema, Fixnum, Hash)>] LaunchLinkSchema data, response status code and response headers
100
+ def build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: CourseApi.build_course_preview_launch_link_with_version ...'
103
+ end
104
+ # verify the required parameter 'course_id' is set
105
+ if @api_client.config.client_side_validation && course_id.nil?
106
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link_with_version"
107
+ end
108
+ # verify the required parameter 'version_id' is set
109
+ if @api_client.config.client_side_validation && version_id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.build_course_preview_launch_link_with_version"
111
+ end
112
+ # verify the required parameter 'launch_link_request' is set
113
+ if @api_client.config.client_side_validation && launch_link_request.nil?
114
+ fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link_with_version"
115
+ end
116
+ # resource path
117
+ local_var_path = '/courses/{courseId}/versions/{versionId}/preview'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
118
+
119
+ # query parameters
120
+ query_params = {}
121
+
122
+ # header parameters
123
+ header_params = {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+ # HTTP header 'Content-Type'
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = @api_client.object_to_http_body(launch_link_request)
134
+ auth_names = ['APP_NORMAL', 'OAUTH']
135
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names,
141
+ :return_type => 'LaunchLinkSchema')
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: CourseApi#build_course_preview_launch_link_with_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+ # Start a job to fetch and import a course.
148
+ # An import job will be started to fetch and import the referenced file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided.\"
149
+ # @param 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.
150
+ # @param import_request
151
+ # @param [Hash] opts the optional parameters
152
+ # @option opts [BOOLEAN] :may_create_new_version 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)
153
+ # @option opts [String] :postback_url An optional parameter that specifies a URL to send a postback to when the course has finished uploading.
154
+ # @return [StringResultSchema]
155
+ def create_fetch_and_import_course_job(course_id, import_request, opts = {})
156
+ data, _status_code, _headers = create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts)
157
+ data
158
+ end
159
+
160
+ # Start a job to fetch and import a course.
161
+ # An import job will be started to fetch and import the referenced file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided.\&quot;
162
+ # @param 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.
163
+ # @param import_request
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [BOOLEAN] :may_create_new_version 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.
166
+ # @option opts [String] :postback_url An optional parameter that specifies a URL to send a postback to when the course has finished uploading.
167
+ # @return [Array<(StringResultSchema, Fixnum, Hash)>] StringResultSchema data, response status code and response headers
168
+ def create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug 'Calling API: CourseApi.create_fetch_and_import_course_job ...'
171
+ end
172
+ # verify the required parameter 'course_id' is set
173
+ if @api_client.config.client_side_validation && course_id.nil?
174
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_fetch_and_import_course_job"
175
+ end
176
+ # verify the required parameter 'import_request' is set
177
+ if @api_client.config.client_side_validation && import_request.nil?
178
+ fail ArgumentError, "Missing the required parameter 'import_request' when calling CourseApi.create_fetch_and_import_course_job"
179
+ end
180
+ # resource path
181
+ local_var_path = '/courses/importJobs'
182
+
183
+ # query parameters
184
+ query_params = {}
185
+ query_params[:'courseId'] = course_id
186
+ query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil?
187
+ query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil?
188
+
189
+ # header parameters
190
+ header_params = {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+ # HTTP header 'Content-Type'
194
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
195
+
196
+ # form parameters
197
+ form_params = {}
198
+
199
+ # http body (model)
200
+ post_body = @api_client.object_to_http_body(import_request)
201
+ auth_names = ['APP_NORMAL', 'OAUTH']
202
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
203
+ :header_params => header_params,
204
+ :query_params => query_params,
205
+ :form_params => form_params,
206
+ :body => post_body,
207
+ :auth_names => auth_names,
208
+ :return_type => 'StringResultSchema')
209
+ if @api_client.config.debugging
210
+ @api_client.config.logger.debug "API called: CourseApi#create_fetch_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
211
+ end
212
+ return data, status_code, headers
213
+ end
214
+ # Upload a course and start an import job for it.
215
+ # An import job will be started to import the posted file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided.
216
+ # @param 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.
217
+ # @param [Hash] opts the optional parameters
218
+ # @option opts [BOOLEAN] :may_create_new_version 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)
219
+ # @option opts [File] :file The zip file of the course contents to import.
220
+ # @option opts [String] :postback_url An optional parameter that specifies a URL to send a postback to when the course has finished uploading.
221
+ # @return [StringResultSchema]
222
+ def create_upload_and_import_course_job(course_id, opts = {})
223
+ data, _status_code, _headers = create_upload_and_import_course_job_with_http_info(course_id, opts)
224
+ data
225
+ end
226
+
227
+ # Upload a course and start an import job for it.
228
+ # An import job will be started to import the posted file, and the import job ID will be returned. If the import is successful, the imported course will be registered using the courseId provided.
229
+ # @param 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.
230
+ # @param [Hash] opts the optional parameters
231
+ # @option opts [BOOLEAN] :may_create_new_version 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.
232
+ # @option opts [File] :file The zip file of the course contents to import.
233
+ # @option opts [String] :postback_url An optional parameter that specifies a URL to send a postback to when the course has finished uploading.
234
+ # @return [Array<(StringResultSchema, Fixnum, Hash)>] StringResultSchema data, response status code and response headers
235
+ def create_upload_and_import_course_job_with_http_info(course_id, opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: CourseApi.create_upload_and_import_course_job ...'
238
+ end
239
+ # verify the required parameter 'course_id' is set
240
+ if @api_client.config.client_side_validation && course_id.nil?
241
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_upload_and_import_course_job"
242
+ end
243
+ # resource path
244
+ local_var_path = '/courses/importJobs/upload'
245
+
246
+ # query parameters
247
+ query_params = {}
248
+ query_params[:'courseId'] = course_id
249
+ query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil?
250
+ query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil?
251
+
252
+ # header parameters
253
+ header_params = {}
254
+ # HTTP header 'Accept' (if needed)
255
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
256
+ # HTTP header 'Content-Type'
257
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
258
+
259
+ # form parameters
260
+ form_params = {}
261
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
262
+
263
+ # http body (model)
264
+ post_body = nil
265
+ auth_names = ['APP_NORMAL', 'OAUTH']
266
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
267
+ :header_params => header_params,
268
+ :query_params => query_params,
269
+ :form_params => form_params,
270
+ :body => post_body,
271
+ :auth_names => auth_names,
272
+ :return_type => 'StringResultSchema')
273
+ if @api_client.config.debugging
274
+ @api_client.config.logger.debug "API called: CourseApi#create_upload_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
+ end
276
+ return data, status_code, headers
277
+ end
278
+ # Delete `courseId`
279
+ # @param course_id
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [nil]
282
+ def delete_course(course_id, opts = {})
283
+ delete_course_with_http_info(course_id, opts)
284
+ nil
285
+ end
286
+
287
+ # Delete &#x60;courseId&#x60;
288
+ # @param course_id
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
291
+ def delete_course_with_http_info(course_id, opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug 'Calling API: CourseApi.delete_course ...'
294
+ end
295
+ # verify the required parameter 'course_id' is set
296
+ if @api_client.config.client_side_validation && course_id.nil?
297
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course"
298
+ end
299
+ # resource path
300
+ local_var_path = '/courses/{courseId}'.sub('{' + 'courseId' + '}', course_id.to_s)
301
+
302
+ # query parameters
303
+ query_params = {}
304
+
305
+ # header parameters
306
+ header_params = {}
307
+ # HTTP header 'Accept' (if needed)
308
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
309
+ # HTTP header 'Content-Type'
310
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
311
+
312
+ # form parameters
313
+ form_params = {}
314
+
315
+ # http body (model)
316
+ post_body = nil
317
+ auth_names = ['APP_NORMAL', 'OAUTH']
318
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
319
+ :header_params => header_params,
320
+ :query_params => query_params,
321
+ :form_params => form_params,
322
+ :body => post_body,
323
+ :auth_names => auth_names)
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: CourseApi#delete_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
329
+ # Clears the `settingId` value for this course
330
+ # @param course_id
331
+ # @param setting_id
332
+ # @param [Hash] opts the optional parameters
333
+ # @return [nil]
334
+ def delete_course_configuration_setting(course_id, setting_id, opts = {})
335
+ delete_course_configuration_setting_with_http_info(course_id, setting_id, opts)
336
+ nil
337
+ end
338
+
339
+ # Clears the &#x60;settingId&#x60; value for this course
340
+ # @param course_id
341
+ # @param setting_id
342
+ # @param [Hash] opts the optional parameters
343
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
344
+ def delete_course_configuration_setting_with_http_info(course_id, setting_id, opts = {})
345
+ if @api_client.config.debugging
346
+ @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_configuration_setting ...'
347
+ end
348
+ # verify the required parameter 'course_id' is set
349
+ if @api_client.config.client_side_validation && course_id.nil?
350
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_configuration_setting"
351
+ end
352
+ # verify the required parameter 'setting_id' is set
353
+ if @api_client.config.client_side_validation && setting_id.nil?
354
+ fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_configuration_setting"
355
+ end
356
+ # resource path
357
+ local_var_path = '/courses/{courseId}/configuration/{settingId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s)
358
+
359
+ # query parameters
360
+ query_params = {}
361
+
362
+ # header parameters
363
+ header_params = {}
364
+ # HTTP header 'Accept' (if needed)
365
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
366
+ # HTTP header 'Content-Type'
367
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
368
+
369
+ # form parameters
370
+ form_params = {}
371
+
372
+ # http body (model)
373
+ post_body = nil
374
+ auth_names = ['APP_NORMAL', 'OAUTH']
375
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
376
+ :header_params => header_params,
377
+ :query_params => query_params,
378
+ :form_params => form_params,
379
+ :body => post_body,
380
+ :auth_names => auth_names)
381
+ if @api_client.config.debugging
382
+ @api_client.config.logger.debug "API called: CourseApi#delete_course_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
383
+ end
384
+ return data, status_code, headers
385
+ end
386
+ # Delete tags for this course
387
+ # @param course_id
388
+ # @param tags
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [nil]
391
+ def delete_course_tags(course_id, tags, opts = {})
392
+ delete_course_tags_with_http_info(course_id, tags, opts)
393
+ nil
394
+ end
395
+
396
+ # Delete tags for this course
397
+ # @param course_id
398
+ # @param tags
399
+ # @param [Hash] opts the optional parameters
400
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
401
+ def delete_course_tags_with_http_info(course_id, tags, opts = {})
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_tags ...'
404
+ end
405
+ # verify the required parameter 'course_id' is set
406
+ if @api_client.config.client_side_validation && course_id.nil?
407
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_tags"
408
+ end
409
+ # verify the required parameter 'tags' is set
410
+ if @api_client.config.client_side_validation && tags.nil?
411
+ fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.delete_course_tags"
412
+ end
413
+ # resource path
414
+ local_var_path = '/courses/{courseId}/tags'.sub('{' + 'courseId' + '}', course_id.to_s)
415
+
416
+ # query parameters
417
+ query_params = {}
418
+
419
+ # header parameters
420
+ header_params = {}
421
+ # HTTP header 'Accept' (if needed)
422
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
423
+ # HTTP header 'Content-Type'
424
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
425
+
426
+ # form parameters
427
+ form_params = {}
428
+
429
+ # http body (model)
430
+ post_body = @api_client.object_to_http_body(tags)
431
+ auth_names = ['APP_NORMAL', 'OAUTH']
432
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
433
+ :header_params => header_params,
434
+ :query_params => query_params,
435
+ :form_params => form_params,
436
+ :body => post_body,
437
+ :auth_names => auth_names)
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug "API called: CourseApi#delete_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
+ end
441
+ return data, status_code, headers
442
+ end
443
+ # Delete version `versionId` of `courseId`
444
+ # @param course_id
445
+ # @param version_id The course version
446
+ # @param [Hash] opts the optional parameters
447
+ # @return [nil]
448
+ def delete_course_version(course_id, version_id, opts = {})
449
+ delete_course_version_with_http_info(course_id, version_id, opts)
450
+ nil
451
+ end
452
+
453
+ # Delete version &#x60;versionId&#x60; of &#x60;courseId&#x60;
454
+ # @param course_id
455
+ # @param version_id The course version
456
+ # @param [Hash] opts the optional parameters
457
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
458
+ def delete_course_version_with_http_info(course_id, version_id, opts = {})
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_version ...'
461
+ end
462
+ # verify the required parameter 'course_id' is set
463
+ if @api_client.config.client_side_validation && course_id.nil?
464
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version"
465
+ end
466
+ # verify the required parameter 'version_id' is set
467
+ if @api_client.config.client_side_validation && version_id.nil?
468
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version"
469
+ end
470
+ # resource path
471
+ local_var_path = '/courses/{courseId}/versions/{versionId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
472
+
473
+ # query parameters
474
+ query_params = {}
475
+
476
+ # header parameters
477
+ header_params = {}
478
+ # HTTP header 'Accept' (if needed)
479
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
480
+ # HTTP header 'Content-Type'
481
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
482
+
483
+ # form parameters
484
+ form_params = {}
485
+
486
+ # http body (model)
487
+ post_body = nil
488
+ auth_names = ['APP_NORMAL', 'OAUTH']
489
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
490
+ :header_params => header_params,
491
+ :query_params => query_params,
492
+ :form_params => form_params,
493
+ :body => post_body,
494
+ :auth_names => auth_names)
495
+ if @api_client.config.debugging
496
+ @api_client.config.logger.debug "API called: CourseApi#delete_course_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
+ end
498
+ return data, status_code, headers
499
+ end
500
+ # Clears the `settingId` value for this course and version.
501
+ # @param course_id
502
+ # @param version_id The course version
503
+ # @param setting_id
504
+ # @param [Hash] opts the optional parameters
505
+ # @return [nil]
506
+ def delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {})
507
+ delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts)
508
+ nil
509
+ end
510
+
511
+ # Clears the &#x60;settingId&#x60; value for this course and version.
512
+ # @param course_id
513
+ # @param version_id The course version
514
+ # @param setting_id
515
+ # @param [Hash] opts the optional parameters
516
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
517
+ def delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts = {})
518
+ if @api_client.config.debugging
519
+ @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_version_configuration_setting ...'
520
+ end
521
+ # verify the required parameter 'course_id' is set
522
+ if @api_client.config.client_side_validation && course_id.nil?
523
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version_configuration_setting"
524
+ end
525
+ # verify the required parameter 'version_id' is set
526
+ if @api_client.config.client_side_validation && version_id.nil?
527
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version_configuration_setting"
528
+ end
529
+ # verify the required parameter 'setting_id' is set
530
+ if @api_client.config.client_side_validation && setting_id.nil?
531
+ fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_version_configuration_setting"
532
+ end
533
+ # resource path
534
+ 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)
535
+
536
+ # query parameters
537
+ query_params = {}
538
+
539
+ # header parameters
540
+ header_params = {}
541
+ # HTTP header 'Accept' (if needed)
542
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
543
+ # HTTP header 'Content-Type'
544
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
545
+
546
+ # form parameters
547
+ form_params = {}
548
+
549
+ # http body (model)
550
+ post_body = nil
551
+ auth_names = ['APP_NORMAL', 'OAUTH']
552
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
553
+ :header_params => header_params,
554
+ :query_params => query_params,
555
+ :form_params => form_params,
556
+ :body => post_body,
557
+ :auth_names => auth_names)
558
+ if @api_client.config.debugging
559
+ @api_client.config.logger.debug "API called: CourseApi#delete_course_version_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
560
+ end
561
+ return data, status_code, headers
562
+ end
563
+ # Get information about `courseId`
564
+ # @param course_id
565
+ # @param [Hash] opts the optional parameters
566
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results (default to false)
567
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)
568
+ # @return [CourseSchema]
569
+ def get_course(course_id, opts = {})
570
+ data, _status_code, _headers = get_course_with_http_info(course_id, opts)
571
+ data
572
+ end
573
+
574
+ # Get information about &#x60;courseId&#x60;
575
+ # @param course_id
576
+ # @param [Hash] opts the optional parameters
577
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results
578
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.
579
+ # @return [Array<(CourseSchema, Fixnum, Hash)>] CourseSchema data, response status code and response headers
580
+ def get_course_with_http_info(course_id, opts = {})
581
+ if @api_client.config.debugging
582
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course ...'
583
+ end
584
+ # verify the required parameter 'course_id' is set
585
+ if @api_client.config.client_side_validation && course_id.nil?
586
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course"
587
+ end
588
+ # resource path
589
+ local_var_path = '/courses/{courseId}'.sub('{' + 'courseId' + '}', course_id.to_s)
590
+
591
+ # query parameters
592
+ query_params = {}
593
+ query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
594
+ query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?
595
+
596
+ # header parameters
597
+ header_params = {}
598
+ # HTTP header 'Accept' (if needed)
599
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
600
+ # HTTP header 'Content-Type'
601
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
602
+
603
+ # form parameters
604
+ form_params = {}
605
+
606
+ # http body (model)
607
+ post_body = nil
608
+ auth_names = ['APP_NORMAL', 'OAUTH']
609
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
610
+ :header_params => header_params,
611
+ :query_params => query_params,
612
+ :form_params => form_params,
613
+ :body => post_body,
614
+ :auth_names => auth_names,
615
+ :return_type => 'CourseSchema')
616
+ if @api_client.config.debugging
617
+ @api_client.config.logger.debug "API called: CourseApi#get_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
618
+ end
619
+ return data, status_code, headers
620
+ end
621
+ # Returns all configuration settings for this course
622
+ # @param course_id
623
+ # @param [Hash] opts the optional parameters
624
+ # @option opts [BOOLEAN] :include_metadata (default to false)
625
+ # @return [SettingListSchema]
626
+ def get_course_configuration(course_id, opts = {})
627
+ data, _status_code, _headers = get_course_configuration_with_http_info(course_id, opts)
628
+ data
629
+ end
630
+
631
+ # Returns all configuration settings for this course
632
+ # @param course_id
633
+ # @param [Hash] opts the optional parameters
634
+ # @option opts [BOOLEAN] :include_metadata
635
+ # @return [Array<(SettingListSchema, Fixnum, Hash)>] SettingListSchema data, response status code and response headers
636
+ def get_course_configuration_with_http_info(course_id, opts = {})
637
+ if @api_client.config.debugging
638
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_configuration ...'
639
+ end
640
+ # verify the required parameter 'course_id' is set
641
+ if @api_client.config.client_side_validation && course_id.nil?
642
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_configuration"
643
+ end
644
+ # resource path
645
+ local_var_path = '/courses/{courseId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s)
646
+
647
+ # query parameters
648
+ query_params = {}
649
+ query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil?
650
+
651
+ # header parameters
652
+ header_params = {}
653
+ # HTTP header 'Accept' (if needed)
654
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
655
+ # HTTP header 'Content-Type'
656
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
657
+
658
+ # form parameters
659
+ form_params = {}
660
+
661
+ # http body (model)
662
+ post_body = nil
663
+ auth_names = ['APP_NORMAL', 'OAUTH']
664
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
665
+ :header_params => header_params,
666
+ :query_params => query_params,
667
+ :form_params => form_params,
668
+ :body => post_body,
669
+ :auth_names => auth_names,
670
+ :return_type => 'SettingListSchema')
671
+ if @api_client.config.debugging
672
+ @api_client.config.logger.debug "API called: CourseApi#get_course_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
673
+ end
674
+ return data, status_code, headers
675
+ end
676
+ # Get xAPI statements for `courseId`
677
+ # @param course_id
678
+ # @param [Hash] opts the optional parameters
679
+ # @option opts [String] :learner_id Only entries for the specified learner id will be included.
680
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
681
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
682
+ # @option opts [String] :more Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.
683
+ # @return [XapiStatementResult]
684
+ def get_course_statements(course_id, opts = {})
685
+ data, _status_code, _headers = get_course_statements_with_http_info(course_id, opts)
686
+ data
687
+ end
688
+
689
+ # Get xAPI statements for &#x60;courseId&#x60;
690
+ # @param course_id
691
+ # @param [Hash] opts the optional parameters
692
+ # @option opts [String] :learner_id Only entries for the specified learner id will be included.
693
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
694
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
695
+ # @option opts [String] :more Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.
696
+ # @return [Array<(XapiStatementResult, Fixnum, Hash)>] XapiStatementResult data, response status code and response headers
697
+ def get_course_statements_with_http_info(course_id, opts = {})
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_statements ...'
700
+ end
701
+ # verify the required parameter 'course_id' is set
702
+ if @api_client.config.client_side_validation && course_id.nil?
703
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_statements"
704
+ end
705
+ # resource path
706
+ local_var_path = '/courses/{courseId}/xAPIStatements'.sub('{' + 'courseId' + '}', course_id.to_s)
707
+
708
+ # query parameters
709
+ query_params = {}
710
+ query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil?
711
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
712
+ query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
713
+ query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?
714
+
715
+ # header parameters
716
+ header_params = {}
717
+ # HTTP header 'Accept' (if needed)
718
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
719
+ # HTTP header 'Content-Type'
720
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
721
+
722
+ # form parameters
723
+ form_params = {}
724
+
725
+ # http body (model)
726
+ post_body = nil
727
+ auth_names = ['APP_NORMAL', 'OAUTH']
728
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
729
+ :header_params => header_params,
730
+ :query_params => query_params,
731
+ :form_params => form_params,
732
+ :body => post_body,
733
+ :auth_names => auth_names,
734
+ :return_type => 'XapiStatementResult')
735
+ if @api_client.config.debugging
736
+ @api_client.config.logger.debug "API called: CourseApi#get_course_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
737
+ end
738
+ return data, status_code, headers
739
+ end
740
+ # Get the tags for this course
741
+ # @param course_id
742
+ # @param [Hash] opts the optional parameters
743
+ # @return [TagListSchema]
744
+ def get_course_tags(course_id, opts = {})
745
+ data, _status_code, _headers = get_course_tags_with_http_info(course_id, opts)
746
+ data
747
+ end
748
+
749
+ # Get the tags for this course
750
+ # @param course_id
751
+ # @param [Hash] opts the optional parameters
752
+ # @return [Array<(TagListSchema, Fixnum, Hash)>] TagListSchema data, response status code and response headers
753
+ def get_course_tags_with_http_info(course_id, opts = {})
754
+ if @api_client.config.debugging
755
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_tags ...'
756
+ end
757
+ # verify the required parameter 'course_id' is set
758
+ if @api_client.config.client_side_validation && course_id.nil?
759
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_tags"
760
+ end
761
+ # resource path
762
+ local_var_path = '/courses/{courseId}/tags'.sub('{' + 'courseId' + '}', course_id.to_s)
763
+
764
+ # query parameters
765
+ query_params = {}
766
+
767
+ # header parameters
768
+ header_params = {}
769
+ # HTTP header 'Accept' (if needed)
770
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
771
+ # HTTP header 'Content-Type'
772
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
773
+
774
+ # form parameters
775
+ form_params = {}
776
+
777
+ # http body (model)
778
+ post_body = nil
779
+ auth_names = ['APP_NORMAL', 'OAUTH']
780
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
781
+ :header_params => header_params,
782
+ :query_params => query_params,
783
+ :form_params => form_params,
784
+ :body => post_body,
785
+ :auth_names => auth_names,
786
+ :return_type => 'TagListSchema')
787
+ if @api_client.config.debugging
788
+ @api_client.config.logger.debug "API called: CourseApi#get_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
789
+ end
790
+ return data, status_code, headers
791
+ end
792
+ # Returns all configuration settings for this course and version.
793
+ # @param course_id
794
+ # @param version_id The course version
795
+ # @param [Hash] opts the optional parameters
796
+ # @option opts [BOOLEAN] :include_metadata (default to false)
797
+ # @return [SettingListSchema]
798
+ def get_course_version_configuration(course_id, version_id, opts = {})
799
+ data, _status_code, _headers = get_course_version_configuration_with_http_info(course_id, version_id, opts)
800
+ data
801
+ end
802
+
803
+ # Returns all configuration settings for this course and version.
804
+ # @param course_id
805
+ # @param version_id The course version
806
+ # @param [Hash] opts the optional parameters
807
+ # @option opts [BOOLEAN] :include_metadata
808
+ # @return [Array<(SettingListSchema, Fixnum, Hash)>] SettingListSchema data, response status code and response headers
809
+ def get_course_version_configuration_with_http_info(course_id, version_id, opts = {})
810
+ if @api_client.config.debugging
811
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_configuration ...'
812
+ end
813
+ # verify the required parameter 'course_id' is set
814
+ if @api_client.config.client_side_validation && course_id.nil?
815
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_configuration"
816
+ end
817
+ # verify the required parameter 'version_id' is set
818
+ if @api_client.config.client_side_validation && version_id.nil?
819
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_configuration"
820
+ end
821
+ # resource path
822
+ local_var_path = '/courses/{courseId}/versions/{versionId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
823
+
824
+ # query parameters
825
+ query_params = {}
826
+ query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil?
827
+
828
+ # header parameters
829
+ header_params = {}
830
+ # HTTP header 'Accept' (if needed)
831
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
832
+ # HTTP header 'Content-Type'
833
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
834
+
835
+ # form parameters
836
+ form_params = {}
837
+
838
+ # http body (model)
839
+ post_body = nil
840
+ auth_names = ['APP_NORMAL', 'OAUTH']
841
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
842
+ :header_params => header_params,
843
+ :query_params => query_params,
844
+ :form_params => form_params,
845
+ :body => post_body,
846
+ :auth_names => auth_names,
847
+ :return_type => 'SettingListSchema')
848
+ if @api_client.config.debugging
849
+ @api_client.config.logger.debug "API called: CourseApi#get_course_version_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
850
+ end
851
+ return data, status_code, headers
852
+ end
853
+ # Get version `versionId` of `courseId`
854
+ # @param course_id
855
+ # @param version_id The course version
856
+ # @param [Hash] opts the optional parameters
857
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results (default to false)
858
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)
859
+ # @return [CourseSchema]
860
+ def get_course_version_info(course_id, version_id, opts = {})
861
+ data, _status_code, _headers = get_course_version_info_with_http_info(course_id, version_id, opts)
862
+ data
863
+ end
864
+
865
+ # Get version &#x60;versionId&#x60; of &#x60;courseId&#x60;
866
+ # @param course_id
867
+ # @param version_id The course version
868
+ # @param [Hash] opts the optional parameters
869
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results
870
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.
871
+ # @return [Array<(CourseSchema, Fixnum, Hash)>] CourseSchema data, response status code and response headers
872
+ def get_course_version_info_with_http_info(course_id, version_id, opts = {})
873
+ if @api_client.config.debugging
874
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_info ...'
875
+ end
876
+ # verify the required parameter 'course_id' is set
877
+ if @api_client.config.client_side_validation && course_id.nil?
878
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_info"
879
+ end
880
+ # verify the required parameter 'version_id' is set
881
+ if @api_client.config.client_side_validation && version_id.nil?
882
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_info"
883
+ end
884
+ # resource path
885
+ local_var_path = '/courses/{courseId}/versions/{versionId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
886
+
887
+ # query parameters
888
+ query_params = {}
889
+ query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
890
+ query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?
891
+
892
+ # header parameters
893
+ header_params = {}
894
+ # HTTP header 'Accept' (if needed)
895
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
896
+ # HTTP header 'Content-Type'
897
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
898
+
899
+ # form parameters
900
+ form_params = {}
901
+
902
+ # http body (model)
903
+ post_body = nil
904
+ auth_names = ['APP_NORMAL', 'OAUTH']
905
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
906
+ :header_params => header_params,
907
+ :query_params => query_params,
908
+ :form_params => form_params,
909
+ :body => post_body,
910
+ :auth_names => auth_names,
911
+ :return_type => 'CourseSchema')
912
+ if @api_client.config.debugging
913
+ @api_client.config.logger.debug "API called: CourseApi#get_course_version_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
914
+ end
915
+ return data, status_code, headers
916
+ end
917
+ # Get xAPI statements for version `versionId` of `courseId`
918
+ # @param course_id
919
+ # @param version_id The course version
920
+ # @param [Hash] opts the optional parameters
921
+ # @option opts [String] :learner_id Only entries for the specified learner id will be included.
922
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
923
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
924
+ # @option opts [String] :more Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.
925
+ # @return [XapiStatementResult]
926
+ def get_course_version_statements(course_id, version_id, opts = {})
927
+ data, _status_code, _headers = get_course_version_statements_with_http_info(course_id, version_id, opts)
928
+ data
929
+ end
930
+
931
+ # Get xAPI statements for version &#x60;versionId&#x60; of &#x60;courseId&#x60;
932
+ # @param course_id
933
+ # @param version_id The course version
934
+ # @param [Hash] opts the optional parameters
935
+ # @option opts [String] :learner_id Only entries for the specified learner id will be included.
936
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
937
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
938
+ # @option opts [String] :more Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.
939
+ # @return [Array<(XapiStatementResult, Fixnum, Hash)>] XapiStatementResult data, response status code and response headers
940
+ def get_course_version_statements_with_http_info(course_id, version_id, opts = {})
941
+ if @api_client.config.debugging
942
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_statements ...'
943
+ end
944
+ # verify the required parameter 'course_id' is set
945
+ if @api_client.config.client_side_validation && course_id.nil?
946
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_statements"
947
+ end
948
+ # verify the required parameter 'version_id' is set
949
+ if @api_client.config.client_side_validation && version_id.nil?
950
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_statements"
951
+ end
952
+ # resource path
953
+ local_var_path = '/courses/{courseId}/versions/{versionId}/xAPIStatements'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
954
+
955
+ # query parameters
956
+ query_params = {}
957
+ query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil?
958
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
959
+ query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
960
+ query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?
961
+
962
+ # header parameters
963
+ header_params = {}
964
+ # HTTP header 'Accept' (if needed)
965
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
966
+ # HTTP header 'Content-Type'
967
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
968
+
969
+ # form parameters
970
+ form_params = {}
971
+
972
+ # http body (model)
973
+ post_body = nil
974
+ auth_names = ['APP_NORMAL', 'OAUTH']
975
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
976
+ :header_params => header_params,
977
+ :query_params => query_params,
978
+ :form_params => form_params,
979
+ :body => post_body,
980
+ :auth_names => auth_names,
981
+ :return_type => 'XapiStatementResult')
982
+ if @api_client.config.debugging
983
+ @api_client.config.logger.debug "API called: CourseApi#get_course_version_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
984
+ end
985
+ return data, status_code, headers
986
+ end
987
+ # Get all versions of `courseId`
988
+ # @param course_id
989
+ # @param [Hash] opts the optional parameters
990
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
991
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
992
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results (default to false)
993
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)
994
+ # @return [CourseListNonPagedSchema]
995
+ def get_course_versions(course_id, opts = {})
996
+ data, _status_code, _headers = get_course_versions_with_http_info(course_id, opts)
997
+ data
998
+ end
999
+
1000
+ # Get all versions of &#x60;courseId&#x60;
1001
+ # @param course_id
1002
+ # @param [Hash] opts the optional parameters
1003
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
1004
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
1005
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results
1006
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.
1007
+ # @return [Array<(CourseListNonPagedSchema, Fixnum, Hash)>] CourseListNonPagedSchema data, response status code and response headers
1008
+ def get_course_versions_with_http_info(course_id, opts = {})
1009
+ if @api_client.config.debugging
1010
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_course_versions ...'
1011
+ end
1012
+ # verify the required parameter 'course_id' is set
1013
+ if @api_client.config.client_side_validation && course_id.nil?
1014
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_versions"
1015
+ end
1016
+ # resource path
1017
+ local_var_path = '/courses/{courseId}/versions'.sub('{' + 'courseId' + '}', course_id.to_s)
1018
+
1019
+ # query parameters
1020
+ query_params = {}
1021
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1022
+ query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
1023
+ query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
1024
+ query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?
1025
+
1026
+ # header parameters
1027
+ header_params = {}
1028
+ # HTTP header 'Accept' (if needed)
1029
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1030
+ # HTTP header 'Content-Type'
1031
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1032
+
1033
+ # form parameters
1034
+ form_params = {}
1035
+
1036
+ # http body (model)
1037
+ post_body = nil
1038
+ auth_names = ['APP_NORMAL', 'OAUTH']
1039
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1040
+ :header_params => header_params,
1041
+ :query_params => query_params,
1042
+ :form_params => form_params,
1043
+ :body => post_body,
1044
+ :auth_names => auth_names,
1045
+ :return_type => 'CourseListNonPagedSchema')
1046
+ if @api_client.config.debugging
1047
+ @api_client.config.logger.debug "API called: CourseApi#get_course_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1048
+ end
1049
+ return data, status_code, headers
1050
+ end
1051
+ # Get all courses for `appId`
1052
+ # @param [Hash] opts the optional parameters
1053
+ # @option opts [String] :more Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.
1054
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
1055
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
1056
+ # @option opts [String] :filter Optional string which filters results by a specified field (described by filterBy).
1057
+ # @option opts [String] :filter_by Optional enum parameter for specifying the field on which to run the filter. Defaults to course_id.
1058
+ # @option opts [String] :order_by Optional enum parameter for specifying the field and order by which to sort the results. Defaults to creation_date_desc.
1059
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results (default to false)
1060
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)
1061
+ # @option opts [Array<String>] :tags
1062
+ # @return [CourseListSchema]
1063
+ def get_courses(opts = {})
1064
+ data, _status_code, _headers = get_courses_with_http_info(opts)
1065
+ data
1066
+ end
1067
+
1068
+ # Get all courses for &#x60;appId&#x60;
1069
+ # @param [Hash] opts the optional parameters
1070
+ # @option opts [String] :more Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.
1071
+ # @option opts [DateTime] :since Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
1072
+ # @option opts [DateTime] :_until Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.
1073
+ # @option opts [String] :filter Optional string which filters results by a specified field (described by filterBy).
1074
+ # @option opts [String] :filter_by Optional enum parameter for specifying the field on which to run the filter. Defaults to course_id.
1075
+ # @option opts [String] :order_by Optional enum parameter for specifying the field and order by which to sort the results. Defaults to creation_date_desc.
1076
+ # @option opts [BOOLEAN] :include_registration_count Include the registration count in the results
1077
+ # @option opts [BOOLEAN] :include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.
1078
+ # @option opts [Array<String>] :tags
1079
+ # @return [Array<(CourseListSchema, Fixnum, Hash)>] CourseListSchema data, response status code and response headers
1080
+ def get_courses_with_http_info(opts = {})
1081
+ if @api_client.config.debugging
1082
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_courses ...'
1083
+ end
1084
+ if @api_client.config.client_side_validation && opts[:'filter_by'] && !['title', 'course_id', 'tags'].include?(opts[:'filter_by'])
1085
+ fail ArgumentError, 'invalid value for "filter_by", must be one of title, course_id, tags'
1086
+ end
1087
+ if @api_client.config.client_side_validation && opts[:'order_by'] && !['title_asc', 'title_desc', 'creation_date_asc', 'creation_date_desc'].include?(opts[:'order_by'])
1088
+ fail ArgumentError, 'invalid value for "order_by", must be one of title_asc, title_desc, creation_date_asc, creation_date_desc'
1089
+ end
1090
+ # resource path
1091
+ local_var_path = '/courses'
1092
+
1093
+ # query parameters
1094
+ query_params = {}
1095
+ query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?
1096
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1097
+ query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
1098
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1099
+ query_params[:'filterBy'] = opts[:'filter_by'] if !opts[:'filter_by'].nil?
1100
+ query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
1101
+ query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
1102
+ query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?
1103
+ query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :ssv) if !opts[:'tags'].nil?
1104
+
1105
+ # header parameters
1106
+ header_params = {}
1107
+ # HTTP header 'Accept' (if needed)
1108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1109
+ # HTTP header 'Content-Type'
1110
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1111
+
1112
+ # form parameters
1113
+ form_params = {}
1114
+
1115
+ # http body (model)
1116
+ post_body = nil
1117
+ auth_names = ['APP_NORMAL', 'OAUTH']
1118
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1119
+ :header_params => header_params,
1120
+ :query_params => query_params,
1121
+ :form_params => form_params,
1122
+ :body => post_body,
1123
+ :auth_names => auth_names,
1124
+ :return_type => 'CourseListSchema')
1125
+ if @api_client.config.debugging
1126
+ @api_client.config.logger.debug "API called: CourseApi#get_courses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1127
+ end
1128
+ return data, status_code, headers
1129
+ end
1130
+ # Check the status of an import job.
1131
+ # @param import_job_id Id received when the import job was submitted to the importJobs resource.
1132
+ # @param [Hash] opts the optional parameters
1133
+ # @return [ImportJobResultSchema]
1134
+ def get_import_job_status(import_job_id, opts = {})
1135
+ data, _status_code, _headers = get_import_job_status_with_http_info(import_job_id, opts)
1136
+ data
1137
+ end
1138
+
1139
+ # Check the status of an import job.
1140
+ # @param import_job_id Id received when the import job was submitted to the importJobs resource.
1141
+ # @param [Hash] opts the optional parameters
1142
+ # @return [Array<(ImportJobResultSchema, Fixnum, Hash)>] ImportJobResultSchema data, response status code and response headers
1143
+ def get_import_job_status_with_http_info(import_job_id, opts = {})
1144
+ if @api_client.config.debugging
1145
+ @api_client.config.logger.debug 'Calling API: CourseApi.get_import_job_status ...'
1146
+ end
1147
+ # verify the required parameter 'import_job_id' is set
1148
+ if @api_client.config.client_side_validation && import_job_id.nil?
1149
+ fail ArgumentError, "Missing the required parameter 'import_job_id' when calling CourseApi.get_import_job_status"
1150
+ end
1151
+ # resource path
1152
+ local_var_path = '/courses/importJobs/{importJobId}'.sub('{' + 'importJobId' + '}', import_job_id.to_s)
1153
+
1154
+ # query parameters
1155
+ query_params = {}
1156
+
1157
+ # header parameters
1158
+ header_params = {}
1159
+ # HTTP header 'Accept' (if needed)
1160
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1161
+ # HTTP header 'Content-Type'
1162
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1163
+
1164
+ # form parameters
1165
+ form_params = {}
1166
+
1167
+ # http body (model)
1168
+ post_body = nil
1169
+ auth_names = ['APP_NORMAL', 'OAUTH']
1170
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1171
+ :header_params => header_params,
1172
+ :query_params => query_params,
1173
+ :form_params => form_params,
1174
+ :body => post_body,
1175
+ :auth_names => auth_names,
1176
+ :return_type => 'ImportJobResultSchema')
1177
+ if @api_client.config.debugging
1178
+ @api_client.config.logger.debug "API called: CourseApi#get_import_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1179
+ end
1180
+ return data, status_code, headers
1181
+ end
1182
+ # Set the tags for this course
1183
+ # @param course_id
1184
+ # @param tags
1185
+ # @param [Hash] opts the optional parameters
1186
+ # @return [nil]
1187
+ def put_course_tags(course_id, tags, opts = {})
1188
+ put_course_tags_with_http_info(course_id, tags, opts)
1189
+ nil
1190
+ end
1191
+
1192
+ # Set the tags for this course
1193
+ # @param course_id
1194
+ # @param tags
1195
+ # @param [Hash] opts the optional parameters
1196
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1197
+ def put_course_tags_with_http_info(course_id, tags, opts = {})
1198
+ if @api_client.config.debugging
1199
+ @api_client.config.logger.debug 'Calling API: CourseApi.put_course_tags ...'
1200
+ end
1201
+ # verify the required parameter 'course_id' is set
1202
+ if @api_client.config.client_side_validation && course_id.nil?
1203
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.put_course_tags"
1204
+ end
1205
+ # verify the required parameter 'tags' is set
1206
+ if @api_client.config.client_side_validation && tags.nil?
1207
+ fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.put_course_tags"
1208
+ end
1209
+ # resource path
1210
+ local_var_path = '/courses/{courseId}/tags'.sub('{' + 'courseId' + '}', course_id.to_s)
1211
+
1212
+ # query parameters
1213
+ query_params = {}
1214
+
1215
+ # header parameters
1216
+ header_params = {}
1217
+ # HTTP header 'Accept' (if needed)
1218
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1219
+ # HTTP header 'Content-Type'
1220
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1221
+
1222
+ # form parameters
1223
+ form_params = {}
1224
+
1225
+ # http body (model)
1226
+ post_body = @api_client.object_to_http_body(tags)
1227
+ auth_names = ['APP_NORMAL', 'OAUTH']
1228
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1229
+ :header_params => header_params,
1230
+ :query_params => query_params,
1231
+ :form_params => form_params,
1232
+ :body => post_body,
1233
+ :auth_names => auth_names)
1234
+ if @api_client.config.debugging
1235
+ @api_client.config.logger.debug "API called: CourseApi#put_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1236
+ end
1237
+ return data, status_code, headers
1238
+ end
1239
+ # Sets all of the provided tags on all of the provided courses
1240
+ # @param batch
1241
+ # @param [Hash] opts the optional parameters
1242
+ # @return [nil]
1243
+ def put_course_tags_batch(batch, opts = {})
1244
+ put_course_tags_batch_with_http_info(batch, opts)
1245
+ nil
1246
+ end
1247
+
1248
+ # Sets all of the provided tags on all of the provided courses
1249
+ # @param batch
1250
+ # @param [Hash] opts the optional parameters
1251
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1252
+ def put_course_tags_batch_with_http_info(batch, opts = {})
1253
+ if @api_client.config.debugging
1254
+ @api_client.config.logger.debug 'Calling API: CourseApi.put_course_tags_batch ...'
1255
+ end
1256
+ # verify the required parameter 'batch' is set
1257
+ if @api_client.config.client_side_validation && batch.nil?
1258
+ fail ArgumentError, "Missing the required parameter 'batch' when calling CourseApi.put_course_tags_batch"
1259
+ end
1260
+ # resource path
1261
+ local_var_path = '/courses/tags'
1262
+
1263
+ # query parameters
1264
+ query_params = {}
1265
+
1266
+ # header parameters
1267
+ header_params = {}
1268
+ # HTTP header 'Accept' (if needed)
1269
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1270
+ # HTTP header 'Content-Type'
1271
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1272
+
1273
+ # form parameters
1274
+ form_params = {}
1275
+
1276
+ # http body (model)
1277
+ post_body = @api_client.object_to_http_body(batch)
1278
+ auth_names = ['APP_NORMAL', 'OAUTH']
1279
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1280
+ :header_params => header_params,
1281
+ :query_params => query_params,
1282
+ :form_params => form_params,
1283
+ :body => post_body,
1284
+ :auth_names => auth_names)
1285
+ if @api_client.config.debugging
1286
+ @api_client.config.logger.debug "API called: CourseApi#put_course_tags_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1287
+ end
1288
+ return data, status_code, headers
1289
+ end
1290
+ # Set configuration settings for this course.
1291
+ # @param course_id
1292
+ # @param configuration_settings
1293
+ # @param [Hash] opts the optional parameters
1294
+ # @return [nil]
1295
+ def set_course_configuration(course_id, configuration_settings, opts = {})
1296
+ set_course_configuration_with_http_info(course_id, configuration_settings, opts)
1297
+ nil
1298
+ end
1299
+
1300
+ # Set configuration settings for this course.
1301
+ # @param course_id
1302
+ # @param configuration_settings
1303
+ # @param [Hash] opts the optional parameters
1304
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1305
+ def set_course_configuration_with_http_info(course_id, configuration_settings, opts = {})
1306
+ if @api_client.config.debugging
1307
+ @api_client.config.logger.debug 'Calling API: CourseApi.set_course_configuration ...'
1308
+ end
1309
+ # verify the required parameter 'course_id' is set
1310
+ if @api_client.config.client_side_validation && course_id.nil?
1311
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_configuration"
1312
+ end
1313
+ # verify the required parameter 'configuration_settings' is set
1314
+ if @api_client.config.client_side_validation && configuration_settings.nil?
1315
+ fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_configuration"
1316
+ end
1317
+ # resource path
1318
+ local_var_path = '/courses/{courseId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s)
1319
+
1320
+ # query parameters
1321
+ query_params = {}
1322
+
1323
+ # header parameters
1324
+ header_params = {}
1325
+ # HTTP header 'Accept' (if needed)
1326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1327
+ # HTTP header 'Content-Type'
1328
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1329
+
1330
+ # form parameters
1331
+ form_params = {}
1332
+
1333
+ # http body (model)
1334
+ post_body = @api_client.object_to_http_body(configuration_settings)
1335
+ auth_names = ['APP_NORMAL', 'OAUTH']
1336
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1337
+ :header_params => header_params,
1338
+ :query_params => query_params,
1339
+ :form_params => form_params,
1340
+ :body => post_body,
1341
+ :auth_names => auth_names)
1342
+ if @api_client.config.debugging
1343
+ @api_client.config.logger.debug "API called: CourseApi#set_course_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1344
+ end
1345
+ return data, status_code, headers
1346
+ end
1347
+ # Sets the course title for `courseId`
1348
+ # @param course_id
1349
+ # @param title
1350
+ # @param [Hash] opts the optional parameters
1351
+ # @return [String]
1352
+ def set_course_title(course_id, title, opts = {})
1353
+ data, _status_code, _headers = set_course_title_with_http_info(course_id, title, opts)
1354
+ data
1355
+ end
1356
+
1357
+ # Sets the course title for &#x60;courseId&#x60;
1358
+ # @param course_id
1359
+ # @param title
1360
+ # @param [Hash] opts the optional parameters
1361
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
1362
+ def set_course_title_with_http_info(course_id, title, opts = {})
1363
+ if @api_client.config.debugging
1364
+ @api_client.config.logger.debug 'Calling API: CourseApi.set_course_title ...'
1365
+ end
1366
+ # verify the required parameter 'course_id' is set
1367
+ if @api_client.config.client_side_validation && course_id.nil?
1368
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_title"
1369
+ end
1370
+ # verify the required parameter 'title' is set
1371
+ if @api_client.config.client_side_validation && title.nil?
1372
+ fail ArgumentError, "Missing the required parameter 'title' when calling CourseApi.set_course_title"
1373
+ end
1374
+ # resource path
1375
+ local_var_path = '/courses/{courseId}/title'.sub('{' + 'courseId' + '}', course_id.to_s)
1376
+
1377
+ # query parameters
1378
+ query_params = {}
1379
+
1380
+ # header parameters
1381
+ header_params = {}
1382
+ # HTTP header 'Accept' (if needed)
1383
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1384
+ # HTTP header 'Content-Type'
1385
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1386
+
1387
+ # form parameters
1388
+ form_params = {}
1389
+
1390
+ # http body (model)
1391
+ post_body = @api_client.object_to_http_body(title)
1392
+ auth_names = ['APP_NORMAL', 'OAUTH']
1393
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1394
+ :header_params => header_params,
1395
+ :query_params => query_params,
1396
+ :form_params => form_params,
1397
+ :body => post_body,
1398
+ :auth_names => auth_names,
1399
+ :return_type => 'String')
1400
+ if @api_client.config.debugging
1401
+ @api_client.config.logger.debug "API called: CourseApi#set_course_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1402
+ end
1403
+ return data, status_code, headers
1404
+ end
1405
+ # Set configuration settings for this course and version.
1406
+ # @param course_id
1407
+ # @param version_id The course version
1408
+ # @param configuration_settings
1409
+ # @param [Hash] opts the optional parameters
1410
+ # @return [nil]
1411
+ def set_course_version_configuration(course_id, version_id, configuration_settings, opts = {})
1412
+ set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts)
1413
+ nil
1414
+ end
1415
+
1416
+ # Set configuration settings for this course and version.
1417
+ # @param course_id
1418
+ # @param version_id The course version
1419
+ # @param configuration_settings
1420
+ # @param [Hash] opts the optional parameters
1421
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1422
+ def set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts = {})
1423
+ if @api_client.config.debugging
1424
+ @api_client.config.logger.debug 'Calling API: CourseApi.set_course_version_configuration ...'
1425
+ end
1426
+ # verify the required parameter 'course_id' is set
1427
+ if @api_client.config.client_side_validation && course_id.nil?
1428
+ fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_version_configuration"
1429
+ end
1430
+ # verify the required parameter 'version_id' is set
1431
+ if @api_client.config.client_side_validation && version_id.nil?
1432
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.set_course_version_configuration"
1433
+ end
1434
+ # verify the required parameter 'configuration_settings' is set
1435
+ if @api_client.config.client_side_validation && configuration_settings.nil?
1436
+ fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_version_configuration"
1437
+ end
1438
+ # resource path
1439
+ local_var_path = '/courses/{courseId}/versions/{versionId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)
1440
+
1441
+ # query parameters
1442
+ query_params = {}
1443
+
1444
+ # header parameters
1445
+ header_params = {}
1446
+ # HTTP header 'Accept' (if needed)
1447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1448
+ # HTTP header 'Content-Type'
1449
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1450
+
1451
+ # form parameters
1452
+ form_params = {}
1453
+
1454
+ # http body (model)
1455
+ post_body = @api_client.object_to_http_body(configuration_settings)
1456
+ auth_names = ['APP_NORMAL', 'OAUTH']
1457
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1458
+ :header_params => header_params,
1459
+ :query_params => query_params,
1460
+ :form_params => form_params,
1461
+ :body => post_body,
1462
+ :auth_names => auth_names)
1463
+ if @api_client.config.debugging
1464
+ @api_client.config.logger.debug "API called: CourseApi#set_course_version_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1465
+ end
1466
+ return data, status_code, headers
1467
+ end
1468
+ end
1469
+ end