rustici_software_cloud_v2 1.0.0beta → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/README.md +354 -243
- data/lib/rustici_software_cloud_v2/api/about_api.rb +71 -0
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +253 -63
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +11 -17
- data/lib/rustici_software_cloud_v2/api/course_api.rb +910 -160
- data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +2236 -0
- data/lib/rustici_software_cloud_v2/api/invitations_api.rb +1025 -0
- data/lib/rustici_software_cloud_v2/api/learner_api.rb +367 -0
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +6 -4
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +448 -295
- data/lib/rustici_software_cloud_v2/api/reporting_api.rb +191 -0
- data/lib/rustici_software_cloud_v2/api/xapi_api.rb +581 -0
- data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +528 -0
- data/lib/rustici_software_cloud_v2/api_client.rb +5 -5
- data/lib/rustici_software_cloud_v2/api_error.rb +2 -2
- data/lib/rustici_software_cloud_v2/configuration.rb +11 -20
- data/lib/rustici_software_cloud_v2/models/about_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/application_info_schema.rb +234 -0
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/{link_schema.rb → application_request_schema.rb} +14 -16
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/application_token.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/asset_file_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/{course_tags_batch_schema.rb → batch_tags_schema.rb} +21 -17
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +6 -3
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/{registration_tags_batch_schema.rb → create_dispatch_id_schema.rb} +25 -25
- data/lib/rustici_software_cloud_v2/models/create_dispatch_list_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +306 -0
- data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +250 -0
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/destination_schema.rb +227 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +197 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_lti_info_schema.rb +221 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +326 -0
- data/lib/rustici_software_cloud_v2/models/{tag_post_schema.rb → enabled_schema.rb} +17 -6
- data/lib/rustici_software_cloud_v2/models/file_list_item_schema.rb +205 -0
- data/lib/rustici_software_cloud_v2/models/file_list_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/import_asset_request_schema.rb +207 -0
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +31 -8
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/import_media_file_reference_request_schema.rb +216 -0
- data/lib/rustici_software_cloud_v2/models/import_request_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +226 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +225 -0
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/launch_auth_options_schema.rb +212 -0
- data/lib/rustici_software_cloud_v2/models/launch_auth_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +25 -9
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/media_file_metadata_schema.rb +213 -0
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +12 -10
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +13 -45
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +21 -15
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +24 -42
- data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +264 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_update_schema.rb +215 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +287 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_update_schema.rb +228 -0
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +2 -2
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +6 -3
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +17 -4
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +2 -2
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +257 -0
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +212 -0
- data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/response_error.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/update_application_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +234 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +213 -0
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +255 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_put_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +264 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credentials_list_schema.rb +202 -0
- data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +203 -0
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +192 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/version.rb +3 -3
- data/lib/rustici_software_cloud_v2.rb +68 -6
- data/rustici_software_cloud_v2.gemspec +8 -7
- data/spec/api_client_spec.rb +53 -47
- data/spec/configuration_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -13
- metadata +142 -270
- data/docs/ActivityResultSchema.md +0 -20
- data/docs/ApplicationListSchema.md +0 -8
- data/docs/ApplicationManagementApi.md +0 -570
- data/docs/ApplicationSchema.md +0 -9
- data/docs/ApplicationToken.md +0 -10
- data/docs/AuthenticationApi.md +0 -64
- data/docs/CommentSchema.md +0 -10
- data/docs/CompletionAmountSchema.md +0 -8
- data/docs/CourseActivitySchema.md +0 -15
- data/docs/CourseApi.md +0 -1459
- data/docs/CourseListNonPagedSchema.md +0 -8
- data/docs/CourseListSchema.md +0 -9
- data/docs/CourseReferenceSchema.md +0 -10
- data/docs/CourseSchema.md +0 -20
- data/docs/CourseTagsBatchSchema.md +0 -9
- data/docs/CreateRegistrationSchema.md +0 -17
- data/docs/CredentialCreatedSchema.md +0 -12
- data/docs/CredentialListSchema.md +0 -8
- data/docs/CredentialRequestSchema.md +0 -9
- data/docs/CredentialSchema.md +0 -12
- data/docs/ImportFetchRequestSchema.md +0 -8
- data/docs/ImportJobResultSchema.md +0 -11
- data/docs/ImportResultSchema.md +0 -11
- data/docs/IntegerResultSchema.md +0 -8
- data/docs/ItemValuePairSchema.md +0 -9
- data/docs/LaunchHistoryListSchema.md +0 -8
- data/docs/LaunchHistorySchema.md +0 -17
- data/docs/LaunchLinkRequestSchema.md +0 -17
- data/docs/LaunchLinkSchema.md +0 -8
- data/docs/LearnerPreferenceSchema.md +0 -11
- data/docs/LearnerSchema.md +0 -11
- data/docs/LinkSchema.md +0 -8
- data/docs/MessageSchema.md +0 -8
- data/docs/MetadataSchema.md +0 -14
- data/docs/ObjectiveSchema.md +0 -20
- data/docs/PermissionsSchema.md +0 -9
- data/docs/PingApi.md +0 -57
- data/docs/PingSchema.md +0 -8
- data/docs/PostBackSchema.md +0 -12
- data/docs/RegistrationApi.md +0 -1490
- data/docs/RegistrationCompletion.md +0 -7
- data/docs/RegistrationListSchema.md +0 -9
- data/docs/RegistrationSchema.md +0 -27
- data/docs/RegistrationSuccess.md +0 -7
- data/docs/RegistrationTagsBatchSchema.md +0 -9
- data/docs/ResponseError.md +0 -8
- data/docs/RuntimeInteractionSchema.md +0 -18
- data/docs/RuntimeObjectiveSchema.md +0 -16
- data/docs/RuntimeSchema.md +0 -27
- data/docs/ScoreSchema.md +0 -8
- data/docs/SettingItem.md +0 -12
- data/docs/SettingListSchema.md +0 -8
- data/docs/SettingMetadata.md +0 -15
- data/docs/SettingMetadataValidValues.md +0 -9
- data/docs/SettingValidValue.md +0 -9
- data/docs/SettingsIndividualSchema.md +0 -10
- data/docs/SettingsPostSchema.md +0 -8
- data/docs/SharedDataEntrySchema.md +0 -9
- data/docs/StaticPropertiesSchema.md +0 -13
- data/docs/StringResultSchema.md +0 -8
- data/docs/TagListSchema.md +0 -8
- data/docs/TagPostSchema.md +0 -7
- data/docs/TitleSchema.md +0 -8
- data/docs/TokenRequestSchema.md +0 -9
- data/docs/XapiAccount.md +0 -9
- data/docs/XapiActivity.md +0 -10
- data/docs/XapiActivityDefinition.md +0 -19
- data/docs/XapiAgentGroup.md +0 -14
- data/docs/XapiAttachment.md +0 -14
- data/docs/XapiContext.md +0 -16
- data/docs/XapiContextActivity.md +0 -11
- data/docs/XapiInteractionComponent.md +0 -9
- data/docs/XapiResult.md +0 -13
- data/docs/XapiScore.md +0 -11
- data/docs/XapiStatement.md +0 -20
- data/docs/XapiStatementReference.md +0 -9
- data/docs/XapiStatementResult.md +0 -9
- data/docs/XapiVerb.md +0 -9
- data/git_push.sh +0 -55
- data/lib/rustici_software_cloud_v2/models/setting_metadata_valid_values.rb +0 -209
- data/spec/models/activity_result_schema_spec.rb +0 -133
- data/spec/models/application_list_schema_spec.rb +0 -53
- data/spec/models/application_schema_spec.rb +0 -59
- data/spec/models/application_token_spec.rb +0 -65
- data/spec/models/comment_schema_spec.rb +0 -65
- data/spec/models/completion_amount_schema_spec.rb +0 -53
- data/spec/models/course_activity_schema_spec.rb +0 -99
- data/spec/models/course_list_non_paged_schema_spec.rb +0 -53
- data/spec/models/course_list_schema_spec.rb +0 -59
- data/spec/models/course_reference_schema_spec.rb +0 -65
- data/spec/models/course_schema_spec.rb +0 -129
- data/spec/models/create_registration_schema_spec.rb +0 -107
- data/spec/models/credential_created_schema_spec.rb +0 -77
- data/spec/models/credential_list_schema_spec.rb +0 -53
- data/spec/models/credential_request_schema_spec.rb +0 -59
- data/spec/models/credential_schema_spec.rb +0 -77
- data/spec/models/import_fetch_request_schema_spec.rb +0 -53
- data/spec/models/import_job_result_schema_spec.rb +0 -75
- data/spec/models/import_result_schema_spec.rb +0 -71
- data/spec/models/integer_result_schema_spec.rb +0 -53
- data/spec/models/item_value_pair_schema_spec.rb +0 -59
- data/spec/models/launch_history_list_schema_spec.rb +0 -53
- data/spec/models/launch_history_schema_spec.rb +0 -115
- data/spec/models/launch_link_request_schema_spec.rb +0 -107
- data/spec/models/launch_link_schema_spec.rb +0 -53
- data/spec/models/learner_preference_schema_spec.rb +0 -71
- data/spec/models/learner_schema_spec.rb +0 -71
- data/spec/models/link_schema_spec.rb +0 -53
- data/spec/models/message_schema_spec.rb +0 -53
- data/spec/models/metadata_schema_spec.rb +0 -89
- data/spec/models/objective_schema_spec.rb +0 -137
- data/spec/models/permissions_schema_spec.rb +0 -59
- data/spec/models/ping_schema_spec.rb +0 -53
- data/spec/models/post_back_schema_spec.rb +0 -85
- data/spec/models/registration_completion_spec.rb +0 -47
- data/spec/models/registration_list_schema_spec.rb +0 -59
- data/spec/models/registration_schema_spec.rb +0 -167
- data/spec/models/registration_success_spec.rb +0 -47
- data/spec/models/response_error_spec.rb +0 -53
- data/spec/models/runtime_interaction_schema_spec.rb +0 -117
- data/spec/models/runtime_objective_schema_spec.rb +0 -109
- data/spec/models/runtime_schema_spec.rb +0 -171
- data/spec/models/score_schema_spec.rb +0 -53
- data/spec/models/setting_item_spec.rb +0 -81
- data/spec/models/setting_list_schema_spec.rb +0 -53
- data/spec/models/setting_metadata_spec.rb +0 -99
- data/spec/models/setting_metadata_valid_values_spec.rb +0 -59
- data/spec/models/settings_individual_schema_spec.rb +0 -65
- data/spec/models/settings_post_schema_spec.rb +0 -53
- data/spec/models/shared_data_entry_schema_spec.rb +0 -59
- data/spec/models/static_properties_schema_spec.rb +0 -83
- data/spec/models/string_result_schema_spec.rb +0 -53
- data/spec/models/title_schema_spec.rb +0 -53
- data/spec/models/token_request_schema_spec.rb +0 -59
- data/swagger-codegen.config +0 -11
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SCORM Cloud Rest API
|
|
3
|
+
|
|
4
|
+
#REST API used for SCORM Cloud integrations.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module RusticiSoftwareCloudV2
|
|
16
|
+
class ZoomiCourseOptionsSchema
|
|
17
|
+
attr_accessor :nti
|
|
18
|
+
|
|
19
|
+
attr_accessor :cta
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'nti' => :'nti',
|
|
25
|
+
:'cta' => :'cta'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
:'nti' => :'String',
|
|
33
|
+
:'cta' => :'String'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Initializes the object
|
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
|
+
def initialize(attributes = {})
|
|
40
|
+
return unless attributes.is_a?(Hash)
|
|
41
|
+
|
|
42
|
+
# convert string to symbol for hash key
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
44
|
+
|
|
45
|
+
if attributes.has_key?(:'nti')
|
|
46
|
+
self.nti = attributes[:'nti']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'cta')
|
|
50
|
+
self.cta = attributes[:'cta']
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
55
|
+
# @return Array for valid properties with the reasons
|
|
56
|
+
def list_invalid_properties
|
|
57
|
+
invalid_properties = Array.new
|
|
58
|
+
if @nti.nil?
|
|
59
|
+
invalid_properties.push('invalid value for "nti", nti cannot be nil.')
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if @cta.nil?
|
|
63
|
+
invalid_properties.push('invalid value for "cta", cta cannot be nil.')
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
invalid_properties
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Check to see if the all the properties in the model are valid
|
|
70
|
+
# @return true if the model is valid
|
|
71
|
+
def valid?
|
|
72
|
+
return false if @nti.nil?
|
|
73
|
+
return false if @cta.nil?
|
|
74
|
+
true
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# Checks equality by comparing each attribute.
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def ==(o)
|
|
81
|
+
return true if self.equal?(o)
|
|
82
|
+
self.class == o.class &&
|
|
83
|
+
nti == o.nti &&
|
|
84
|
+
cta == o.cta
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @see the `==` method
|
|
88
|
+
# @param [Object] Object to be compared
|
|
89
|
+
def eql?(o)
|
|
90
|
+
self == o
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Calculates hash code according to all attributes.
|
|
94
|
+
# @return [Fixnum] Hash code
|
|
95
|
+
def hash
|
|
96
|
+
[nti, cta].hash
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Builds the object from hash
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
# @return [Object] Returns the model itself
|
|
102
|
+
def build_from_hash(attributes)
|
|
103
|
+
return nil unless attributes.is_a?(Hash)
|
|
104
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
105
|
+
if type =~ /\AArray<(.*)>/i
|
|
106
|
+
# check to ensure the input is an array given that the attribute
|
|
107
|
+
# is documented as an array but the input is not
|
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
109
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
110
|
+
end
|
|
111
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
112
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
113
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
self
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Deserializes the data based on type
|
|
120
|
+
# @param string type Data type
|
|
121
|
+
# @param string value Value to be deserialized
|
|
122
|
+
# @return [Object] Deserialized data
|
|
123
|
+
def _deserialize(type, value)
|
|
124
|
+
case type.to_sym
|
|
125
|
+
when :DateTime
|
|
126
|
+
DateTime.parse(value)
|
|
127
|
+
when :Date
|
|
128
|
+
Date.parse(value)
|
|
129
|
+
when :String
|
|
130
|
+
value.to_s
|
|
131
|
+
when :Integer
|
|
132
|
+
value.to_i
|
|
133
|
+
when :Float
|
|
134
|
+
value.to_f
|
|
135
|
+
when :BOOLEAN
|
|
136
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
137
|
+
true
|
|
138
|
+
else
|
|
139
|
+
false
|
|
140
|
+
end
|
|
141
|
+
when :Object
|
|
142
|
+
# generic object (usually a Hash), return directly
|
|
143
|
+
value
|
|
144
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
145
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
146
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
147
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
148
|
+
k_type = Regexp.last_match[:k_type]
|
|
149
|
+
v_type = Regexp.last_match[:v_type]
|
|
150
|
+
{}.tap do |hash|
|
|
151
|
+
value.each do |k, v|
|
|
152
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
else # model
|
|
156
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
|
157
|
+
temp_model.build_from_hash(value)
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Returns the string representation of the object
|
|
162
|
+
# @return [String] String presentation of the object
|
|
163
|
+
def to_s
|
|
164
|
+
to_hash.to_s
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
|
169
|
+
def to_body
|
|
170
|
+
to_hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the object in the form of hash
|
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
|
175
|
+
def to_hash
|
|
176
|
+
hash = {}
|
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
178
|
+
value = self.send(attr)
|
|
179
|
+
next if value.nil?
|
|
180
|
+
hash[param] = _to_hash(value)
|
|
181
|
+
end
|
|
182
|
+
hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Outputs non-array value in the form of hash
|
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
187
|
+
# @param [Object] value Any valid value
|
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
|
189
|
+
def _to_hash(value)
|
|
190
|
+
if value.is_a?(Array)
|
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
|
192
|
+
elsif value.is_a?(Hash)
|
|
193
|
+
{}.tap do |hash|
|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
195
|
+
end
|
|
196
|
+
elsif value.respond_to? :to_hash
|
|
197
|
+
value.to_hash
|
|
198
|
+
else
|
|
199
|
+
value
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module RusticiSoftwareCloudV2
|
|
14
|
-
VERSION = '
|
|
14
|
+
VERSION = '2.0.0'
|
|
15
15
|
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -17,10 +17,15 @@ require 'rustici_software_cloud_v2/version'
|
|
|
17
17
|
require 'rustici_software_cloud_v2/configuration'
|
|
18
18
|
|
|
19
19
|
# Models
|
|
20
|
+
require 'rustici_software_cloud_v2/models/about_schema'
|
|
20
21
|
require 'rustici_software_cloud_v2/models/activity_result_schema'
|
|
22
|
+
require 'rustici_software_cloud_v2/models/application_info_schema'
|
|
21
23
|
require 'rustici_software_cloud_v2/models/application_list_schema'
|
|
24
|
+
require 'rustici_software_cloud_v2/models/application_request_schema'
|
|
22
25
|
require 'rustici_software_cloud_v2/models/application_schema'
|
|
23
26
|
require 'rustici_software_cloud_v2/models/application_token'
|
|
27
|
+
require 'rustici_software_cloud_v2/models/asset_file_schema'
|
|
28
|
+
require 'rustici_software_cloud_v2/models/batch_tags_schema'
|
|
24
29
|
require 'rustici_software_cloud_v2/models/comment_schema'
|
|
25
30
|
require 'rustici_software_cloud_v2/models/completion_amount_schema'
|
|
26
31
|
require 'rustici_software_cloud_v2/models/course_activity_schema'
|
|
@@ -28,35 +33,68 @@ require 'rustici_software_cloud_v2/models/course_list_non_paged_schema'
|
|
|
28
33
|
require 'rustici_software_cloud_v2/models/course_list_schema'
|
|
29
34
|
require 'rustici_software_cloud_v2/models/course_reference_schema'
|
|
30
35
|
require 'rustici_software_cloud_v2/models/course_schema'
|
|
31
|
-
require 'rustici_software_cloud_v2/models/
|
|
36
|
+
require 'rustici_software_cloud_v2/models/create_dispatch_id_schema'
|
|
37
|
+
require 'rustici_software_cloud_v2/models/create_dispatch_list_schema'
|
|
38
|
+
require 'rustici_software_cloud_v2/models/create_dispatch_schema'
|
|
39
|
+
require 'rustici_software_cloud_v2/models/create_private_invitation_schema'
|
|
40
|
+
require 'rustici_software_cloud_v2/models/create_public_invitation_schema'
|
|
32
41
|
require 'rustici_software_cloud_v2/models/create_registration_schema'
|
|
33
42
|
require 'rustici_software_cloud_v2/models/credential_created_schema'
|
|
34
43
|
require 'rustici_software_cloud_v2/models/credential_list_schema'
|
|
35
44
|
require 'rustici_software_cloud_v2/models/credential_request_schema'
|
|
36
45
|
require 'rustici_software_cloud_v2/models/credential_schema'
|
|
46
|
+
require 'rustici_software_cloud_v2/models/destination_id_schema'
|
|
47
|
+
require 'rustici_software_cloud_v2/models/destination_list_schema'
|
|
48
|
+
require 'rustici_software_cloud_v2/models/destination_schema'
|
|
49
|
+
require 'rustici_software_cloud_v2/models/dispatch_id_schema'
|
|
50
|
+
require 'rustici_software_cloud_v2/models/dispatch_list_schema'
|
|
51
|
+
require 'rustici_software_cloud_v2/models/dispatch_lti_info_schema'
|
|
52
|
+
require 'rustici_software_cloud_v2/models/dispatch_registration_count_schema'
|
|
53
|
+
require 'rustici_software_cloud_v2/models/dispatch_schema'
|
|
54
|
+
require 'rustici_software_cloud_v2/models/enabled_schema'
|
|
55
|
+
require 'rustici_software_cloud_v2/models/file_list_item_schema'
|
|
56
|
+
require 'rustici_software_cloud_v2/models/file_list_schema'
|
|
57
|
+
require 'rustici_software_cloud_v2/models/import_asset_request_schema'
|
|
37
58
|
require 'rustici_software_cloud_v2/models/import_fetch_request_schema'
|
|
38
59
|
require 'rustici_software_cloud_v2/models/import_job_result_schema'
|
|
60
|
+
require 'rustici_software_cloud_v2/models/import_media_file_reference_request_schema'
|
|
61
|
+
require 'rustici_software_cloud_v2/models/import_request_schema'
|
|
39
62
|
require 'rustici_software_cloud_v2/models/import_result_schema'
|
|
40
63
|
require 'rustici_software_cloud_v2/models/integer_result_schema'
|
|
64
|
+
require 'rustici_software_cloud_v2/models/invitation_email_schema'
|
|
65
|
+
require 'rustici_software_cloud_v2/models/invitation_job_status_schema'
|
|
66
|
+
require 'rustici_software_cloud_v2/models/invitation_summary_list'
|
|
67
|
+
require 'rustici_software_cloud_v2/models/invitation_summary_schema'
|
|
41
68
|
require 'rustici_software_cloud_v2/models/item_value_pair_schema'
|
|
69
|
+
require 'rustici_software_cloud_v2/models/launch_auth_options_schema'
|
|
70
|
+
require 'rustici_software_cloud_v2/models/launch_auth_schema'
|
|
42
71
|
require 'rustici_software_cloud_v2/models/launch_history_list_schema'
|
|
43
72
|
require 'rustici_software_cloud_v2/models/launch_history_schema'
|
|
44
73
|
require 'rustici_software_cloud_v2/models/launch_link_request_schema'
|
|
45
74
|
require 'rustici_software_cloud_v2/models/launch_link_schema'
|
|
46
75
|
require 'rustici_software_cloud_v2/models/learner_preference_schema'
|
|
47
76
|
require 'rustici_software_cloud_v2/models/learner_schema'
|
|
48
|
-
require 'rustici_software_cloud_v2/models/
|
|
77
|
+
require 'rustici_software_cloud_v2/models/media_file_metadata_schema'
|
|
49
78
|
require 'rustici_software_cloud_v2/models/message_schema'
|
|
50
79
|
require 'rustici_software_cloud_v2/models/metadata_schema'
|
|
51
80
|
require 'rustici_software_cloud_v2/models/objective_schema'
|
|
52
81
|
require 'rustici_software_cloud_v2/models/permissions_schema'
|
|
53
82
|
require 'rustici_software_cloud_v2/models/ping_schema'
|
|
54
83
|
require 'rustici_software_cloud_v2/models/post_back_schema'
|
|
84
|
+
require 'rustici_software_cloud_v2/models/private_invitation_list'
|
|
85
|
+
require 'rustici_software_cloud_v2/models/private_invitation_schema'
|
|
86
|
+
require 'rustici_software_cloud_v2/models/private_invitation_update_schema'
|
|
87
|
+
require 'rustici_software_cloud_v2/models/public_invitation_list'
|
|
88
|
+
require 'rustici_software_cloud_v2/models/public_invitation_schema'
|
|
89
|
+
require 'rustici_software_cloud_v2/models/public_invitation_update_schema'
|
|
55
90
|
require 'rustici_software_cloud_v2/models/registration_completion'
|
|
56
91
|
require 'rustici_software_cloud_v2/models/registration_list_schema'
|
|
57
92
|
require 'rustici_software_cloud_v2/models/registration_schema'
|
|
58
93
|
require 'rustici_software_cloud_v2/models/registration_success'
|
|
59
|
-
require 'rustici_software_cloud_v2/models/
|
|
94
|
+
require 'rustici_software_cloud_v2/models/reportage_account_info_schema'
|
|
95
|
+
require 'rustici_software_cloud_v2/models/reportage_account_info_usage_schema'
|
|
96
|
+
require 'rustici_software_cloud_v2/models/reportage_auth_token_schema'
|
|
97
|
+
require 'rustici_software_cloud_v2/models/reportage_link_schema'
|
|
60
98
|
require 'rustici_software_cloud_v2/models/response_error'
|
|
61
99
|
require 'rustici_software_cloud_v2/models/runtime_interaction_schema'
|
|
62
100
|
require 'rustici_software_cloud_v2/models/runtime_objective_schema'
|
|
@@ -72,9 +110,13 @@ require 'rustici_software_cloud_v2/models/shared_data_entry_schema'
|
|
|
72
110
|
require 'rustici_software_cloud_v2/models/static_properties_schema'
|
|
73
111
|
require 'rustici_software_cloud_v2/models/string_result_schema'
|
|
74
112
|
require 'rustici_software_cloud_v2/models/tag_list_schema'
|
|
75
|
-
require 'rustici_software_cloud_v2/models/tag_post_schema'
|
|
76
113
|
require 'rustici_software_cloud_v2/models/title_schema'
|
|
77
114
|
require 'rustici_software_cloud_v2/models/token_request_schema'
|
|
115
|
+
require 'rustici_software_cloud_v2/models/update_application_schema'
|
|
116
|
+
require 'rustici_software_cloud_v2/models/update_dispatch_schema'
|
|
117
|
+
require 'rustici_software_cloud_v2/models/user_invitation_list'
|
|
118
|
+
require 'rustici_software_cloud_v2/models/user_invitation_schema'
|
|
119
|
+
require 'rustici_software_cloud_v2/models/user_invitation_schema_registration_report'
|
|
78
120
|
require 'rustici_software_cloud_v2/models/xapi_account'
|
|
79
121
|
require 'rustici_software_cloud_v2/models/xapi_activity'
|
|
80
122
|
require 'rustici_software_cloud_v2/models/xapi_activity_definition'
|
|
@@ -82,20 +124,40 @@ require 'rustici_software_cloud_v2/models/xapi_agent_group'
|
|
|
82
124
|
require 'rustici_software_cloud_v2/models/xapi_attachment'
|
|
83
125
|
require 'rustici_software_cloud_v2/models/xapi_context'
|
|
84
126
|
require 'rustici_software_cloud_v2/models/xapi_context_activity'
|
|
127
|
+
require 'rustici_software_cloud_v2/models/xapi_credential_auth_type_schema'
|
|
128
|
+
require 'rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema'
|
|
129
|
+
require 'rustici_software_cloud_v2/models/xapi_credential_post_schema'
|
|
130
|
+
require 'rustici_software_cloud_v2/models/xapi_credential_put_schema'
|
|
131
|
+
require 'rustici_software_cloud_v2/models/xapi_credential_schema'
|
|
132
|
+
require 'rustici_software_cloud_v2/models/xapi_credentials_list_schema'
|
|
133
|
+
require 'rustici_software_cloud_v2/models/xapi_endpoint_schema'
|
|
85
134
|
require 'rustici_software_cloud_v2/models/xapi_interaction_component'
|
|
86
135
|
require 'rustici_software_cloud_v2/models/xapi_result'
|
|
87
136
|
require 'rustici_software_cloud_v2/models/xapi_score'
|
|
88
137
|
require 'rustici_software_cloud_v2/models/xapi_statement'
|
|
138
|
+
require 'rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema'
|
|
139
|
+
require 'rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema'
|
|
140
|
+
require 'rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema'
|
|
141
|
+
require 'rustici_software_cloud_v2/models/xapi_statement_pipe_schema'
|
|
89
142
|
require 'rustici_software_cloud_v2/models/xapi_statement_reference'
|
|
90
143
|
require 'rustici_software_cloud_v2/models/xapi_statement_result'
|
|
91
144
|
require 'rustici_software_cloud_v2/models/xapi_verb'
|
|
145
|
+
require 'rustici_software_cloud_v2/models/zoomi_company_id'
|
|
146
|
+
require 'rustici_software_cloud_v2/models/zoomi_course_options_schema'
|
|
92
147
|
|
|
93
148
|
# APIs
|
|
149
|
+
require 'rustici_software_cloud_v2/api/about_api'
|
|
94
150
|
require 'rustici_software_cloud_v2/api/application_management_api'
|
|
95
151
|
require 'rustici_software_cloud_v2/api/authentication_api'
|
|
96
152
|
require 'rustici_software_cloud_v2/api/course_api'
|
|
153
|
+
require 'rustici_software_cloud_v2/api/dispatch_api'
|
|
154
|
+
require 'rustici_software_cloud_v2/api/invitations_api'
|
|
155
|
+
require 'rustici_software_cloud_v2/api/learner_api'
|
|
97
156
|
require 'rustici_software_cloud_v2/api/ping_api'
|
|
98
157
|
require 'rustici_software_cloud_v2/api/registration_api'
|
|
158
|
+
require 'rustici_software_cloud_v2/api/reporting_api'
|
|
159
|
+
require 'rustici_software_cloud_v2/api/xapi_api'
|
|
160
|
+
require 'rustici_software_cloud_v2/api/zoomi_api'
|
|
99
161
|
|
|
100
162
|
module RusticiSoftwareCloudV2
|
|
101
163
|
class << self
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
#REST API used for SCORM Cloud integrations.
|
|
7
7
|
|
|
8
|
-
OpenAPI spec version: 2.0
|
|
8
|
+
OpenAPI spec version: 2.0
|
|
9
9
|
|
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
-
Swagger Codegen version: 2.4.
|
|
11
|
+
Swagger Codegen version: 2.4.12
|
|
12
12
|
|
|
13
13
|
=end
|
|
14
14
|
|
|
@@ -19,16 +19,17 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
s.name = "rustici_software_cloud_v2"
|
|
20
20
|
s.version = RusticiSoftwareCloudV2::VERSION
|
|
21
21
|
s.platform = Gem::Platform::RUBY
|
|
22
|
-
s.authors = ["
|
|
23
|
-
s.email = [""]
|
|
24
|
-
s.homepage = "https://github.com/
|
|
22
|
+
s.authors = ["Rustici Software"]
|
|
23
|
+
s.email = ["systems@rusticisoftware.com"]
|
|
24
|
+
s.homepage = "https://github.com/RusticiSoftware/scormcloud-api-v2-client-ruby"
|
|
25
25
|
s.summary = "A Ruby wrapper for the SCORM Cloud API V2"
|
|
26
26
|
s.description = "SCORM Cloud API V2 Client"
|
|
27
|
-
s.license = ''
|
|
27
|
+
s.license = 'Apache-2.0'
|
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
|
29
29
|
|
|
30
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
31
|
-
s.add_runtime_dependency 'json', '~> 2.
|
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.3', '>= 2.3.0'
|
|
32
|
+
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
|
|
32
33
|
|
|
33
34
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
35
|
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
data/spec/api_client_spec.rb
CHANGED
|
@@ -3,21 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
21
10
|
|
|
22
11
|
=end
|
|
23
12
|
|
|
@@ -62,11 +51,11 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
62
51
|
end
|
|
63
52
|
end
|
|
64
53
|
|
|
65
|
-
describe
|
|
54
|
+
describe 'params_encoding in #build_request' do
|
|
66
55
|
let(:config) { RusticiSoftwareCloudV2::Configuration.new }
|
|
67
56
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new(config) }
|
|
68
57
|
|
|
69
|
-
it
|
|
58
|
+
it 'defaults to nil' do
|
|
70
59
|
expect(RusticiSoftwareCloudV2::Configuration.default.params_encoding).to eq(nil)
|
|
71
60
|
expect(config.params_encoding).to eq(nil)
|
|
72
61
|
|
|
@@ -74,18 +63,18 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
74
63
|
expect(request.options[:params_encoding]).to eq(nil)
|
|
75
64
|
end
|
|
76
65
|
|
|
77
|
-
it
|
|
66
|
+
it 'can be customized' do
|
|
78
67
|
config.params_encoding = :multi
|
|
79
68
|
request = api_client.build_request(:get, '/test')
|
|
80
69
|
expect(request.options[:params_encoding]).to eq(:multi)
|
|
81
70
|
end
|
|
82
71
|
end
|
|
83
72
|
|
|
84
|
-
describe
|
|
73
|
+
describe 'timeout in #build_request' do
|
|
85
74
|
let(:config) { RusticiSoftwareCloudV2::Configuration.new }
|
|
86
75
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new(config) }
|
|
87
76
|
|
|
88
|
-
it
|
|
77
|
+
it 'defaults to 0' do
|
|
89
78
|
expect(RusticiSoftwareCloudV2::Configuration.default.timeout).to eq(0)
|
|
90
79
|
expect(config.timeout).to eq(0)
|
|
91
80
|
|
|
@@ -93,88 +82,105 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
93
82
|
expect(request.options[:timeout]).to eq(0)
|
|
94
83
|
end
|
|
95
84
|
|
|
96
|
-
it
|
|
85
|
+
it 'can be customized' do
|
|
97
86
|
config.timeout = 100
|
|
98
87
|
request = api_client.build_request(:get, '/test')
|
|
99
88
|
expect(request.options[:timeout]).to eq(100)
|
|
100
89
|
end
|
|
101
90
|
end
|
|
102
91
|
|
|
103
|
-
describe
|
|
92
|
+
describe '#build_request' do
|
|
93
|
+
let(:config) { RusticiSoftwareCloudV2::Configuration.new }
|
|
94
|
+
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new(config) }
|
|
95
|
+
|
|
96
|
+
it 'does not send multipart to request' do
|
|
97
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_not_including(:multipart))
|
|
98
|
+
api_client.build_request(:get, '/test')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
context 'when the content type is multipart' do
|
|
102
|
+
it 'sends multipart to request' do
|
|
103
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_including(multipart: true))
|
|
104
|
+
api_client.build_request(:get, '/test', {header_params: { 'Content-Type' => 'multipart/form-data'}})
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
describe '#deserialize' do
|
|
104
110
|
it "handles Array<Integer>" do
|
|
105
111
|
api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
106
|
-
headers = {'Content-Type' => 'application/json'}
|
|
112
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
107
113
|
response = double('response', headers: headers, body: '[12, 34]')
|
|
108
114
|
data = api_client.deserialize(response, 'Array<Integer>')
|
|
109
115
|
expect(data).to be_instance_of(Array)
|
|
110
116
|
expect(data).to eq([12, 34])
|
|
111
117
|
end
|
|
112
118
|
|
|
113
|
-
it
|
|
119
|
+
it 'handles Array<Array<Integer>>' do
|
|
114
120
|
api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
115
|
-
headers = {'Content-Type' => 'application/json'}
|
|
121
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
116
122
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
|
117
123
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
|
118
124
|
expect(data).to be_instance_of(Array)
|
|
119
125
|
expect(data).to eq([[12, 34], [56]])
|
|
120
126
|
end
|
|
121
127
|
|
|
122
|
-
it
|
|
128
|
+
it 'handles Hash<String, String>' do
|
|
123
129
|
api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
124
|
-
headers = {'Content-Type' => 'application/json'}
|
|
130
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
125
131
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
|
126
132
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
|
127
133
|
expect(data).to be_instance_of(Hash)
|
|
128
|
-
expect(data).to eq(
|
|
134
|
+
expect(data).to eq(:message => 'Hello')
|
|
129
135
|
end
|
|
130
136
|
end
|
|
131
137
|
|
|
132
138
|
describe "#object_to_hash" do
|
|
133
|
-
it
|
|
139
|
+
it 'ignores nils and includes empty arrays' do
|
|
134
140
|
# uncomment below to test object_to_hash for model
|
|
135
|
-
#api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
136
|
-
#_model = RusticiSoftwareCloudV2::ModelName.new
|
|
141
|
+
# api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
142
|
+
# _model = RusticiSoftwareCloudV2::ModelName.new
|
|
137
143
|
# update the model attribute below
|
|
138
|
-
#_model.id = 1
|
|
144
|
+
# _model.id = 1
|
|
139
145
|
# update the expected value (hash) below
|
|
140
|
-
#expected = {id: 1, name: '', tags: []}
|
|
141
|
-
#expect(api_client.object_to_hash(_model)).to eq(expected)
|
|
146
|
+
# expected = {id: 1, name: '', tags: []}
|
|
147
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
|
142
148
|
end
|
|
143
149
|
end
|
|
144
150
|
|
|
145
|
-
describe
|
|
151
|
+
describe '#build_collection_param' do
|
|
146
152
|
let(:param) { ['aa', 'bb', 'cc'] }
|
|
147
153
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
148
154
|
|
|
149
|
-
it
|
|
155
|
+
it 'works for csv' do
|
|
150
156
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
|
151
157
|
end
|
|
152
158
|
|
|
153
|
-
it
|
|
159
|
+
it 'works for ssv' do
|
|
154
160
|
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
|
155
161
|
end
|
|
156
162
|
|
|
157
|
-
it
|
|
163
|
+
it 'works for tsv' do
|
|
158
164
|
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
|
159
165
|
end
|
|
160
166
|
|
|
161
|
-
it
|
|
167
|
+
it 'works for pipes' do
|
|
162
168
|
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
|
163
169
|
end
|
|
164
170
|
|
|
165
|
-
it
|
|
171
|
+
it 'works for multi' do
|
|
166
172
|
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
|
167
173
|
end
|
|
168
174
|
|
|
169
|
-
it
|
|
175
|
+
it 'fails for invalid collection format' do
|
|
170
176
|
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
|
171
177
|
end
|
|
172
178
|
end
|
|
173
179
|
|
|
174
|
-
describe
|
|
180
|
+
describe '#json_mime?' do
|
|
175
181
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
176
182
|
|
|
177
|
-
it
|
|
183
|
+
it 'works' do
|
|
178
184
|
expect(api_client.json_mime?(nil)).to eq false
|
|
179
185
|
expect(api_client.json_mime?('')).to eq false
|
|
180
186
|
|
|
@@ -188,10 +194,10 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
188
194
|
end
|
|
189
195
|
end
|
|
190
196
|
|
|
191
|
-
describe
|
|
197
|
+
describe '#select_header_accept' do
|
|
192
198
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
193
199
|
|
|
194
|
-
it
|
|
200
|
+
it 'works' do
|
|
195
201
|
expect(api_client.select_header_accept(nil)).to be_nil
|
|
196
202
|
expect(api_client.select_header_accept([])).to be_nil
|
|
197
203
|
|
|
@@ -204,10 +210,10 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
204
210
|
end
|
|
205
211
|
end
|
|
206
212
|
|
|
207
|
-
describe
|
|
213
|
+
describe '#select_header_content_type' do
|
|
208
214
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
209
215
|
|
|
210
|
-
it
|
|
216
|
+
it 'works' do
|
|
211
217
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
|
212
218
|
expect(api_client.select_header_content_type([])).to eq('application/json')
|
|
213
219
|
|
|
@@ -219,10 +225,10 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
219
225
|
end
|
|
220
226
|
end
|
|
221
227
|
|
|
222
|
-
describe
|
|
228
|
+
describe '#sanitize_filename' do
|
|
223
229
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
224
230
|
|
|
225
|
-
it
|
|
231
|
+
it 'works' do
|
|
226
232
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
|
227
233
|
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
|
228
234
|
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
data/spec/configuration_spec.rb
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 2.0
|
|
6
|
+
OpenAPI spec version: 2.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 2.4.
|
|
9
|
+
Swagger Codegen version: 2.4.12
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|