rustici_software_cloud_v2 1.0.2 → 1.1.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 +4 -4
- data/README.md +5 -4
- data/lib/rustici_software_cloud_v2.rb +1 -0
- data/lib/rustici_software_cloud_v2/api/about_api.rb +5 -5
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +77 -79
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +12 -10
- data/lib/rustici_software_cloud_v2/api/course_api.rb +197 -140
- data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +247 -195
- data/lib/rustici_software_cloud_v2/api/invitations_api.rb +104 -85
- data/lib/rustici_software_cloud_v2/api/learner_api.rb +50 -35
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +5 -7
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +262 -150
- data/lib/rustici_software_cloud_v2/api/reporting_api.rb +21 -17
- data/lib/rustici_software_cloud_v2/api/xapi_api.rb +62 -51
- data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +53 -42
- data/lib/rustici_software_cloud_v2/api_client.rb +1 -0
- data/lib/rustici_software_cloud_v2/api_error.rb +1 -0
- data/lib/rustici_software_cloud_v2/configuration.rb +1 -0
- data/lib/rustici_software_cloud_v2/models/about_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +13 -16
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/application_token.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/batch_tags_schema.rb +9 -13
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +7 -10
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/create_dispatch_id_schema.rb +12 -16
- data/lib/rustici_software_cloud_v2/models/create_dispatch_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +9 -13
- data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +10 -14
- data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +9 -13
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +10 -14
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/destination_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/enabled_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +8 -11
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +8 -11
- data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/launch_auth_options_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/launch_auth_schema.rb +11 -14
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +15 -18
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +19 -22
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +15 -18
- data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +13 -4
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +13 -4
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/response_error.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +15 -18
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +11 -14
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +11 -14
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +9 -13
- data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +7 -10
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +9 -12
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +9 -12
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +11 -13
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +14 -17
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +8 -11
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +7 -10
- data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +12 -16
- data/lib/rustici_software_cloud_v2/models/xapi_credential_put_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +12 -16
- data/lib/rustici_software_cloud_v2/models/xapi_credentials_list_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +9 -12
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +8 -11
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +7 -10
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +7 -10
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +8 -12
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +10 -13
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +8 -11
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +9 -12
- data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +7 -11
- data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +7 -11
- data/lib/rustici_software_cloud_v2/version.rb +2 -1
- data/rustici_software_cloud_v2.gemspec +8 -7
- data/spec/api_client_spec.rb +35 -34
- data/spec/configuration_spec.rb +9 -8
- data/spec/spec_helper.rb +1 -0
- metadata +16 -16
|
@@ -6,6 +6,7 @@
|
|
|
6
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.12
|
|
9
10
|
|
|
10
11
|
=end
|
|
11
12
|
|
|
@@ -18,7 +19,6 @@ module RusticiSoftwareCloudV2
|
|
|
18
19
|
|
|
19
20
|
attr_accessor :more
|
|
20
21
|
|
|
21
|
-
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
23
|
def self.attribute_map
|
|
24
24
|
{
|
|
@@ -41,7 +41,7 @@ module RusticiSoftwareCloudV2
|
|
|
41
41
|
return unless attributes.is_a?(Hash)
|
|
42
42
|
|
|
43
43
|
# convert string to symbol for hash key
|
|
44
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
44
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
45
45
|
|
|
46
46
|
if attributes.has_key?(:'statements')
|
|
47
47
|
if (value = attributes[:'statements']).is_a?(Array)
|
|
@@ -52,25 +52,24 @@ module RusticiSoftwareCloudV2
|
|
|
52
52
|
if attributes.has_key?(:'more')
|
|
53
53
|
self.more = attributes[:'more']
|
|
54
54
|
end
|
|
55
|
-
|
|
56
55
|
end
|
|
57
56
|
|
|
58
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
59
|
-
# @return Array for valid
|
|
58
|
+
# @return Array for valid properties with the reasons
|
|
60
59
|
def list_invalid_properties
|
|
61
60
|
invalid_properties = Array.new
|
|
62
61
|
if @statements.nil?
|
|
63
|
-
invalid_properties.push(
|
|
62
|
+
invalid_properties.push('invalid value for "statements", statements cannot be nil.')
|
|
64
63
|
end
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
invalid_properties
|
|
67
66
|
end
|
|
68
67
|
|
|
69
68
|
# Check to see if the all the properties in the model are valid
|
|
70
69
|
# @return true if the model is valid
|
|
71
70
|
def valid?
|
|
72
71
|
return false if @statements.nil?
|
|
73
|
-
|
|
72
|
+
true
|
|
74
73
|
end
|
|
75
74
|
|
|
76
75
|
# Checks equality by comparing each attribute.
|
|
@@ -104,7 +103,7 @@ module RusticiSoftwareCloudV2
|
|
|
104
103
|
# check to ensure the input is an array given that the the attribute
|
|
105
104
|
# is documented as an array but the input is not
|
|
106
105
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
107
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
108
107
|
end
|
|
109
108
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
110
109
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -186,7 +185,7 @@ module RusticiSoftwareCloudV2
|
|
|
186
185
|
# @return [Hash] Returns the value in the form of hash
|
|
187
186
|
def _to_hash(value)
|
|
188
187
|
if value.is_a?(Array)
|
|
189
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
188
|
+
value.compact.map { |v| _to_hash(v) }
|
|
190
189
|
elsif value.is_a?(Hash)
|
|
191
190
|
{}.tap do |hash|
|
|
192
191
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -197,7 +196,5 @@ module RusticiSoftwareCloudV2
|
|
|
197
196
|
value
|
|
198
197
|
end
|
|
199
198
|
end
|
|
200
|
-
|
|
201
199
|
end
|
|
202
|
-
|
|
203
200
|
end
|
|
@@ -6,6 +6,7 @@
|
|
|
6
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.12
|
|
9
10
|
|
|
10
11
|
=end
|
|
11
12
|
|
|
@@ -18,7 +19,6 @@ module RusticiSoftwareCloudV2
|
|
|
18
19
|
|
|
19
20
|
attr_accessor :display
|
|
20
21
|
|
|
21
|
-
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
23
|
def self.attribute_map
|
|
24
24
|
{
|
|
@@ -41,36 +41,35 @@ module RusticiSoftwareCloudV2
|
|
|
41
41
|
return unless attributes.is_a?(Hash)
|
|
42
42
|
|
|
43
43
|
# convert string to symbol for hash key
|
|
44
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
44
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
45
45
|
|
|
46
46
|
if attributes.has_key?(:'id')
|
|
47
47
|
self.id = attributes[:'id']
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
if attributes.has_key?(:'display')
|
|
51
|
-
if (value = attributes[:'display']).is_a?(
|
|
51
|
+
if (value = attributes[:'display']).is_a?(Hash)
|
|
52
52
|
self.display = value
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
|
-
|
|
56
55
|
end
|
|
57
56
|
|
|
58
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
59
|
-
# @return Array for valid
|
|
58
|
+
# @return Array for valid properties with the reasons
|
|
60
59
|
def list_invalid_properties
|
|
61
60
|
invalid_properties = Array.new
|
|
62
61
|
if @id.nil?
|
|
63
|
-
invalid_properties.push(
|
|
62
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
64
63
|
end
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
invalid_properties
|
|
67
66
|
end
|
|
68
67
|
|
|
69
68
|
# Check to see if the all the properties in the model are valid
|
|
70
69
|
# @return true if the model is valid
|
|
71
70
|
def valid?
|
|
72
71
|
return false if @id.nil?
|
|
73
|
-
|
|
72
|
+
true
|
|
74
73
|
end
|
|
75
74
|
|
|
76
75
|
# Checks equality by comparing each attribute.
|
|
@@ -104,7 +103,7 @@ module RusticiSoftwareCloudV2
|
|
|
104
103
|
# check to ensure the input is an array given that the the attribute
|
|
105
104
|
# is documented as an array but the input is not
|
|
106
105
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
107
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
108
107
|
end
|
|
109
108
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
110
109
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -186,7 +185,7 @@ module RusticiSoftwareCloudV2
|
|
|
186
185
|
# @return [Hash] Returns the value in the form of hash
|
|
187
186
|
def _to_hash(value)
|
|
188
187
|
if value.is_a?(Array)
|
|
189
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
188
|
+
value.compact.map { |v| _to_hash(v) }
|
|
190
189
|
elsif value.is_a?(Hash)
|
|
191
190
|
{}.tap do |hash|
|
|
192
191
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -197,7 +196,5 @@ module RusticiSoftwareCloudV2
|
|
|
197
196
|
value
|
|
198
197
|
end
|
|
199
198
|
end
|
|
200
|
-
|
|
201
199
|
end
|
|
202
|
-
|
|
203
200
|
end
|
|
@@ -6,17 +6,16 @@
|
|
|
6
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.12
|
|
9
10
|
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
13
|
require 'date'
|
|
13
14
|
|
|
14
15
|
module RusticiSoftwareCloudV2
|
|
15
|
-
|
|
16
16
|
class ZoomiCompanyId
|
|
17
17
|
attr_accessor :zoomi_company_id
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
20
|
def self.attribute_map
|
|
22
21
|
{
|
|
@@ -37,25 +36,24 @@ module RusticiSoftwareCloudV2
|
|
|
37
36
|
return unless attributes.is_a?(Hash)
|
|
38
37
|
|
|
39
38
|
# convert string to symbol for hash key
|
|
40
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
41
40
|
|
|
42
41
|
if attributes.has_key?(:'zoomi_company_id')
|
|
43
42
|
self.zoomi_company_id = attributes[:'zoomi_company_id']
|
|
44
43
|
end
|
|
45
|
-
|
|
46
44
|
end
|
|
47
45
|
|
|
48
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
-
# @return Array for valid
|
|
47
|
+
# @return Array for valid properties with the reasons
|
|
50
48
|
def list_invalid_properties
|
|
51
49
|
invalid_properties = Array.new
|
|
52
|
-
|
|
50
|
+
invalid_properties
|
|
53
51
|
end
|
|
54
52
|
|
|
55
53
|
# Check to see if the all the properties in the model are valid
|
|
56
54
|
# @return true if the model is valid
|
|
57
55
|
def valid?
|
|
58
|
-
|
|
56
|
+
true
|
|
59
57
|
end
|
|
60
58
|
|
|
61
59
|
# Checks equality by comparing each attribute.
|
|
@@ -88,7 +86,7 @@ module RusticiSoftwareCloudV2
|
|
|
88
86
|
# check to ensure the input is an array given that the the attribute
|
|
89
87
|
# is documented as an array but the input is not
|
|
90
88
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
91
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
89
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
92
90
|
end
|
|
93
91
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
94
92
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -170,7 +168,7 @@ module RusticiSoftwareCloudV2
|
|
|
170
168
|
# @return [Hash] Returns the value in the form of hash
|
|
171
169
|
def _to_hash(value)
|
|
172
170
|
if value.is_a?(Array)
|
|
173
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
|
174
172
|
elsif value.is_a?(Hash)
|
|
175
173
|
{}.tap do |hash|
|
|
176
174
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -181,7 +179,5 @@ module RusticiSoftwareCloudV2
|
|
|
181
179
|
value
|
|
182
180
|
end
|
|
183
181
|
end
|
|
184
|
-
|
|
185
182
|
end
|
|
186
|
-
|
|
187
183
|
end
|
|
@@ -6,19 +6,18 @@
|
|
|
6
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.12
|
|
9
10
|
|
|
10
11
|
=end
|
|
11
12
|
|
|
12
13
|
require 'date'
|
|
13
14
|
|
|
14
15
|
module RusticiSoftwareCloudV2
|
|
15
|
-
|
|
16
16
|
class ZoomiCourseOptionsSchema
|
|
17
17
|
attr_accessor :nti
|
|
18
18
|
|
|
19
19
|
attr_accessor :cta
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
22
|
def self.attribute_map
|
|
24
23
|
{
|
|
@@ -41,7 +40,7 @@ module RusticiSoftwareCloudV2
|
|
|
41
40
|
return unless attributes.is_a?(Hash)
|
|
42
41
|
|
|
43
42
|
# convert string to symbol for hash key
|
|
44
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
45
44
|
|
|
46
45
|
if attributes.has_key?(:'nti')
|
|
47
46
|
self.nti = attributes[:'nti']
|
|
@@ -50,20 +49,19 @@ module RusticiSoftwareCloudV2
|
|
|
50
49
|
if attributes.has_key?(:'cta')
|
|
51
50
|
self.cta = attributes[:'cta']
|
|
52
51
|
end
|
|
53
|
-
|
|
54
52
|
end
|
|
55
53
|
|
|
56
54
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
57
|
-
# @return Array for valid
|
|
55
|
+
# @return Array for valid properties with the reasons
|
|
58
56
|
def list_invalid_properties
|
|
59
57
|
invalid_properties = Array.new
|
|
60
|
-
|
|
58
|
+
invalid_properties
|
|
61
59
|
end
|
|
62
60
|
|
|
63
61
|
# Check to see if the all the properties in the model are valid
|
|
64
62
|
# @return true if the model is valid
|
|
65
63
|
def valid?
|
|
66
|
-
|
|
64
|
+
true
|
|
67
65
|
end
|
|
68
66
|
|
|
69
67
|
# Checks equality by comparing each attribute.
|
|
@@ -97,7 +95,7 @@ module RusticiSoftwareCloudV2
|
|
|
97
95
|
# check to ensure the input is an array given that the the attribute
|
|
98
96
|
# is documented as an array but the input is not
|
|
99
97
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
100
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
101
99
|
end
|
|
102
100
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
103
101
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -179,7 +177,7 @@ module RusticiSoftwareCloudV2
|
|
|
179
177
|
# @return [Hash] Returns the value in the form of hash
|
|
180
178
|
def _to_hash(value)
|
|
181
179
|
if value.is_a?(Array)
|
|
182
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
|
183
181
|
elsif value.is_a?(Hash)
|
|
184
182
|
{}.tap do |hash|
|
|
185
183
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -190,7 +188,5 @@ module RusticiSoftwareCloudV2
|
|
|
190
188
|
value
|
|
191
189
|
end
|
|
192
190
|
end
|
|
193
|
-
|
|
194
191
|
end
|
|
195
|
-
|
|
196
192
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
=begin
|
|
4
4
|
#SCORM Cloud Rest API
|
|
5
5
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
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.12
|
|
11
12
|
|
|
12
13
|
=end
|
|
13
14
|
|
|
@@ -23,22 +24,22 @@ Gem::Specification.new do |s|
|
|
|
23
24
|
s.homepage = "https://github.com/RusticiSoftware/scormcloud-api-v2-client-ruby"
|
|
24
25
|
s.summary = "A Ruby wrapper for the SCORM Cloud API V2"
|
|
25
26
|
s.description = "SCORM Cloud API V2 Client"
|
|
26
|
-
s.license =
|
|
27
|
+
s.license = 'Apache-2.0'
|
|
27
28
|
s.required_ruby_version = ">= 1.9"
|
|
28
29
|
|
|
29
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
30
|
-
s.add_runtime_dependency 'json', '~>
|
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.3', '>= 2.3.0'
|
|
31
32
|
|
|
32
|
-
s.add_development_dependency 'rspec', '~> 3.
|
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
33
34
|
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
|
34
35
|
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
|
35
36
|
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
|
36
37
|
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
|
37
38
|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
|
38
|
-
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.
|
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
|
39
40
|
|
|
40
|
-
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
|
41
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
41
42
|
s.test_files = `find spec/*`.split("\n")
|
|
42
43
|
s.executables = []
|
|
43
44
|
s.require_paths = ["lib"]
|
|
44
|
-
end
|
|
45
|
+
end
|
data/spec/api_client_spec.rb
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
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.12
|
|
9
10
|
|
|
10
11
|
=end
|
|
11
12
|
|
|
@@ -50,11 +51,11 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
50
51
|
end
|
|
51
52
|
end
|
|
52
53
|
|
|
53
|
-
describe
|
|
54
|
+
describe 'params_encoding in #build_request' do
|
|
54
55
|
let(:config) { RusticiSoftwareCloudV2::Configuration.new }
|
|
55
56
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new(config) }
|
|
56
57
|
|
|
57
|
-
it
|
|
58
|
+
it 'defaults to nil' do
|
|
58
59
|
expect(RusticiSoftwareCloudV2::Configuration.default.params_encoding).to eq(nil)
|
|
59
60
|
expect(config.params_encoding).to eq(nil)
|
|
60
61
|
|
|
@@ -62,18 +63,18 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
62
63
|
expect(request.options[:params_encoding]).to eq(nil)
|
|
63
64
|
end
|
|
64
65
|
|
|
65
|
-
it
|
|
66
|
+
it 'can be customized' do
|
|
66
67
|
config.params_encoding = :multi
|
|
67
68
|
request = api_client.build_request(:get, '/test')
|
|
68
69
|
expect(request.options[:params_encoding]).to eq(:multi)
|
|
69
70
|
end
|
|
70
71
|
end
|
|
71
72
|
|
|
72
|
-
describe
|
|
73
|
+
describe 'timeout in #build_request' do
|
|
73
74
|
let(:config) { RusticiSoftwareCloudV2::Configuration.new }
|
|
74
75
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new(config) }
|
|
75
76
|
|
|
76
|
-
it
|
|
77
|
+
it 'defaults to 0' do
|
|
77
78
|
expect(RusticiSoftwareCloudV2::Configuration.default.timeout).to eq(0)
|
|
78
79
|
expect(config.timeout).to eq(0)
|
|
79
80
|
|
|
@@ -81,88 +82,88 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
81
82
|
expect(request.options[:timeout]).to eq(0)
|
|
82
83
|
end
|
|
83
84
|
|
|
84
|
-
it
|
|
85
|
+
it 'can be customized' do
|
|
85
86
|
config.timeout = 100
|
|
86
87
|
request = api_client.build_request(:get, '/test')
|
|
87
88
|
expect(request.options[:timeout]).to eq(100)
|
|
88
89
|
end
|
|
89
90
|
end
|
|
90
91
|
|
|
91
|
-
describe
|
|
92
|
+
describe '#deserialize' do
|
|
92
93
|
it "handles Array<Integer>" do
|
|
93
94
|
api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
94
|
-
headers = {'Content-Type' => 'application/json'}
|
|
95
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
95
96
|
response = double('response', headers: headers, body: '[12, 34]')
|
|
96
97
|
data = api_client.deserialize(response, 'Array<Integer>')
|
|
97
98
|
expect(data).to be_instance_of(Array)
|
|
98
99
|
expect(data).to eq([12, 34])
|
|
99
100
|
end
|
|
100
101
|
|
|
101
|
-
it
|
|
102
|
+
it 'handles Array<Array<Integer>>' do
|
|
102
103
|
api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
103
|
-
headers = {'Content-Type' => 'application/json'}
|
|
104
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
104
105
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
|
105
106
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
|
106
107
|
expect(data).to be_instance_of(Array)
|
|
107
108
|
expect(data).to eq([[12, 34], [56]])
|
|
108
109
|
end
|
|
109
110
|
|
|
110
|
-
it
|
|
111
|
+
it 'handles Hash<String, String>' do
|
|
111
112
|
api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
112
|
-
headers = {'Content-Type' => 'application/json'}
|
|
113
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
113
114
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
|
114
115
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
|
115
116
|
expect(data).to be_instance_of(Hash)
|
|
116
|
-
expect(data).to eq(
|
|
117
|
+
expect(data).to eq(:message => 'Hello')
|
|
117
118
|
end
|
|
118
119
|
end
|
|
119
120
|
|
|
120
121
|
describe "#object_to_hash" do
|
|
121
|
-
it
|
|
122
|
+
it 'ignores nils and includes empty arrays' do
|
|
122
123
|
# uncomment below to test object_to_hash for model
|
|
123
|
-
#api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
124
|
-
#_model = RusticiSoftwareCloudV2::ModelName.new
|
|
124
|
+
# api_client = RusticiSoftwareCloudV2::ApiClient.new
|
|
125
|
+
# _model = RusticiSoftwareCloudV2::ModelName.new
|
|
125
126
|
# update the model attribute below
|
|
126
|
-
#_model.id = 1
|
|
127
|
+
# _model.id = 1
|
|
127
128
|
# update the expected value (hash) below
|
|
128
|
-
#expected = {id: 1, name: '', tags: []}
|
|
129
|
-
#expect(api_client.object_to_hash(_model)).to eq(expected)
|
|
129
|
+
# expected = {id: 1, name: '', tags: []}
|
|
130
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
|
130
131
|
end
|
|
131
132
|
end
|
|
132
133
|
|
|
133
|
-
describe
|
|
134
|
+
describe '#build_collection_param' do
|
|
134
135
|
let(:param) { ['aa', 'bb', 'cc'] }
|
|
135
136
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
136
137
|
|
|
137
|
-
it
|
|
138
|
+
it 'works for csv' do
|
|
138
139
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
|
139
140
|
end
|
|
140
141
|
|
|
141
|
-
it
|
|
142
|
+
it 'works for ssv' do
|
|
142
143
|
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
|
143
144
|
end
|
|
144
145
|
|
|
145
|
-
it
|
|
146
|
+
it 'works for tsv' do
|
|
146
147
|
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
|
147
148
|
end
|
|
148
149
|
|
|
149
|
-
it
|
|
150
|
+
it 'works for pipes' do
|
|
150
151
|
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
|
151
152
|
end
|
|
152
153
|
|
|
153
|
-
it
|
|
154
|
+
it 'works for multi' do
|
|
154
155
|
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
|
155
156
|
end
|
|
156
157
|
|
|
157
|
-
it
|
|
158
|
+
it 'fails for invalid collection format' do
|
|
158
159
|
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
|
159
160
|
end
|
|
160
161
|
end
|
|
161
162
|
|
|
162
|
-
describe
|
|
163
|
+
describe '#json_mime?' do
|
|
163
164
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
164
165
|
|
|
165
|
-
it
|
|
166
|
+
it 'works' do
|
|
166
167
|
expect(api_client.json_mime?(nil)).to eq false
|
|
167
168
|
expect(api_client.json_mime?('')).to eq false
|
|
168
169
|
|
|
@@ -176,10 +177,10 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
176
177
|
end
|
|
177
178
|
end
|
|
178
179
|
|
|
179
|
-
describe
|
|
180
|
+
describe '#select_header_accept' do
|
|
180
181
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
181
182
|
|
|
182
|
-
it
|
|
183
|
+
it 'works' do
|
|
183
184
|
expect(api_client.select_header_accept(nil)).to be_nil
|
|
184
185
|
expect(api_client.select_header_accept([])).to be_nil
|
|
185
186
|
|
|
@@ -192,10 +193,10 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
192
193
|
end
|
|
193
194
|
end
|
|
194
195
|
|
|
195
|
-
describe
|
|
196
|
+
describe '#select_header_content_type' do
|
|
196
197
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
197
198
|
|
|
198
|
-
it
|
|
199
|
+
it 'works' do
|
|
199
200
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
|
200
201
|
expect(api_client.select_header_content_type([])).to eq('application/json')
|
|
201
202
|
|
|
@@ -207,10 +208,10 @@ describe RusticiSoftwareCloudV2::ApiClient do
|
|
|
207
208
|
end
|
|
208
209
|
end
|
|
209
210
|
|
|
210
|
-
describe
|
|
211
|
+
describe '#sanitize_filename' do
|
|
211
212
|
let(:api_client) { RusticiSoftwareCloudV2::ApiClient.new }
|
|
212
213
|
|
|
213
|
-
it
|
|
214
|
+
it 'works' do
|
|
214
215
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
|
215
216
|
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
|
216
217
|
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|