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
data/docs/XapiScore.md ADDED
@@ -0,0 +1,11 @@
1
+ # RusticiSoftwareCloudV2::XapiScore
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **scaled** | **Float** | | [optional]
7
+ **raw** | **Float** | | [optional]
8
+ **min** | **Float** | | [optional]
9
+ **max** | **Float** | | [optional]
10
+
11
+
@@ -0,0 +1,20 @@
1
+ # RusticiSoftwareCloudV2::XapiStatement
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | | [optional]
7
+ **actor** | [**XapiAgentGroup**](XapiAgentGroup.md) | | [optional]
8
+ **verb** | [**XapiVerb**](XapiVerb.md) | | [optional]
9
+ **object_activity** | [**XapiActivity**](XapiActivity.md) | | [optional]
10
+ **object_agent_group** | [**XapiAgentGroup**](XapiAgentGroup.md) | | [optional]
11
+ **object_statement_reference** | [**XapiStatementReference**](XapiStatementReference.md) | | [optional]
12
+ **object_sub_statement** | [**XapiStatement**](XapiStatement.md) | | [optional]
13
+ **result** | [**XapiResult**](XapiResult.md) | | [optional]
14
+ **context** | [**XapiContext**](XapiContext.md) | | [optional]
15
+ **timestamp** | **DateTime** | | [optional]
16
+ **stored** | **DateTime** | | [optional]
17
+ **authority** | [**XapiAgentGroup**](XapiAgentGroup.md) | | [optional]
18
+ **attachments** | [**Array<XapiAttachment>**](XapiAttachment.md) | | [optional]
19
+
20
+
@@ -0,0 +1,9 @@
1
+ # RusticiSoftwareCloudV2::XapiStatementReference
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **object_type** | **String** | | [default to 'StatementRef']
7
+ **id** | **String** | |
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # RusticiSoftwareCloudV2::XapiStatementResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **statements** | [**Array<XapiStatement>**](XapiStatement.md) | |
7
+ **more** | **String** | | [optional]
8
+
9
+
data/docs/XapiVerb.md ADDED
@@ -0,0 +1,9 @@
1
+ # RusticiSoftwareCloudV2::XapiVerb
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | |
7
+ **display** | **Hash<String, String>** | | [optional]
8
+
9
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,116 @@
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
+ # Common files
14
+ require 'rustici_software_cloud_v2/api_client'
15
+ require 'rustici_software_cloud_v2/api_error'
16
+ require 'rustici_software_cloud_v2/version'
17
+ require 'rustici_software_cloud_v2/configuration'
18
+
19
+ # Models
20
+ require 'rustici_software_cloud_v2/models/activity_result_schema'
21
+ require 'rustici_software_cloud_v2/models/application_list_schema'
22
+ require 'rustici_software_cloud_v2/models/application_schema'
23
+ require 'rustici_software_cloud_v2/models/application_token'
24
+ require 'rustici_software_cloud_v2/models/comment_schema'
25
+ require 'rustici_software_cloud_v2/models/completion_amount_schema'
26
+ require 'rustici_software_cloud_v2/models/course_activity_schema'
27
+ require 'rustici_software_cloud_v2/models/course_list_non_paged_schema'
28
+ require 'rustici_software_cloud_v2/models/course_list_schema'
29
+ require 'rustici_software_cloud_v2/models/course_reference_schema'
30
+ require 'rustici_software_cloud_v2/models/course_schema'
31
+ require 'rustici_software_cloud_v2/models/course_tags_batch_schema'
32
+ require 'rustici_software_cloud_v2/models/create_registration_schema'
33
+ require 'rustici_software_cloud_v2/models/credential_created_schema'
34
+ require 'rustici_software_cloud_v2/models/credential_list_schema'
35
+ require 'rustici_software_cloud_v2/models/credential_request_schema'
36
+ require 'rustici_software_cloud_v2/models/credential_schema'
37
+ require 'rustici_software_cloud_v2/models/import_fetch_request_schema'
38
+ require 'rustici_software_cloud_v2/models/import_job_result_schema'
39
+ require 'rustici_software_cloud_v2/models/import_result_schema'
40
+ require 'rustici_software_cloud_v2/models/integer_result_schema'
41
+ require 'rustici_software_cloud_v2/models/item_value_pair_schema'
42
+ require 'rustici_software_cloud_v2/models/launch_history_list_schema'
43
+ require 'rustici_software_cloud_v2/models/launch_history_schema'
44
+ require 'rustici_software_cloud_v2/models/launch_link_request_schema'
45
+ require 'rustici_software_cloud_v2/models/launch_link_schema'
46
+ require 'rustici_software_cloud_v2/models/learner_preference_schema'
47
+ require 'rustici_software_cloud_v2/models/learner_schema'
48
+ require 'rustici_software_cloud_v2/models/link_schema'
49
+ require 'rustici_software_cloud_v2/models/message_schema'
50
+ require 'rustici_software_cloud_v2/models/metadata_schema'
51
+ require 'rustici_software_cloud_v2/models/objective_schema'
52
+ require 'rustici_software_cloud_v2/models/permissions_schema'
53
+ require 'rustici_software_cloud_v2/models/ping_schema'
54
+ require 'rustici_software_cloud_v2/models/post_back_schema'
55
+ require 'rustici_software_cloud_v2/models/registration_completion'
56
+ require 'rustici_software_cloud_v2/models/registration_list_schema'
57
+ require 'rustici_software_cloud_v2/models/registration_schema'
58
+ require 'rustici_software_cloud_v2/models/registration_success'
59
+ require 'rustici_software_cloud_v2/models/registration_tags_batch_schema'
60
+ require 'rustici_software_cloud_v2/models/response_error'
61
+ require 'rustici_software_cloud_v2/models/runtime_interaction_schema'
62
+ require 'rustici_software_cloud_v2/models/runtime_objective_schema'
63
+ require 'rustici_software_cloud_v2/models/runtime_schema'
64
+ require 'rustici_software_cloud_v2/models/score_schema'
65
+ require 'rustici_software_cloud_v2/models/setting_item'
66
+ require 'rustici_software_cloud_v2/models/setting_list_schema'
67
+ require 'rustici_software_cloud_v2/models/setting_metadata'
68
+ require 'rustici_software_cloud_v2/models/setting_valid_value'
69
+ require 'rustici_software_cloud_v2/models/settings_individual_schema'
70
+ require 'rustici_software_cloud_v2/models/settings_post_schema'
71
+ require 'rustici_software_cloud_v2/models/shared_data_entry_schema'
72
+ require 'rustici_software_cloud_v2/models/static_properties_schema'
73
+ require 'rustici_software_cloud_v2/models/string_result_schema'
74
+ require 'rustici_software_cloud_v2/models/tag_list_schema'
75
+ require 'rustici_software_cloud_v2/models/tag_post_schema'
76
+ require 'rustici_software_cloud_v2/models/title_schema'
77
+ require 'rustici_software_cloud_v2/models/token_request_schema'
78
+ require 'rustici_software_cloud_v2/models/xapi_account'
79
+ require 'rustici_software_cloud_v2/models/xapi_activity'
80
+ require 'rustici_software_cloud_v2/models/xapi_activity_definition'
81
+ require 'rustici_software_cloud_v2/models/xapi_agent_group'
82
+ require 'rustici_software_cloud_v2/models/xapi_attachment'
83
+ require 'rustici_software_cloud_v2/models/xapi_context'
84
+ require 'rustici_software_cloud_v2/models/xapi_context_activity'
85
+ require 'rustici_software_cloud_v2/models/xapi_interaction_component'
86
+ require 'rustici_software_cloud_v2/models/xapi_result'
87
+ require 'rustici_software_cloud_v2/models/xapi_score'
88
+ require 'rustici_software_cloud_v2/models/xapi_statement'
89
+ require 'rustici_software_cloud_v2/models/xapi_statement_reference'
90
+ require 'rustici_software_cloud_v2/models/xapi_statement_result'
91
+ require 'rustici_software_cloud_v2/models/xapi_verb'
92
+
93
+ # APIs
94
+ require 'rustici_software_cloud_v2/api/application_management_api'
95
+ require 'rustici_software_cloud_v2/api/authentication_api'
96
+ require 'rustici_software_cloud_v2/api/course_api'
97
+ require 'rustici_software_cloud_v2/api/ping_api'
98
+ require 'rustici_software_cloud_v2/api/registration_api'
99
+
100
+ module RusticiSoftwareCloudV2
101
+ class << self
102
+ # Customize default settings for the SDK using block.
103
+ # RusticiSoftwareCloudV2.configure do |config|
104
+ # config.username = "xxx"
105
+ # config.password = "xxx"
106
+ # end
107
+ # If no block given, return the default Configuration object.
108
+ def configure
109
+ if block_given?
110
+ yield(Configuration.default)
111
+ else
112
+ Configuration.default
113
+ end
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,574 @@
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 ApplicationManagementApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a new application
23
+ # @param application_name
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [ApplicationSchema]
26
+ def create_application(application_name, opts = {})
27
+ data, _status_code, _headers = create_application_with_http_info(application_name, opts)
28
+ data
29
+ end
30
+
31
+ # Create a new application
32
+ # @param application_name
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(ApplicationSchema, Fixnum, Hash)>] ApplicationSchema data, response status code and response headers
35
+ def create_application_with_http_info(application_name, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.create_application ...'
38
+ end
39
+ # verify the required parameter 'application_name' is set
40
+ if @api_client.config.client_side_validation && application_name.nil?
41
+ fail ArgumentError, "Missing the required parameter 'application_name' when calling ApplicationManagementApi.create_application"
42
+ end
43
+ # resource path
44
+ local_var_path = '/appManagement/applications/{applicationName}'.sub('{' + 'applicationName' + '}', application_name.to_s)
45
+
46
+ # query parameters
47
+ query_params = {}
48
+
49
+ # header parameters
50
+ header_params = {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+ # HTTP header 'Content-Type'
54
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = {}
58
+
59
+ # http body (model)
60
+ post_body = nil
61
+ auth_names = ['APP_NORMAL', 'OAUTH']
62
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names,
68
+ :return_type => 'ApplicationSchema')
69
+ if @api_client.config.debugging
70
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#create_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ end
72
+ return data, status_code, headers
73
+ end
74
+ # Create credential
75
+ # @param child_app_id
76
+ # @param credential_request
77
+ # @param [Hash] opts the optional parameters
78
+ # @return [CredentialCreatedSchema]
79
+ def create_credential(child_app_id, credential_request, opts = {})
80
+ data, _status_code, _headers = create_credential_with_http_info(child_app_id, credential_request, opts)
81
+ data
82
+ end
83
+
84
+ # Create credential
85
+ # @param child_app_id
86
+ # @param credential_request
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [Array<(CredentialCreatedSchema, Fixnum, Hash)>] CredentialCreatedSchema data, response status code and response headers
89
+ def create_credential_with_http_info(child_app_id, credential_request, opts = {})
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.create_credential ...'
92
+ end
93
+ # verify the required parameter 'child_app_id' is set
94
+ if @api_client.config.client_side_validation && child_app_id.nil?
95
+ fail ArgumentError, "Missing the required parameter 'child_app_id' when calling ApplicationManagementApi.create_credential"
96
+ end
97
+ # verify the required parameter 'credential_request' is set
98
+ if @api_client.config.client_side_validation && credential_request.nil?
99
+ fail ArgumentError, "Missing the required parameter 'credential_request' when calling ApplicationManagementApi.create_credential"
100
+ end
101
+ # resource path
102
+ local_var_path = '/appManagement/{childAppId}/credentials'.sub('{' + 'childAppId' + '}', child_app_id.to_s)
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = @api_client.object_to_http_body(credential_request)
119
+ auth_names = ['APP_NORMAL', 'OAUTH']
120
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'CredentialCreatedSchema')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#create_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+ # Create token
133
+ # Creates, signs and returns a token based on the provided permissions, if the credentials used to request the token have the permissions being requested. Note: the token is not stored and therefore can not be modified or deleted. The requested permissions are encoded in the token which is then signed. As long as the secret used to create it is not changed the token will be valid until it expires.
134
+ # @param token_request
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [StringResultSchema]
137
+ def create_token(token_request, opts = {})
138
+ data, _status_code, _headers = create_token_with_http_info(token_request, opts)
139
+ data
140
+ end
141
+
142
+ # Create token
143
+ # Creates, signs and returns a token based on the provided permissions, if the credentials used to request the token have the permissions being requested. Note: the token is not stored and therefore can not be modified or deleted. The requested permissions are encoded in the token which is then signed. As long as the secret used to create it is not changed the token will be valid until it expires.
144
+ # @param token_request
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [Array<(StringResultSchema, Fixnum, Hash)>] StringResultSchema data, response status code and response headers
147
+ def create_token_with_http_info(token_request, opts = {})
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.create_token ...'
150
+ end
151
+ # verify the required parameter 'token_request' is set
152
+ if @api_client.config.client_side_validation && token_request.nil?
153
+ fail ArgumentError, "Missing the required parameter 'token_request' when calling ApplicationManagementApi.create_token"
154
+ end
155
+ # resource path
156
+ local_var_path = '/appManagement/token'
157
+
158
+ # query parameters
159
+ query_params = {}
160
+
161
+ # header parameters
162
+ header_params = {}
163
+ # HTTP header 'Accept' (if needed)
164
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
165
+ # HTTP header 'Content-Type'
166
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
167
+
168
+ # form parameters
169
+ form_params = {}
170
+
171
+ # http body (model)
172
+ post_body = @api_client.object_to_http_body(token_request)
173
+ auth_names = ['APP_NORMAL']
174
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
175
+ :header_params => header_params,
176
+ :query_params => query_params,
177
+ :form_params => form_params,
178
+ :body => post_body,
179
+ :auth_names => auth_names,
180
+ :return_type => 'StringResultSchema')
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ return data, status_code, headers
185
+ end
186
+ # Delete an application. If the application contains content, it must first be manually removed before calling this method, else an error will be thrown.
187
+ # @param child_app_id
188
+ # @param [Hash] opts the optional parameters
189
+ # @return [nil]
190
+ def delete_application(child_app_id, opts = {})
191
+ delete_application_with_http_info(child_app_id, opts)
192
+ nil
193
+ end
194
+
195
+ # Delete an application. If the application contains content, it must first be manually removed before calling this method, else an error will be thrown.
196
+ # @param child_app_id
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
199
+ def delete_application_with_http_info(child_app_id, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.delete_application ...'
202
+ end
203
+ # verify the required parameter 'child_app_id' is set
204
+ if @api_client.config.client_side_validation && child_app_id.nil?
205
+ fail ArgumentError, "Missing the required parameter 'child_app_id' when calling ApplicationManagementApi.delete_application"
206
+ end
207
+ # resource path
208
+ local_var_path = '/appManagement/applications/{childAppId}'.sub('{' + 'childAppId' + '}', child_app_id.to_s)
209
+
210
+ # query parameters
211
+ query_params = {}
212
+
213
+ # header parameters
214
+ header_params = {}
215
+ # HTTP header 'Accept' (if needed)
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
217
+ # HTTP header 'Content-Type'
218
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
219
+
220
+ # form parameters
221
+ form_params = {}
222
+
223
+ # http body (model)
224
+ post_body = nil
225
+ auth_names = ['APP_NORMAL', 'OAUTH']
226
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#delete_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+ # Removes `credentialId` credentials
238
+ # @param child_app_id
239
+ # @param credential_id
240
+ # @param [Hash] opts the optional parameters
241
+ # @return [nil]
242
+ def delete_credential(child_app_id, credential_id, opts = {})
243
+ delete_credential_with_http_info(child_app_id, credential_id, opts)
244
+ nil
245
+ end
246
+
247
+ # Removes &#x60;credentialId&#x60; credentials
248
+ # @param child_app_id
249
+ # @param credential_id
250
+ # @param [Hash] opts the optional parameters
251
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
252
+ def delete_credential_with_http_info(child_app_id, credential_id, opts = {})
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.delete_credential ...'
255
+ end
256
+ # verify the required parameter 'child_app_id' is set
257
+ if @api_client.config.client_side_validation && child_app_id.nil?
258
+ fail ArgumentError, "Missing the required parameter 'child_app_id' when calling ApplicationManagementApi.delete_credential"
259
+ end
260
+ # verify the required parameter 'credential_id' is set
261
+ if @api_client.config.client_side_validation && credential_id.nil?
262
+ fail ArgumentError, "Missing the required parameter 'credential_id' when calling ApplicationManagementApi.delete_credential"
263
+ end
264
+ # resource path
265
+ local_var_path = '/appManagement/{childAppId}/credentials/{credentialId}'.sub('{' + 'childAppId' + '}', child_app_id.to_s).sub('{' + 'credentialId' + '}', credential_id.to_s)
266
+
267
+ # query parameters
268
+ query_params = {}
269
+
270
+ # header parameters
271
+ header_params = {}
272
+ # HTTP header 'Accept' (if needed)
273
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
274
+ # HTTP header 'Content-Type'
275
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
276
+
277
+ # form parameters
278
+ form_params = {}
279
+
280
+ # http body (model)
281
+ post_body = nil
282
+ auth_names = ['APP_NORMAL', 'OAUTH']
283
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
284
+ :header_params => header_params,
285
+ :query_params => query_params,
286
+ :form_params => form_params,
287
+ :body => post_body,
288
+ :auth_names => auth_names)
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#delete_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
+ end
292
+ return data, status_code, headers
293
+ end
294
+ # Returns all configuration settings for this level
295
+ # @param [Hash] opts the optional parameters
296
+ # @option opts [String] :learning_standard If specified, the request will be scoped to the provided learning standard.
297
+ # @option opts [BOOLEAN] :single_sco Required if learningStandard is specified. Scopes settings to whether a package has only one SCO or assignable unit within it or not. To apply a configuration setting to a learning standard for single and multi-SCO content, it must be set for both scopes.
298
+ # @option opts [BOOLEAN] :include_metadata (default to false)
299
+ # @return [SettingListSchema]
300
+ def get_application_configuration(opts = {})
301
+ data, _status_code, _headers = get_application_configuration_with_http_info(opts)
302
+ data
303
+ end
304
+
305
+ # Returns all configuration settings for this level
306
+ # @param [Hash] opts the optional parameters
307
+ # @option opts [String] :learning_standard If specified, the request will be scoped to the provided learning standard.
308
+ # @option opts [BOOLEAN] :single_sco Required if learningStandard is specified. Scopes settings to whether a package has only one SCO or assignable unit within it or not. To apply a configuration setting to a learning standard for single and multi-SCO content, it must be set for both scopes.
309
+ # @option opts [BOOLEAN] :include_metadata
310
+ # @return [Array<(SettingListSchema, Fixnum, Hash)>] SettingListSchema data, response status code and response headers
311
+ def get_application_configuration_with_http_info(opts = {})
312
+ if @api_client.config.debugging
313
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.get_application_configuration ...'
314
+ end
315
+ if @api_client.config.client_side_validation && opts[:'learning_standard'] && !['SCORM_11', 'SCORM_12', 'SCORM_2004_2ND_EDITION', 'SCORM_2004_3RD_EDITION', 'SCORM_2004_4TH_EDITION', 'AICC', 'XAPI', 'CMI5'].include?(opts[:'learning_standard'])
316
+ fail ArgumentError, 'invalid value for "learning_standard", must be one of SCORM_11, SCORM_12, SCORM_2004_2ND_EDITION, SCORM_2004_3RD_EDITION, SCORM_2004_4TH_EDITION, AICC, XAPI, CMI5'
317
+ end
318
+ # resource path
319
+ local_var_path = '/appManagement/configuration'
320
+
321
+ # query parameters
322
+ query_params = {}
323
+ query_params[:'learningStandard'] = opts[:'learning_standard'] if !opts[:'learning_standard'].nil?
324
+ query_params[:'singleSco'] = opts[:'single_sco'] if !opts[:'single_sco'].nil?
325
+ query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil?
326
+
327
+ # header parameters
328
+ header_params = {}
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
331
+ # HTTP header 'Content-Type'
332
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
333
+
334
+ # form parameters
335
+ form_params = {}
336
+
337
+ # http body (model)
338
+ post_body = nil
339
+ auth_names = ['APP_NORMAL', 'OAUTH']
340
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
341
+ :header_params => header_params,
342
+ :query_params => query_params,
343
+ :form_params => form_params,
344
+ :body => post_body,
345
+ :auth_names => auth_names,
346
+ :return_type => 'SettingListSchema')
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#get_application_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ end
350
+ return data, status_code, headers
351
+ end
352
+ # Get list of all applications in this realm.
353
+ # @param [Hash] opts the optional parameters
354
+ # @return [ApplicationListSchema]
355
+ def get_application_list(opts = {})
356
+ data, _status_code, _headers = get_application_list_with_http_info(opts)
357
+ data
358
+ end
359
+
360
+ # Get list of all applications in this realm.
361
+ # @param [Hash] opts the optional parameters
362
+ # @return [Array<(ApplicationListSchema, Fixnum, Hash)>] ApplicationListSchema data, response status code and response headers
363
+ def get_application_list_with_http_info(opts = {})
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.get_application_list ...'
366
+ end
367
+ # resource path
368
+ local_var_path = '/appManagement/applications'
369
+
370
+ # query parameters
371
+ query_params = {}
372
+
373
+ # header parameters
374
+ header_params = {}
375
+ # HTTP header 'Accept' (if needed)
376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
377
+ # HTTP header 'Content-Type'
378
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
379
+
380
+ # form parameters
381
+ form_params = {}
382
+
383
+ # http body (model)
384
+ post_body = nil
385
+ auth_names = ['APP_NORMAL', 'OAUTH']
386
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
387
+ :header_params => header_params,
388
+ :query_params => query_params,
389
+ :form_params => form_params,
390
+ :body => post_body,
391
+ :auth_names => auth_names,
392
+ :return_type => 'ApplicationListSchema')
393
+ if @api_client.config.debugging
394
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#get_application_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
395
+ end
396
+ return data, status_code, headers
397
+ end
398
+ # List of credentials
399
+ # @param child_app_id
400
+ # @param [Hash] opts the optional parameters
401
+ # @return [CredentialListSchema]
402
+ def get_credentials(child_app_id, opts = {})
403
+ data, _status_code, _headers = get_credentials_with_http_info(child_app_id, opts)
404
+ data
405
+ end
406
+
407
+ # List of credentials
408
+ # @param child_app_id
409
+ # @param [Hash] opts the optional parameters
410
+ # @return [Array<(CredentialListSchema, Fixnum, Hash)>] CredentialListSchema data, response status code and response headers
411
+ def get_credentials_with_http_info(child_app_id, opts = {})
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.get_credentials ...'
414
+ end
415
+ # verify the required parameter 'child_app_id' is set
416
+ if @api_client.config.client_side_validation && child_app_id.nil?
417
+ fail ArgumentError, "Missing the required parameter 'child_app_id' when calling ApplicationManagementApi.get_credentials"
418
+ end
419
+ # resource path
420
+ local_var_path = '/appManagement/{childAppId}/credentials'.sub('{' + 'childAppId' + '}', child_app_id.to_s)
421
+
422
+ # query parameters
423
+ query_params = {}
424
+
425
+ # header parameters
426
+ header_params = {}
427
+ # HTTP header 'Accept' (if needed)
428
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
429
+ # HTTP header 'Content-Type'
430
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
431
+
432
+ # form parameters
433
+ form_params = {}
434
+
435
+ # http body (model)
436
+ post_body = nil
437
+ auth_names = ['APP_NORMAL', 'OAUTH']
438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
439
+ :header_params => header_params,
440
+ :query_params => query_params,
441
+ :form_params => form_params,
442
+ :body => post_body,
443
+ :auth_names => auth_names,
444
+ :return_type => 'CredentialListSchema')
445
+ if @api_client.config.debugging
446
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#get_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
+ end
448
+ return data, status_code, headers
449
+ end
450
+ # Set configuration settings for this level.
451
+ # @param configuration_settings
452
+ # @param [Hash] opts the optional parameters
453
+ # @option opts [String] :learning_standard If specified, the request will be scoped to the provided learning standard.
454
+ # @option opts [BOOLEAN] :single_sco Required if learningStandard is specified. Scopes settings to whether a package has only one SCO or assignable unit within it or not. To apply a configuration setting to a learning standard for single and multi-SCO content, it must be set for both scopes.
455
+ # @return [nil]
456
+ def set_application_configuration(configuration_settings, opts = {})
457
+ set_application_configuration_with_http_info(configuration_settings, opts)
458
+ nil
459
+ end
460
+
461
+ # Set configuration settings for this level.
462
+ # @param configuration_settings
463
+ # @param [Hash] opts the optional parameters
464
+ # @option opts [String] :learning_standard If specified, the request will be scoped to the provided learning standard.
465
+ # @option opts [BOOLEAN] :single_sco Required if learningStandard is specified. Scopes settings to whether a package has only one SCO or assignable unit within it or not. To apply a configuration setting to a learning standard for single and multi-SCO content, it must be set for both scopes.
466
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
467
+ def set_application_configuration_with_http_info(configuration_settings, opts = {})
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.set_application_configuration ...'
470
+ end
471
+ # verify the required parameter 'configuration_settings' is set
472
+ if @api_client.config.client_side_validation && configuration_settings.nil?
473
+ fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling ApplicationManagementApi.set_application_configuration"
474
+ end
475
+ if @api_client.config.client_side_validation && opts[:'learning_standard'] && !['SCORM_11', 'SCORM_12', 'SCORM_2004_2ND_EDITION', 'SCORM_2004_3RD_EDITION', 'SCORM_2004_4TH_EDITION', 'AICC', 'XAPI', 'CMI5'].include?(opts[:'learning_standard'])
476
+ fail ArgumentError, 'invalid value for "learning_standard", must be one of SCORM_11, SCORM_12, SCORM_2004_2ND_EDITION, SCORM_2004_3RD_EDITION, SCORM_2004_4TH_EDITION, AICC, XAPI, CMI5'
477
+ end
478
+ # resource path
479
+ local_var_path = '/appManagement/configuration'
480
+
481
+ # query parameters
482
+ query_params = {}
483
+ query_params[:'learningStandard'] = opts[:'learning_standard'] if !opts[:'learning_standard'].nil?
484
+ query_params[:'singleSco'] = opts[:'single_sco'] if !opts[:'single_sco'].nil?
485
+
486
+ # header parameters
487
+ header_params = {}
488
+ # HTTP header 'Accept' (if needed)
489
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
490
+ # HTTP header 'Content-Type'
491
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
492
+
493
+ # form parameters
494
+ form_params = {}
495
+
496
+ # http body (model)
497
+ post_body = @api_client.object_to_http_body(configuration_settings)
498
+ auth_names = ['APP_NORMAL', 'OAUTH']
499
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
500
+ :header_params => header_params,
501
+ :query_params => query_params,
502
+ :form_params => form_params,
503
+ :body => post_body,
504
+ :auth_names => auth_names)
505
+ if @api_client.config.debugging
506
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#set_application_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
507
+ end
508
+ return data, status_code, headers
509
+ end
510
+ # Update the name or status associated with `credentialId`
511
+ # @param child_app_id
512
+ # @param credential_id
513
+ # @param credential_update
514
+ # @param [Hash] opts the optional parameters
515
+ # @return [nil]
516
+ def update_credential(child_app_id, credential_id, credential_update, opts = {})
517
+ update_credential_with_http_info(child_app_id, credential_id, credential_update, opts)
518
+ nil
519
+ end
520
+
521
+ # Update the name or status associated with &#x60;credentialId&#x60;
522
+ # @param child_app_id
523
+ # @param credential_id
524
+ # @param credential_update
525
+ # @param [Hash] opts the optional parameters
526
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
527
+ def update_credential_with_http_info(child_app_id, credential_id, credential_update, opts = {})
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug 'Calling API: ApplicationManagementApi.update_credential ...'
530
+ end
531
+ # verify the required parameter 'child_app_id' is set
532
+ if @api_client.config.client_side_validation && child_app_id.nil?
533
+ fail ArgumentError, "Missing the required parameter 'child_app_id' when calling ApplicationManagementApi.update_credential"
534
+ end
535
+ # verify the required parameter 'credential_id' is set
536
+ if @api_client.config.client_side_validation && credential_id.nil?
537
+ fail ArgumentError, "Missing the required parameter 'credential_id' when calling ApplicationManagementApi.update_credential"
538
+ end
539
+ # verify the required parameter 'credential_update' is set
540
+ if @api_client.config.client_side_validation && credential_update.nil?
541
+ fail ArgumentError, "Missing the required parameter 'credential_update' when calling ApplicationManagementApi.update_credential"
542
+ end
543
+ # resource path
544
+ local_var_path = '/appManagement/{childAppId}/credentials/{credentialId}'.sub('{' + 'childAppId' + '}', child_app_id.to_s).sub('{' + 'credentialId' + '}', credential_id.to_s)
545
+
546
+ # query parameters
547
+ query_params = {}
548
+
549
+ # header parameters
550
+ header_params = {}
551
+ # HTTP header 'Accept' (if needed)
552
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
553
+ # HTTP header 'Content-Type'
554
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
555
+
556
+ # form parameters
557
+ form_params = {}
558
+
559
+ # http body (model)
560
+ post_body = @api_client.object_to_http_body(credential_update)
561
+ auth_names = ['APP_NORMAL', 'OAUTH']
562
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
563
+ :header_params => header_params,
564
+ :query_params => query_params,
565
+ :form_params => form_params,
566
+ :body => post_body,
567
+ :auth_names => auth_names)
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug "API called: ApplicationManagementApi#update_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
570
+ end
571
+ return data, status_code, headers
572
+ end
573
+ end
574
+ end