tca_client 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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 +202 -111
- 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 +132 -89
- 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 +30 -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/tca_client-1.0.0.gem +0 -0
- data/tca_client.gemspec +7 -7
- metadata +34 -29
- data/docs/InlineResponse200.md +0 -7
- data/docs/SimilarityMetadataTopMatches.md +0 -13
@@ -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 Group
|
@@ -51,12 +53,17 @@ module TCAClient
|
|
51
53
|
}
|
52
54
|
end
|
53
55
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
57
|
+
def self.acceptable_attributes
|
58
|
+
attribute_map.values
|
59
|
+
end
|
60
|
+
|
54
61
|
# Attribute type mapping.
|
55
62
|
def self.openapi_types
|
56
63
|
{
|
57
|
-
:'id' => :'
|
58
|
-
:'name' => :'
|
59
|
-
:'type' => :'
|
64
|
+
:'id' => :'String',
|
65
|
+
:'name' => :'String',
|
66
|
+
:'type' => :'String'
|
60
67
|
}
|
61
68
|
end
|
62
69
|
|
@@ -65,7 +72,7 @@ module TCAClient
|
|
65
72
|
Set.new([
|
66
73
|
])
|
67
74
|
end
|
68
|
-
|
75
|
+
|
69
76
|
# Initializes the object
|
70
77
|
# @param [Hash] attributes Model attributes in the form of hash
|
71
78
|
def initialize(attributes = {})
|
@@ -104,7 +111,7 @@ module TCAClient
|
|
104
111
|
# Check to see if the all the properties in the model are valid
|
105
112
|
# @return true if the model is valid
|
106
113
|
def valid?
|
107
|
-
type_validator = EnumAttributeValidator.new('
|
114
|
+
type_validator = EnumAttributeValidator.new('String', ["ASSIGNMENT", "FOLDER"])
|
108
115
|
return false unless type_validator.valid?(@type)
|
109
116
|
true
|
110
117
|
end
|
@@ -112,7 +119,7 @@ module TCAClient
|
|
112
119
|
# Custom attribute writer method checking allowed values (enum).
|
113
120
|
# @param [Object] type Object to be assigned
|
114
121
|
def type=(type)
|
115
|
-
validator = EnumAttributeValidator.new('
|
122
|
+
validator = EnumAttributeValidator.new('String', ["ASSIGNMENT", "FOLDER"])
|
116
123
|
unless validator.valid?(type)
|
117
124
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
118
125
|
end
|
@@ -153,8 +160,11 @@ module TCAClient
|
|
153
160
|
# @return [Object] Returns the model itself
|
154
161
|
def build_from_hash(attributes)
|
155
162
|
return nil unless attributes.is_a?(Hash)
|
163
|
+
attributes = attributes.transform_keys(&:to_sym)
|
156
164
|
self.class.openapi_types.each_pair do |key, type|
|
157
|
-
if
|
165
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
166
|
+
self.send("#{key}=", nil)
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
158
168
|
# check to ensure the input is an array given that the attribute
|
159
169
|
# is documented as an array but the input is not
|
160
170
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -162,8 +172,6 @@ module TCAClient
|
|
162
172
|
end
|
163
173
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
164
174
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
165
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
166
|
-
self.send("#{key}=", nil)
|
167
175
|
end
|
168
176
|
end
|
169
177
|
|
@@ -176,8 +184,8 @@ module TCAClient
|
|
176
184
|
# @return [Object] Deserialized data
|
177
185
|
def _deserialize(type, value)
|
178
186
|
case type.to_sym
|
179
|
-
when :
|
180
|
-
|
187
|
+
when :Time
|
188
|
+
Time.parse(value)
|
181
189
|
when :Date
|
182
190
|
Date.parse(value)
|
183
191
|
when :String
|
@@ -207,7 +215,9 @@ module TCAClient
|
|
207
215
|
end
|
208
216
|
end
|
209
217
|
else # model
|
210
|
-
|
218
|
+
# models (e.g. Pet) or oneOf
|
219
|
+
klass = TCAClient.const_get(type)
|
220
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
211
221
|
end
|
212
222
|
end
|
213
223
|
|
@@ -255,5 +265,8 @@ module TCAClient
|
|
255
265
|
else
|
256
266
|
value
|
257
267
|
end
|
258
|
-
end
|
268
|
+
end
|
269
|
+
|
270
|
+
end
|
271
|
+
|
259
272
|
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
|
# Object returned for group attachment.
|
@@ -58,13 +60,18 @@ module TCAClient
|
|
58
60
|
}
|
59
61
|
end
|
60
62
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
64
|
+
def self.acceptable_attributes
|
65
|
+
attribute_map.values
|
66
|
+
end
|
67
|
+
|
61
68
|
# Attribute type mapping.
|
62
69
|
def self.openapi_types
|
63
70
|
{
|
64
|
-
:'id' => :'
|
65
|
-
:'title' => :'
|
66
|
-
:'status' => :'
|
67
|
-
:'template' => :'
|
71
|
+
:'id' => :'String',
|
72
|
+
:'title' => :'String',
|
73
|
+
:'status' => :'String',
|
74
|
+
:'template' => :'Boolean'
|
68
75
|
}
|
69
76
|
end
|
70
77
|
|
@@ -73,7 +80,7 @@ module TCAClient
|
|
73
80
|
Set.new([
|
74
81
|
])
|
75
82
|
end
|
76
|
-
|
83
|
+
|
77
84
|
# Initializes the object
|
78
85
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
86
|
def initialize(attributes = {})
|
@@ -116,7 +123,7 @@ module TCAClient
|
|
116
123
|
# Check to see if the all the properties in the model are valid
|
117
124
|
# @return true if the model is valid
|
118
125
|
def valid?
|
119
|
-
status_validator = EnumAttributeValidator.new('
|
126
|
+
status_validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "COMPLETE", "ERROR", "DELETE"])
|
120
127
|
return false unless status_validator.valid?(@status)
|
121
128
|
true
|
122
129
|
end
|
@@ -124,7 +131,7 @@ module TCAClient
|
|
124
131
|
# Custom attribute writer method checking allowed values (enum).
|
125
132
|
# @param [Object] status Object to be assigned
|
126
133
|
def status=(status)
|
127
|
-
validator = EnumAttributeValidator.new('
|
134
|
+
validator = EnumAttributeValidator.new('String', ["CREATED", "PROCESSING", "COMPLETE", "ERROR", "DELETE"])
|
128
135
|
unless validator.valid?(status)
|
129
136
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
130
137
|
end
|
@@ -166,8 +173,11 @@ module TCAClient
|
|
166
173
|
# @return [Object] Returns the model itself
|
167
174
|
def build_from_hash(attributes)
|
168
175
|
return nil unless attributes.is_a?(Hash)
|
176
|
+
attributes = attributes.transform_keys(&:to_sym)
|
169
177
|
self.class.openapi_types.each_pair do |key, type|
|
170
|
-
if
|
178
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
179
|
+
self.send("#{key}=", nil)
|
180
|
+
elsif type =~ /\AArray<(.*)>/i
|
171
181
|
# check to ensure the input is an array given that the attribute
|
172
182
|
# is documented as an array but the input is not
|
173
183
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -175,8 +185,6 @@ module TCAClient
|
|
175
185
|
end
|
176
186
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
177
187
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
178
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
179
|
-
self.send("#{key}=", nil)
|
180
188
|
end
|
181
189
|
end
|
182
190
|
|
@@ -189,8 +197,8 @@ module TCAClient
|
|
189
197
|
# @return [Object] Deserialized data
|
190
198
|
def _deserialize(type, value)
|
191
199
|
case type.to_sym
|
192
|
-
when :
|
193
|
-
|
200
|
+
when :Time
|
201
|
+
Time.parse(value)
|
194
202
|
when :Date
|
195
203
|
Date.parse(value)
|
196
204
|
when :String
|
@@ -220,7 +228,9 @@ module TCAClient
|
|
220
228
|
end
|
221
229
|
end
|
222
230
|
else # model
|
223
|
-
|
231
|
+
# models (e.g. Pet) or oneOf
|
232
|
+
klass = TCAClient.const_get(type)
|
233
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
234
|
end
|
225
235
|
end
|
226
236
|
|
@@ -268,5 +278,8 @@ module TCAClient
|
|
268
278
|
else
|
269
279
|
value
|
270
280
|
end
|
271
|
-
end
|
281
|
+
end
|
282
|
+
|
283
|
+
end
|
284
|
+
|
272
285
|
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 GroupContext
|
@@ -29,12 +31,17 @@ module TCAClient
|
|
29
31
|
}
|
30
32
|
end
|
31
33
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
35
|
+
def self.acceptable_attributes
|
36
|
+
attribute_map.values
|
37
|
+
end
|
38
|
+
|
32
39
|
# Attribute type mapping.
|
33
40
|
def self.openapi_types
|
34
41
|
{
|
35
|
-
:'id' => :'
|
36
|
-
:'name' => :'
|
37
|
-
:'owners' => :'
|
42
|
+
:'id' => :'String',
|
43
|
+
:'name' => :'String',
|
44
|
+
:'owners' => :'Array<Users>'
|
38
45
|
}
|
39
46
|
end
|
40
47
|
|
@@ -43,7 +50,7 @@ module TCAClient
|
|
43
50
|
Set.new([
|
44
51
|
])
|
45
52
|
end
|
46
|
-
|
53
|
+
|
47
54
|
# Initializes the object
|
48
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
49
56
|
def initialize(attributes = {})
|
@@ -121,8 +128,11 @@ module TCAClient
|
|
121
128
|
# @return [Object] Returns the model itself
|
122
129
|
def build_from_hash(attributes)
|
123
130
|
return nil unless attributes.is_a?(Hash)
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
124
132
|
self.class.openapi_types.each_pair do |key, type|
|
125
|
-
if
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
+
self.send("#{key}=", nil)
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
126
136
|
# check to ensure the input is an array given that the attribute
|
127
137
|
# is documented as an array but the input is not
|
128
138
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -130,8 +140,6 @@ module TCAClient
|
|
130
140
|
end
|
131
141
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
142
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
-
self.send("#{key}=", nil)
|
135
143
|
end
|
136
144
|
end
|
137
145
|
|
@@ -144,8 +152,8 @@ module TCAClient
|
|
144
152
|
# @return [Object] Deserialized data
|
145
153
|
def _deserialize(type, value)
|
146
154
|
case type.to_sym
|
147
|
-
when :
|
148
|
-
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
149
157
|
when :Date
|
150
158
|
Date.parse(value)
|
151
159
|
when :String
|
@@ -175,7 +183,9 @@ module TCAClient
|
|
175
183
|
end
|
176
184
|
end
|
177
185
|
else # model
|
178
|
-
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = TCAClient.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
189
|
end
|
180
190
|
end
|
181
191
|
|
@@ -223,5 +233,8 @@ module TCAClient
|
|
223
233
|
else
|
224
234
|
value
|
225
235
|
end
|
226
|
-
end
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
227
240
|
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 IndexStateSettings
|
@@ -23,10 +25,15 @@ module TCAClient
|
|
23
25
|
}
|
24
26
|
end
|
25
27
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
26
33
|
# Attribute type mapping.
|
27
34
|
def self.openapi_types
|
28
35
|
{
|
29
|
-
:'is_indexed' => :'
|
36
|
+
:'is_indexed' => :'Boolean'
|
30
37
|
}
|
31
38
|
end
|
32
39
|
|
@@ -35,7 +42,7 @@ module TCAClient
|
|
35
42
|
Set.new([
|
36
43
|
])
|
37
44
|
end
|
38
|
-
|
45
|
+
|
39
46
|
# Initializes the object
|
40
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
41
48
|
def initialize(attributes = {})
|
@@ -101,8 +108,11 @@ module TCAClient
|
|
101
108
|
# @return [Object] Returns the model itself
|
102
109
|
def build_from_hash(attributes)
|
103
110
|
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
104
112
|
self.class.openapi_types.each_pair do |key, type|
|
105
|
-
if
|
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
|
106
116
|
# check to ensure the input is an array given that the attribute
|
107
117
|
# is documented as an array but the input is not
|
108
118
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -110,8 +120,6 @@ module TCAClient
|
|
110
120
|
end
|
111
121
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
112
122
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
113
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
-
self.send("#{key}=", nil)
|
115
123
|
end
|
116
124
|
end
|
117
125
|
|
@@ -124,8 +132,8 @@ module TCAClient
|
|
124
132
|
# @return [Object] Deserialized data
|
125
133
|
def _deserialize(type, value)
|
126
134
|
case type.to_sym
|
127
|
-
when :
|
128
|
-
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
129
137
|
when :Date
|
130
138
|
Date.parse(value)
|
131
139
|
when :String
|
@@ -155,7 +163,9 @@ module TCAClient
|
|
155
163
|
end
|
156
164
|
end
|
157
165
|
else # model
|
158
|
-
|
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)
|
159
169
|
end
|
160
170
|
end
|
161
171
|
|
@@ -203,5 +213,8 @@ module TCAClient
|
|
203
213
|
else
|
204
214
|
value
|
205
215
|
end
|
206
|
-
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
|
207
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 IndexingSettings
|
@@ -23,10 +25,15 @@ module TCAClient
|
|
23
25
|
}
|
24
26
|
end
|
25
27
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
26
33
|
# Attribute type mapping.
|
27
34
|
def self.openapi_types
|
28
35
|
{
|
29
|
-
:'add_to_index' => :'
|
36
|
+
:'add_to_index' => :'Boolean'
|
30
37
|
}
|
31
38
|
end
|
32
39
|
|
@@ -35,7 +42,7 @@ module TCAClient
|
|
35
42
|
Set.new([
|
36
43
|
])
|
37
44
|
end
|
38
|
-
|
45
|
+
|
39
46
|
# Initializes the object
|
40
47
|
# @param [Hash] attributes Model attributes in the form of hash
|
41
48
|
def initialize(attributes = {})
|
@@ -101,8 +108,11 @@ module TCAClient
|
|
101
108
|
# @return [Object] Returns the model itself
|
102
109
|
def build_from_hash(attributes)
|
103
110
|
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
104
112
|
self.class.openapi_types.each_pair do |key, type|
|
105
|
-
if
|
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
|
106
116
|
# check to ensure the input is an array given that the attribute
|
107
117
|
# is documented as an array but the input is not
|
108
118
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -110,8 +120,6 @@ module TCAClient
|
|
110
120
|
end
|
111
121
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
112
122
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
113
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
-
self.send("#{key}=", nil)
|
115
123
|
end
|
116
124
|
end
|
117
125
|
|
@@ -124,8 +132,8 @@ module TCAClient
|
|
124
132
|
# @return [Object] Deserialized data
|
125
133
|
def _deserialize(type, value)
|
126
134
|
case type.to_sym
|
127
|
-
when :
|
128
|
-
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
129
137
|
when :Date
|
130
138
|
Date.parse(value)
|
131
139
|
when :String
|
@@ -155,7 +163,9 @@ module TCAClient
|
|
155
163
|
end
|
156
164
|
end
|
157
165
|
else # model
|
158
|
-
|
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)
|
159
169
|
end
|
160
170
|
end
|
161
171
|
|
@@ -203,5 +213,8 @@ module TCAClient
|
|
203
213
|
else
|
204
214
|
value
|
205
215
|
end
|
206
|
-
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
|
207
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 PdfStatusResponse
|
@@ -45,10 +47,15 @@ module TCAClient
|
|
45
47
|
}
|
46
48
|
end
|
47
49
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
51
|
+
def self.acceptable_attributes
|
52
|
+
attribute_map.values
|
53
|
+
end
|
54
|
+
|
48
55
|
# Attribute type mapping.
|
49
56
|
def self.openapi_types
|
50
57
|
{
|
51
|
-
:'status' => :'
|
58
|
+
:'status' => :'String'
|
52
59
|
}
|
53
60
|
end
|
54
61
|
|
@@ -57,7 +64,7 @@ module TCAClient
|
|
57
64
|
Set.new([
|
58
65
|
])
|
59
66
|
end
|
60
|
-
|
67
|
+
|
61
68
|
# Initializes the object
|
62
69
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
70
|
def initialize(attributes = {})
|
@@ -88,7 +95,7 @@ module TCAClient
|
|
88
95
|
# Check to see if the all the properties in the model are valid
|
89
96
|
# @return true if the model is valid
|
90
97
|
def valid?
|
91
|
-
status_validator = EnumAttributeValidator.new('
|
98
|
+
status_validator = EnumAttributeValidator.new('String', ["SUCCESS", "PENDING", "FAILED"])
|
92
99
|
return false unless status_validator.valid?(@status)
|
93
100
|
true
|
94
101
|
end
|
@@ -96,7 +103,7 @@ module TCAClient
|
|
96
103
|
# Custom attribute writer method checking allowed values (enum).
|
97
104
|
# @param [Object] status Object to be assigned
|
98
105
|
def status=(status)
|
99
|
-
validator = EnumAttributeValidator.new('
|
106
|
+
validator = EnumAttributeValidator.new('String', ["SUCCESS", "PENDING", "FAILED"])
|
100
107
|
unless validator.valid?(status)
|
101
108
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
102
109
|
end
|
@@ -135,8 +142,11 @@ module TCAClient
|
|
135
142
|
# @return [Object] Returns the model itself
|
136
143
|
def build_from_hash(attributes)
|
137
144
|
return nil unless attributes.is_a?(Hash)
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
138
146
|
self.class.openapi_types.each_pair do |key, type|
|
139
|
-
if
|
147
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
148
|
+
self.send("#{key}=", nil)
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
140
150
|
# check to ensure the input is an array given that the attribute
|
141
151
|
# is documented as an array but the input is not
|
142
152
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -144,8 +154,6 @@ module TCAClient
|
|
144
154
|
end
|
145
155
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
156
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
148
|
-
self.send("#{key}=", nil)
|
149
157
|
end
|
150
158
|
end
|
151
159
|
|
@@ -158,8 +166,8 @@ module TCAClient
|
|
158
166
|
# @return [Object] Deserialized data
|
159
167
|
def _deserialize(type, value)
|
160
168
|
case type.to_sym
|
161
|
-
when :
|
162
|
-
|
169
|
+
when :Time
|
170
|
+
Time.parse(value)
|
163
171
|
when :Date
|
164
172
|
Date.parse(value)
|
165
173
|
when :String
|
@@ -189,7 +197,9 @@ module TCAClient
|
|
189
197
|
end
|
190
198
|
end
|
191
199
|
else # model
|
192
|
-
|
200
|
+
# models (e.g. Pet) or oneOf
|
201
|
+
klass = TCAClient.const_get(type)
|
202
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
203
|
end
|
194
204
|
end
|
195
205
|
|
@@ -237,5 +247,8 @@ module TCAClient
|
|
237
247
|
else
|
238
248
|
value
|
239
249
|
end
|
240
|
-
end
|
250
|
+
end
|
251
|
+
|
252
|
+
end
|
253
|
+
|
241
254
|
end
|