tca_client 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/docs/AddGroupAttachmentRequest.md +16 -4
- data/docs/AddGroupAttachmentResponse.md +14 -3
- data/docs/AggregateGroup.md +24 -8
- data/docs/AnnotationsSettings.md +18 -0
- data/docs/AuthorMetadataOverride.md +16 -4
- data/docs/EULAApi.md +166 -92
- data/docs/Error.md +16 -4
- data/docs/Eula.md +18 -5
- data/docs/EulaAcceptListItem.md +20 -6
- data/docs/EulaAcceptRequest.md +20 -6
- data/docs/EulaVersion.md +22 -7
- data/docs/FeaturesApi.md +41 -23
- data/docs/FeaturesEnabled.md +20 -6
- data/docs/FeaturesGenerationSettings.md +16 -4
- data/docs/FeaturesSimilarity.md +18 -5
- data/docs/FeaturesSimilarityViewSettings.md +38 -15
- data/docs/FeaturesTenant.md +14 -3
- data/docs/FeaturesViewerModes.md +16 -4
- data/docs/GenerateSimilarityPDF.md +18 -0
- data/docs/GetGroupAttachments200Response.md +18 -0
- data/docs/Group.md +18 -5
- data/docs/GroupAttachmentResponse.md +20 -6
- data/docs/GroupContext.md +18 -5
- data/docs/GroupsApi.md +321 -177
- data/docs/IndexApi.md +84 -44
- data/docs/IndexStateSettings.md +14 -3
- data/docs/IndexingSettings.md +14 -3
- data/docs/PDFStatusWebhookRequest.md +24 -0
- data/docs/PdfStatusResponse.md +14 -3
- data/docs/RateLimitError.md +16 -4
- data/docs/RequestPdfResponse.md +14 -3
- data/docs/Sidebar.md +14 -3
- data/docs/SimilarityApi.md +239 -129
- data/docs/SimilarityCompleteWebhookRequest.md +38 -0
- data/docs/SimilarityGenerationSettings.md +20 -6
- data/docs/SimilarityMetadata.md +32 -12
- data/docs/SimilarityMetadataAllOf.md +28 -0
- data/docs/SimilarityMetadataAllOfTopMatches.md +30 -0
- data/docs/SimilarityPutRequest.md +18 -5
- data/docs/SimilarityScoreData.md +20 -6
- data/docs/SimilaritySettings.md +18 -5
- data/docs/SimilaritySettingsModes.md +16 -4
- data/docs/SimilaritySettingsViewSettings.md +14 -3
- data/docs/SimilarityViewSettings.md +38 -15
- data/docs/SimilarityViewerUrlResponse.md +14 -3
- data/docs/SimilarityViewerUrlSettings.md +30 -10
- data/docs/SimpleSubmissionResponse.md +22 -2
- data/docs/SimpleSubmissionResponseAllOf.md +26 -0
- data/docs/Submission.md +34 -2
- data/docs/SubmissionAllOf.md +38 -0
- data/docs/SubmissionApi.md +203 -112
- data/docs/SubmissionBase.md +30 -11
- data/docs/SubmissionBaseMetadata.md +24 -8
- data/docs/SubmissionCompleteWebhookRequest.md +40 -0
- data/docs/SubmissionCompleteWebhookRequestAllOf.md +18 -0
- data/docs/SubmissionCompleteWebhookRequestAllOfMetadata.md +18 -0
- data/docs/SubmissionSizeError.md +16 -4
- data/docs/SuccessMessage.md +14 -3
- data/docs/Users.md +20 -6
- data/docs/ViewerPermissions.md +22 -7
- data/docs/Webhook.md +24 -6
- data/docs/WebhookAllOf.md +20 -0
- data/docs/WebhookApi.md +193 -103
- data/docs/WebhookBase.md +20 -6
- data/docs/WebhookPathRequest.md +16 -4
- data/docs/WebhookWithSecret.md +22 -6
- data/docs/WebhookWithSecretAllOf.md +18 -0
- data/lib/tca_client/api/eula_api.rb +96 -63
- data/lib/tca_client/api/features_api.rb +21 -12
- data/lib/tca_client/api/groups_api.rb +225 -155
- data/lib/tca_client/api/index_api.rb +46 -27
- data/lib/tca_client/api/similarity_api.rb +165 -104
- data/lib/tca_client/api/submission_api.rb +140 -97
- data/lib/tca_client/api/webhook_api.rb +120 -77
- data/lib/tca_client/api_client.rb +61 -57
- data/lib/tca_client/api_error.rb +4 -4
- data/lib/tca_client/configuration.rb +93 -13
- data/lib/tca_client/models/add_group_attachment_request.rb +50 -13
- data/lib/tca_client/models/add_group_attachment_response.rb +25 -12
- data/lib/tca_client/models/aggregate_group.rb +34 -21
- data/lib/tca_client/models/annotations_settings.rb +220 -0
- data/lib/tca_client/models/author_metadata_override.rb +26 -13
- data/lib/tca_client/models/error.rb +26 -13
- data/lib/tca_client/models/eula.rb +27 -14
- data/lib/tca_client/models/eula_accept_list_item.rb +28 -15
- data/lib/tca_client/models/eula_accept_request.rb +28 -15
- data/lib/tca_client/models/eula_version.rb +29 -16
- data/lib/tca_client/models/features_enabled.rb +28 -15
- data/lib/tca_client/models/features_generation_settings.rb +26 -13
- data/lib/tca_client/models/features_similarity.rb +27 -14
- data/lib/tca_client/models/features_similarity_view_settings.rb +37 -24
- data/lib/tca_client/models/features_tenant.rb +25 -12
- data/lib/tca_client/models/features_viewer_modes.rb +26 -13
- data/lib/tca_client/models/generate_similarity_pdf.rb +254 -0
- data/lib/tca_client/models/{inline_response_200.rb → get_group_attachments200_response.rb} +28 -15
- data/lib/tca_client/models/group.rb +29 -16
- data/lib/tca_client/models/group_attachment_response.rb +38 -17
- data/lib/tca_client/models/group_context.rb +27 -14
- data/lib/tca_client/models/index_state_settings.rb +25 -12
- data/lib/tca_client/models/indexing_settings.rb +25 -12
- data/lib/tca_client/models/pdf_status_response.rb +27 -14
- data/lib/tca_client/models/pdf_status_webhook_request.rb +283 -0
- data/lib/tca_client/models/rate_limit_error.rb +36 -20
- data/lib/tca_client/models/request_pdf_response.rb +25 -12
- data/lib/tca_client/models/sidebar.rb +27 -14
- data/lib/tca_client/models/similarity_complete_webhook_request.rb +366 -0
- data/lib/tca_client/models/similarity_generation_settings.rb +30 -17
- data/lib/tca_client/models/similarity_metadata.rb +45 -28
- data/lib/tca_client/models/similarity_metadata_all_of.rb +301 -0
- data/lib/tca_client/models/{similarity_metadata_top_matches.rb → similarity_metadata_all_of_top_matches.rb} +34 -21
- data/lib/tca_client/models/similarity_put_request.rb +27 -14
- data/lib/tca_client/models/similarity_score_data.rb +28 -15
- data/lib/tca_client/models/similarity_settings.rb +29 -16
- data/lib/tca_client/models/similarity_settings_modes.rb +26 -13
- data/lib/tca_client/models/similarity_settings_view_settings.rb +25 -12
- data/lib/tca_client/models/similarity_view_settings.rb +37 -24
- data/lib/tca_client/models/similarity_viewer_url_response.rb +25 -12
- data/lib/tca_client/models/similarity_viewer_url_settings.rb +46 -24
- data/lib/tca_client/models/simple_submission_response.rb +117 -13
- data/lib/tca_client/models/simple_submission_response_all_of.rb +294 -0
- data/lib/tca_client/models/submission.rb +191 -13
- data/lib/tca_client/models/submission_all_of.rb +368 -0
- data/lib/tca_client/models/submission_base.rb +82 -23
- data/lib/tca_client/models/submission_base_metadata.rb +30 -17
- data/lib/tca_client/models/submission_complete_webhook_request.rb +385 -0
- data/lib/tca_client/models/submission_complete_webhook_request_all_of.rb +219 -0
- data/lib/tca_client/models/submission_complete_webhook_request_all_of_metadata.rb +219 -0
- data/lib/tca_client/models/submission_size_error.rb +36 -20
- data/lib/tca_client/models/success_message.rb +25 -12
- data/lib/tca_client/models/users.rb +28 -15
- data/lib/tca_client/models/viewer_permissions.rb +29 -16
- data/lib/tca_client/models/webhook.rb +62 -16
- data/lib/tca_client/models/webhook_all_of.rb +235 -0
- data/lib/tca_client/models/webhook_base.rb +28 -15
- data/lib/tca_client/models/webhook_path_request.rb +26 -13
- data/lib/tca_client/models/webhook_with_secret.rb +52 -16
- data/lib/tca_client/models/webhook_with_secret_all_of.rb +225 -0
- data/lib/tca_client/version.rb +5 -4
- data/lib/tca_client.rb +18 -5
- data/spec/api/submission_api_spec.rb +2 -2
- data/tca_client-1.0.0.gem +0 -0
- data/tca_client-1.0.1.gem +0 -0
- data/tca_client.gemspec +7 -7
- metadata +44 -38
- data/docs/InlineResponse200.md +0 -7
- data/docs/SimilarityMetadataTopMatches.md +0 -13
@@ -0,0 +1,220 @@
|
|
1
|
+
=begin
|
2
|
+
#Turnitin Core API
|
3
|
+
|
4
|
+
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.258
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TCAClient
|
17
|
+
class AnnotationsSettings
|
18
|
+
# Used to enable annotations
|
19
|
+
attr_accessor :enabled
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'enabled' => :'enabled'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'enabled' => :'Boolean'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TCAClient::AnnotationsSettings` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TCAClient::AnnotationsSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'enabled')
|
62
|
+
self.enabled = attributes[:'enabled']
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
enabled == o.enabled
|
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 [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[enabled].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 self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
112
|
+
self.class.openapi_types.each_pair do |key, type|
|
113
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
+
self.send("#{key}=", nil)
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
|
+
# check to ensure the input is an array given that the attribute
|
117
|
+
# is documented as an array but the input is not
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
120
|
+
end
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Deserializes the data based on type
|
130
|
+
# @param string type Data type
|
131
|
+
# @param string value Value to be deserialized
|
132
|
+
# @return [Object] Deserialized data
|
133
|
+
def _deserialize(type, value)
|
134
|
+
case type.to_sym
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
137
|
+
when :Date
|
138
|
+
Date.parse(value)
|
139
|
+
when :String
|
140
|
+
value.to_s
|
141
|
+
when :Integer
|
142
|
+
value.to_i
|
143
|
+
when :Float
|
144
|
+
value.to_f
|
145
|
+
when :Boolean
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
147
|
+
true
|
148
|
+
else
|
149
|
+
false
|
150
|
+
end
|
151
|
+
when :Object
|
152
|
+
# generic object (usually a Hash), return directly
|
153
|
+
value
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
160
|
+
{}.tap do |hash|
|
161
|
+
value.each do |k, v|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
else # model
|
166
|
+
# models (e.g. Pet) or oneOf
|
167
|
+
klass = TCAClient.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
if value.nil?
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
193
|
+
end
|
194
|
+
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
@@ -3,13 +3,15 @@
|
|
3
3
|
|
4
4
|
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 1.0.258
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.3.0-SNAPSHOT
|
7
10
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.35
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module TCAClient
|
15
17
|
class AuthorMetadataOverride
|
@@ -27,11 +29,16 @@ module TCAClient
|
|
27
29
|
}
|
28
30
|
end
|
29
31
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
30
37
|
# Attribute type mapping.
|
31
38
|
def self.openapi_types
|
32
39
|
{
|
33
|
-
:'given_name' => :'
|
34
|
-
:'family_name' => :'
|
40
|
+
:'given_name' => :'String',
|
41
|
+
:'family_name' => :'String'
|
35
42
|
}
|
36
43
|
end
|
37
44
|
|
@@ -40,7 +47,7 @@ module TCAClient
|
|
40
47
|
Set.new([
|
41
48
|
])
|
42
49
|
end
|
43
|
-
|
50
|
+
|
44
51
|
# Initializes the object
|
45
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
46
53
|
def initialize(attributes = {})
|
@@ -111,8 +118,11 @@ module TCAClient
|
|
111
118
|
# @return [Object] Returns the model itself
|
112
119
|
def build_from_hash(attributes)
|
113
120
|
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
122
|
self.class.openapi_types.each_pair do |key, type|
|
115
|
-
if
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
126
|
# check to ensure the input is an array given that the attribute
|
117
127
|
# is documented as an array but the input is not
|
118
128
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -120,8 +130,6 @@ module TCAClient
|
|
120
130
|
end
|
121
131
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
132
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
-
self.send("#{key}=", nil)
|
125
133
|
end
|
126
134
|
end
|
127
135
|
|
@@ -134,8 +142,8 @@ module TCAClient
|
|
134
142
|
# @return [Object] Deserialized data
|
135
143
|
def _deserialize(type, value)
|
136
144
|
case type.to_sym
|
137
|
-
when :
|
138
|
-
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
139
147
|
when :Date
|
140
148
|
Date.parse(value)
|
141
149
|
when :String
|
@@ -165,7 +173,9 @@ module TCAClient
|
|
165
173
|
end
|
166
174
|
end
|
167
175
|
else # model
|
168
|
-
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = TCAClient.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
179
|
end
|
170
180
|
end
|
171
181
|
|
@@ -213,5 +223,8 @@ module TCAClient
|
|
213
223
|
else
|
214
224
|
value
|
215
225
|
end
|
216
|
-
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
217
230
|
end
|
@@ -3,13 +3,15 @@
|
|
3
3
|
|
4
4
|
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 1.0.258
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.3.0-SNAPSHOT
|
7
10
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.35
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module TCAClient
|
15
17
|
# The generic object returned for errors. Updated for recent TCA changes.
|
@@ -28,11 +30,16 @@ module TCAClient
|
|
28
30
|
}
|
29
31
|
end
|
30
32
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
31
38
|
# Attribute type mapping.
|
32
39
|
def self.openapi_types
|
33
40
|
{
|
34
|
-
:'status' => :'
|
35
|
-
:'message' => :'
|
41
|
+
:'status' => :'String',
|
42
|
+
:'message' => :'String'
|
36
43
|
}
|
37
44
|
end
|
38
45
|
|
@@ -41,7 +48,7 @@ module TCAClient
|
|
41
48
|
Set.new([
|
42
49
|
])
|
43
50
|
end
|
44
|
-
|
51
|
+
|
45
52
|
# Initializes the object
|
46
53
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
54
|
def initialize(attributes = {})
|
@@ -112,8 +119,11 @@ module TCAClient
|
|
112
119
|
# @return [Object] Returns the model itself
|
113
120
|
def build_from_hash(attributes)
|
114
121
|
return nil unless attributes.is_a?(Hash)
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
123
|
self.class.openapi_types.each_pair do |key, type|
|
116
|
-
if
|
124
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
+
self.send("#{key}=", nil)
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
117
127
|
# check to ensure the input is an array given that the attribute
|
118
128
|
# is documented as an array but the input is not
|
119
129
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -121,8 +131,6 @@ module TCAClient
|
|
121
131
|
end
|
122
132
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
133
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
-
self.send("#{key}=", nil)
|
126
134
|
end
|
127
135
|
end
|
128
136
|
|
@@ -135,8 +143,8 @@ module TCAClient
|
|
135
143
|
# @return [Object] Deserialized data
|
136
144
|
def _deserialize(type, value)
|
137
145
|
case type.to_sym
|
138
|
-
when :
|
139
|
-
|
146
|
+
when :Time
|
147
|
+
Time.parse(value)
|
140
148
|
when :Date
|
141
149
|
Date.parse(value)
|
142
150
|
when :String
|
@@ -166,7 +174,9 @@ module TCAClient
|
|
166
174
|
end
|
167
175
|
end
|
168
176
|
else # model
|
169
|
-
|
177
|
+
# models (e.g. Pet) or oneOf
|
178
|
+
klass = TCAClient.const_get(type)
|
179
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
180
|
end
|
171
181
|
end
|
172
182
|
|
@@ -214,5 +224,8 @@ module TCAClient
|
|
214
224
|
else
|
215
225
|
value
|
216
226
|
end
|
217
|
-
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
218
231
|
end
|
@@ -3,13 +3,15 @@
|
|
3
3
|
|
4
4
|
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 1.0.258
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.3.0-SNAPSHOT
|
7
10
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.35
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module TCAClient
|
15
17
|
# (optional) EULA acceptence information which either updates an existing acceptence or creates a new acceptence
|
@@ -32,12 +34,17 @@ module TCAClient
|
|
32
34
|
}
|
33
35
|
end
|
34
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
35
42
|
# Attribute type mapping.
|
36
43
|
def self.openapi_types
|
37
44
|
{
|
38
|
-
:'accepted_timestamp' => :'
|
39
|
-
:'language' => :'
|
40
|
-
:'version' => :'
|
45
|
+
:'accepted_timestamp' => :'Time',
|
46
|
+
:'language' => :'String',
|
47
|
+
:'version' => :'String'
|
41
48
|
}
|
42
49
|
end
|
43
50
|
|
@@ -46,7 +53,7 @@ module TCAClient
|
|
46
53
|
Set.new([
|
47
54
|
])
|
48
55
|
end
|
49
|
-
|
56
|
+
|
50
57
|
# Initializes the object
|
51
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
59
|
def initialize(attributes = {})
|
@@ -122,8 +129,11 @@ module TCAClient
|
|
122
129
|
# @return [Object] Returns the model itself
|
123
130
|
def build_from_hash(attributes)
|
124
131
|
return nil unless attributes.is_a?(Hash)
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
125
133
|
self.class.openapi_types.each_pair do |key, type|
|
126
|
-
if
|
134
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
135
|
+
self.send("#{key}=", nil)
|
136
|
+
elsif type =~ /\AArray<(.*)>/i
|
127
137
|
# check to ensure the input is an array given that the attribute
|
128
138
|
# is documented as an array but the input is not
|
129
139
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -131,8 +141,6 @@ module TCAClient
|
|
131
141
|
end
|
132
142
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
143
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
135
|
-
self.send("#{key}=", nil)
|
136
144
|
end
|
137
145
|
end
|
138
146
|
|
@@ -145,8 +153,8 @@ module TCAClient
|
|
145
153
|
# @return [Object] Deserialized data
|
146
154
|
def _deserialize(type, value)
|
147
155
|
case type.to_sym
|
148
|
-
when :
|
149
|
-
|
156
|
+
when :Time
|
157
|
+
Time.parse(value)
|
150
158
|
when :Date
|
151
159
|
Date.parse(value)
|
152
160
|
when :String
|
@@ -176,7 +184,9 @@ module TCAClient
|
|
176
184
|
end
|
177
185
|
end
|
178
186
|
else # model
|
179
|
-
|
187
|
+
# models (e.g. Pet) or oneOf
|
188
|
+
klass = TCAClient.const_get(type)
|
189
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
190
|
end
|
181
191
|
end
|
182
192
|
|
@@ -224,5 +234,8 @@ module TCAClient
|
|
224
234
|
else
|
225
235
|
value
|
226
236
|
end
|
227
|
-
end
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
|
228
241
|
end
|
@@ -3,13 +3,15 @@
|
|
3
3
|
|
4
4
|
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 1.0.258
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.3.0-SNAPSHOT
|
7
10
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.35
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module TCAClient
|
15
17
|
class EulaAcceptListItem
|
@@ -35,13 +37,18 @@ module TCAClient
|
|
35
37
|
}
|
36
38
|
end
|
37
39
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
38
45
|
# Attribute type mapping.
|
39
46
|
def self.openapi_types
|
40
47
|
{
|
41
|
-
:'user_id' => :'
|
42
|
-
:'accepted_timestamp' => :'
|
43
|
-
:'language' => :'
|
44
|
-
:'version' => :'
|
48
|
+
:'user_id' => :'String',
|
49
|
+
:'accepted_timestamp' => :'Time',
|
50
|
+
:'language' => :'String',
|
51
|
+
:'version' => :'String'
|
45
52
|
}
|
46
53
|
end
|
47
54
|
|
@@ -50,7 +57,7 @@ module TCAClient
|
|
50
57
|
Set.new([
|
51
58
|
])
|
52
59
|
end
|
53
|
-
|
60
|
+
|
54
61
|
# Initializes the object
|
55
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
56
63
|
def initialize(attributes = {})
|
@@ -131,8 +138,11 @@ module TCAClient
|
|
131
138
|
# @return [Object] Returns the model itself
|
132
139
|
def build_from_hash(attributes)
|
133
140
|
return nil unless attributes.is_a?(Hash)
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
134
142
|
self.class.openapi_types.each_pair do |key, type|
|
135
|
-
if
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
136
146
|
# check to ensure the input is an array given that the attribute
|
137
147
|
# is documented as an array but the input is not
|
138
148
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -140,8 +150,6 @@ module TCAClient
|
|
140
150
|
end
|
141
151
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
142
152
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
143
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
-
self.send("#{key}=", nil)
|
145
153
|
end
|
146
154
|
end
|
147
155
|
|
@@ -154,8 +162,8 @@ module TCAClient
|
|
154
162
|
# @return [Object] Deserialized data
|
155
163
|
def _deserialize(type, value)
|
156
164
|
case type.to_sym
|
157
|
-
when :
|
158
|
-
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
159
167
|
when :Date
|
160
168
|
Date.parse(value)
|
161
169
|
when :String
|
@@ -185,7 +193,9 @@ module TCAClient
|
|
185
193
|
end
|
186
194
|
end
|
187
195
|
else # model
|
188
|
-
|
196
|
+
# models (e.g. Pet) or oneOf
|
197
|
+
klass = TCAClient.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
199
|
end
|
190
200
|
end
|
191
201
|
|
@@ -233,5 +243,8 @@ module TCAClient
|
|
233
243
|
else
|
234
244
|
value
|
235
245
|
end
|
236
|
-
end
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|
249
|
+
|
237
250
|
end
|