tca_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +862 -0
- data/Rakefile +8 -0
- data/docs/AddGroupAttachmentRequest.md +8 -0
- data/docs/AddGroupAttachmentResponse.md +7 -0
- data/docs/AggregateGroup.md +12 -0
- data/docs/AuthorMetadataOverride.md +8 -0
- data/docs/EULAApi.md +241 -0
- data/docs/Error.md +8 -0
- data/docs/Eula.md +9 -0
- data/docs/EulaAcceptListItem.md +10 -0
- data/docs/EulaAcceptRequest.md +10 -0
- data/docs/EulaVersion.md +11 -0
- data/docs/FeaturesApi.md +61 -0
- data/docs/FeaturesEnabled.md +10 -0
- data/docs/FeaturesGenerationSettings.md +8 -0
- data/docs/FeaturesSimilarity.md +9 -0
- data/docs/FeaturesSimilarityViewSettings.md +19 -0
- data/docs/FeaturesTenant.md +7 -0
- data/docs/FeaturesViewerModes.md +8 -0
- data/docs/Group.md +9 -0
- data/docs/GroupAttachmentResponse.md +10 -0
- data/docs/GroupContext.md +9 -0
- data/docs/GroupsApi.md +472 -0
- data/docs/IndexApi.md +119 -0
- data/docs/IndexStateSettings.md +7 -0
- data/docs/IndexingSettings.md +7 -0
- data/docs/InlineResponse200.md +7 -0
- data/docs/PdfStatusResponse.md +7 -0
- data/docs/RateLimitError.md +8 -0
- data/docs/RequestPdfResponse.md +7 -0
- data/docs/Sidebar.md +7 -0
- data/docs/SimilarityApi.md +351 -0
- data/docs/SimilarityGenerationSettings.md +10 -0
- data/docs/SimilarityMetadata.md +16 -0
- data/docs/SimilarityMetadataTopMatches.md +13 -0
- data/docs/SimilarityPutRequest.md +9 -0
- data/docs/SimilarityScoreData.md +10 -0
- data/docs/SimilaritySettings.md +9 -0
- data/docs/SimilaritySettingsModes.md +8 -0
- data/docs/SimilaritySettingsViewSettings.md +7 -0
- data/docs/SimilarityViewSettings.md +19 -0
- data/docs/SimilarityViewerUrlResponse.md +7 -0
- data/docs/SimilarityViewerUrlSettings.md +14 -0
- data/docs/SimpleSubmissionResponse.md +6 -0
- data/docs/Submission.md +6 -0
- data/docs/SubmissionApi.md +296 -0
- data/docs/SubmissionBase.md +15 -0
- data/docs/SubmissionBaseMetadata.md +12 -0
- data/docs/SubmissionSizeError.md +8 -0
- data/docs/SuccessMessage.md +7 -0
- data/docs/Users.md +10 -0
- data/docs/ViewerPermissions.md +11 -0
- data/docs/Webhook.md +10 -0
- data/docs/WebhookApi.md +286 -0
- data/docs/WebhookBase.md +10 -0
- data/docs/WebhookPathRequest.md +8 -0
- data/docs/WebhookWithSecret.md +10 -0
- data/git_push.sh +55 -0
- data/lib/tca_client/api/eula_api.rb +312 -0
- data/lib/tca_client/api/features_api.rb +82 -0
- data/lib/tca_client/api/groups_api.rb +627 -0
- data/lib/tca_client/api/index_api.rb +156 -0
- data/lib/tca_client/api/similarity_api.rb +456 -0
- data/lib/tca_client/api/submission_api.rb +387 -0
- data/lib/tca_client/api/webhook_api.rb +364 -0
- data/lib/tca_client/api_client.rb +388 -0
- data/lib/tca_client/api_error.rb +57 -0
- data/lib/tca_client/configuration.rb +205 -0
- data/lib/tca_client/models/add_group_attachment_request.rb +220 -0
- data/lib/tca_client/models/add_group_attachment_response.rb +208 -0
- data/lib/tca_client/models/aggregate_group.rb +299 -0
- data/lib/tca_client/models/author_metadata_override.rb +217 -0
- data/lib/tca_client/models/error.rb +218 -0
- data/lib/tca_client/models/eula.rb +228 -0
- data/lib/tca_client/models/eula_accept_list_item.rb +237 -0
- data/lib/tca_client/models/eula_accept_request.rb +237 -0
- data/lib/tca_client/models/eula_version.rb +272 -0
- data/lib/tca_client/models/features_enabled.rb +257 -0
- data/lib/tca_client/models/features_generation_settings.rb +240 -0
- data/lib/tca_client/models/features_similarity.rb +224 -0
- data/lib/tca_client/models/features_similarity_view_settings.rb +327 -0
- data/lib/tca_client/models/features_tenant.rb +207 -0
- data/lib/tca_client/models/features_viewer_modes.rb +215 -0
- data/lib/tca_client/models/group.rb +259 -0
- data/lib/tca_client/models/group_attachment_response.rb +272 -0
- data/lib/tca_client/models/group_context.rb +227 -0
- data/lib/tca_client/models/index_state_settings.rb +207 -0
- data/lib/tca_client/models/indexing_settings.rb +207 -0
- data/lib/tca_client/models/inline_response_200.rb +208 -0
- data/lib/tca_client/models/pdf_status_response.rb +241 -0
- data/lib/tca_client/models/rate_limit_error.rb +221 -0
- data/lib/tca_client/models/request_pdf_response.rb +207 -0
- data/lib/tca_client/models/sidebar.rb +241 -0
- data/lib/tca_client/models/similarity_generation_settings.rb +280 -0
- data/lib/tca_client/models/similarity_metadata.rb +340 -0
- data/lib/tca_client/models/similarity_metadata_top_matches.rb +267 -0
- data/lib/tca_client/models/similarity_put_request.rb +229 -0
- data/lib/tca_client/models/similarity_score_data.rb +245 -0
- data/lib/tca_client/models/similarity_settings.rb +259 -0
- data/lib/tca_client/models/similarity_settings_modes.rb +217 -0
- data/lib/tca_client/models/similarity_settings_view_settings.rb +207 -0
- data/lib/tca_client/models/similarity_view_settings.rb +327 -0
- data/lib/tca_client/models/similarity_viewer_url_response.rb +207 -0
- data/lib/tca_client/models/similarity_viewer_url_settings.rb +306 -0
- data/lib/tca_client/models/simple_submission_response.rb +197 -0
- data/lib/tca_client/models/submission.rb +197 -0
- data/lib/tca_client/models/submission_base.rb +332 -0
- data/lib/tca_client/models/submission_base_metadata.rb +256 -0
- data/lib/tca_client/models/submission_size_error.rb +221 -0
- data/lib/tca_client/models/success_message.rb +208 -0
- data/lib/tca_client/models/users.rb +234 -0
- data/lib/tca_client/models/viewer_permissions.rb +247 -0
- data/lib/tca_client/models/webhook.rb +271 -0
- data/lib/tca_client/models/webhook_base.rb +271 -0
- data/lib/tca_client/models/webhook_path_request.rb +246 -0
- data/lib/tca_client/models/webhook_with_secret.rb +271 -0
- data/lib/tca_client/version.rb +14 -0
- data/lib/tca_client.rb +93 -0
- data/spec/api/eula_api_spec.rb +90 -0
- data/spec/api/features_api_spec.rb +46 -0
- data/spec/api/groups_api_spec.rb +147 -0
- data/spec/api/index_api_spec.rb +60 -0
- data/spec/api/similarity_api_spec.rb +116 -0
- data/spec/api/submission_api_spec.rb +103 -0
- data/spec/api/webhook_api_spec.rb +99 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/add_group_attachment_request_spec.rb +46 -0
- data/spec/models/add_group_attachment_response_spec.rb +40 -0
- data/spec/models/aggregate_group_spec.rb +78 -0
- data/spec/models/author_metadata_override_spec.rb +46 -0
- data/spec/models/error_spec.rb +46 -0
- data/spec/models/eula_accept_list_item_spec.rb +58 -0
- data/spec/models/eula_accept_request_spec.rb +58 -0
- data/spec/models/eula_spec.rb +52 -0
- data/spec/models/eula_version_spec.rb +68 -0
- data/spec/models/features_enabled_spec.rb +62 -0
- data/spec/models/features_generation_settings_spec.rb +50 -0
- data/spec/models/features_similarity_spec.rb +52 -0
- data/spec/models/features_similarity_view_settings_spec.rb +112 -0
- data/spec/models/features_tenant_spec.rb +40 -0
- data/spec/models/features_viewer_modes_spec.rb +46 -0
- data/spec/models/group_attachment_response_spec.rb +62 -0
- data/spec/models/group_context_spec.rb +52 -0
- data/spec/models/group_spec.rb +56 -0
- data/spec/models/index_state_settings_spec.rb +40 -0
- data/spec/models/indexing_settings_spec.rb +40 -0
- data/spec/models/inline_response_200_spec.rb +40 -0
- data/spec/models/pdf_status_response_spec.rb +44 -0
- data/spec/models/rate_limit_error_spec.rb +46 -0
- data/spec/models/request_pdf_response_spec.rb +40 -0
- data/spec/models/sidebar_spec.rb +44 -0
- data/spec/models/similarity_generation_settings_spec.rb +66 -0
- data/spec/models/similarity_metadata_spec.rb +94 -0
- data/spec/models/similarity_metadata_top_matches_spec.rb +76 -0
- data/spec/models/similarity_put_request_spec.rb +52 -0
- data/spec/models/similarity_score_data_spec.rb +58 -0
- data/spec/models/similarity_settings_modes_spec.rb +46 -0
- data/spec/models/similarity_settings_spec.rb +56 -0
- data/spec/models/similarity_settings_view_settings_spec.rb +40 -0
- data/spec/models/similarity_view_settings_spec.rb +112 -0
- data/spec/models/similarity_viewer_url_response_spec.rb +40 -0
- data/spec/models/similarity_viewer_url_settings_spec.rb +86 -0
- data/spec/models/simple_submission_response_spec.rb +34 -0
- data/spec/models/submission_base_metadata_spec.rb +70 -0
- data/spec/models/submission_base_spec.rb +96 -0
- data/spec/models/submission_size_error_spec.rb +46 -0
- data/spec/models/submission_spec.rb +34 -0
- data/spec/models/success_message_spec.rb +40 -0
- data/spec/models/users_spec.rb +58 -0
- data/spec/models/viewer_permissions_spec.rb +64 -0
- data/spec/models/webhook_base_spec.rb +62 -0
- data/spec/models/webhook_path_request_spec.rb +50 -0
- data/spec/models/webhook_spec.rb +62 -0
- data/spec/models/webhook_with_secret_spec.rb +62 -0
- data/spec/spec_helper.rb +110 -0
- data/tca_client.gemspec +38 -0
- metadata +365 -0
data/README.md
ADDED
@@ -0,0 +1,862 @@
|
|
1
|
+
# tca_client
|
2
|
+
|
3
|
+
TCAClient - the Ruby gem for the Turnitin Core API
|
4
|
+
|
5
|
+
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).
|
6
|
+
|
7
|
+
## Integration Scope and API Key Management
|
8
|
+
|
9
|
+
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)
|
10
|
+
|
11
|
+
* Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys
|
12
|
+
* Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button`
|
13
|
+
* Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show)
|
14
|
+
|
15
|
+
## TCA Flow
|
16
|
+
|
17
|
+
* Register a webhook
|
18
|
+
* Create a submission
|
19
|
+
* Upload a file for the submission
|
20
|
+
* Wait for the submission upload to process
|
21
|
+
* If you registered a webhook, a callback will be sent to it when upload is complete
|
22
|
+
* The status of the *submission* will also update to `COMPLETE`
|
23
|
+
* Request a Similarity Report
|
24
|
+
* Wait for the similarity report to process
|
25
|
+
* If you registered a webhook, a callback will be sent to it when report is complete
|
26
|
+
* The status of the *report* will also be updated to `COMPLETE`
|
27
|
+
* Request a URL with parameters to view the Similarity Report
|
28
|
+
|
29
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
30
|
+
|
31
|
+
* API version: 1.0.249
|
32
|
+
* Package version: 1.0.0
|
33
|
+
* Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen
|
34
|
+
|
35
|
+
## Installation
|
36
|
+
|
37
|
+
### Build a gem
|
38
|
+
|
39
|
+
To build the Ruby code into a gem:
|
40
|
+
|
41
|
+
```shell
|
42
|
+
gem build tca_client.gemspec
|
43
|
+
```
|
44
|
+
|
45
|
+
Then either install the gem locally:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
gem install ./tca_client-1.0.0.gem
|
49
|
+
```
|
50
|
+
|
51
|
+
(for development, run `gem install --dev ./tca_client-1.0.0.gem` to install the development dependencies)
|
52
|
+
|
53
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
54
|
+
|
55
|
+
Finally add this to the Gemfile:
|
56
|
+
|
57
|
+
```bundler
|
58
|
+
gem 'tca_client', '~> 1.0.0'
|
59
|
+
```
|
60
|
+
|
61
|
+
### Install from Git
|
62
|
+
|
63
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
64
|
+
|
65
|
+
```bundler
|
66
|
+
gem 'tca_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
67
|
+
```
|
68
|
+
|
69
|
+
### Include the Ruby code directly
|
70
|
+
|
71
|
+
Include the Ruby code directly using `-I` as follows:
|
72
|
+
|
73
|
+
```shell
|
74
|
+
ruby -Ilib script.rb
|
75
|
+
```
|
76
|
+
|
77
|
+
## Getting Started
|
78
|
+
|
79
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
# Load the gem
|
83
|
+
require 'tca_client'
|
84
|
+
# Setup authorization
|
85
|
+
TCAClient.configure do |config|
|
86
|
+
# Configure API key authorization: api_key
|
87
|
+
config.api_key['Authorization'] = ENV['TCA_API_KEY']
|
88
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
89
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
90
|
+
config.host = ENV['TCA_HOST']
|
91
|
+
config.base_path = 'api/v1'
|
92
|
+
end
|
93
|
+
|
94
|
+
api_instance = TCAClient::EULAApi.new
|
95
|
+
|
96
|
+
x_turnitin_integration_name = 'integration-name' # String | a human readable string representing the type of integration being used
|
97
|
+
x_turnitin_integration_version = '1.0' # String | the version of the integration platform being used
|
98
|
+
|
99
|
+
|
100
|
+
latest_eula = api_instance.eula_version_id_get(x_turnitin_integration_name, x_turnitin_integration_version, 'latest')
|
101
|
+
p latest_eula.version
|
102
|
+
|
103
|
+
version_id = latest_eula.version # String | The EULA version ID (or `latest`)
|
104
|
+
|
105
|
+
user_id = 'a_user'
|
106
|
+
|
107
|
+
begin
|
108
|
+
result = api_instance.eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id)
|
109
|
+
rescue TCAClient::ApiError => e
|
110
|
+
false
|
111
|
+
end
|
112
|
+
|
113
|
+
begin
|
114
|
+
body = TCAClient::EulaAcceptRequest.new # EulaAcceptRequest
|
115
|
+
body.user_id = 'a_user'
|
116
|
+
body.language = 'en-us'
|
117
|
+
body.accepted_timestamp = DateTime.now
|
118
|
+
body.version = latest_eula.version
|
119
|
+
|
120
|
+
#Accepts a particular EULA version on behalf of an external user
|
121
|
+
result = api_instance.eula_version_id_accept_post(body, x_turnitin_integration_name, x_turnitin_integration_version, version_id)
|
122
|
+
p result
|
123
|
+
rescue TCAClient::ApiError => e
|
124
|
+
puts "Exception when calling EULAApi->eula_version_id_accept_post: #{e}"
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
begin
|
129
|
+
#Queries the acceptences of a particular EULA version on behalf of an external user
|
130
|
+
result = api_instance.eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id)
|
131
|
+
p result
|
132
|
+
rescue TCAClient::ApiError => e
|
133
|
+
puts "Exception when calling EULAApi->eula_version_id_accept_user_id_get: #{e}"
|
134
|
+
end
|
135
|
+
# Setup authorization
|
136
|
+
TCAClient.configure do |config|
|
137
|
+
# Configure API key authorization: api_key
|
138
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
139
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
140
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
141
|
+
end
|
142
|
+
|
143
|
+
api_instance = TCAClient::EULAApi.new
|
144
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
145
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
146
|
+
version_id = 'version_id_example' # String | The EULA version ID (or `latest`)
|
147
|
+
opts = {
|
148
|
+
lang: 'lang_example' # String | The desired language of the specified EULA version
|
149
|
+
}
|
150
|
+
|
151
|
+
begin
|
152
|
+
#Gets information about a particular EULA version
|
153
|
+
result = api_instance.eula_version_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, opts)
|
154
|
+
p result
|
155
|
+
rescue TCAClient::ApiError => e
|
156
|
+
puts "Exception when calling EULAApi->eula_version_id_get: #{e}"
|
157
|
+
end
|
158
|
+
# Setup authorization
|
159
|
+
TCAClient.configure do |config|
|
160
|
+
# Configure API key authorization: api_key
|
161
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
162
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
163
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
164
|
+
end
|
165
|
+
|
166
|
+
api_instance = TCAClient::EULAApi.new
|
167
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
168
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
169
|
+
version_id = 'version_id_example' # String | The EULA version ID (or `latest`)
|
170
|
+
opts = {
|
171
|
+
lang: 'lang_example' # String | The desired language of the specified EULA version
|
172
|
+
}
|
173
|
+
|
174
|
+
begin
|
175
|
+
#Gets the text of a particular EULA version
|
176
|
+
result = api_instance.eula_version_id_view_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, opts)
|
177
|
+
p result
|
178
|
+
rescue TCAClient::ApiError => e
|
179
|
+
puts "Exception when calling EULAApi->eula_version_id_view_get: #{e}"
|
180
|
+
end
|
181
|
+
# Setup authorization
|
182
|
+
TCAClient.configure do |config|
|
183
|
+
# Configure API key authorization: api_key
|
184
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
185
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
186
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
187
|
+
end
|
188
|
+
|
189
|
+
api_instance = TCAClient::FeaturesApi.new
|
190
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
191
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
192
|
+
|
193
|
+
|
194
|
+
begin
|
195
|
+
#Get information about what features are allowed by the current license
|
196
|
+
result = api_instance.features_enabled_get(x_turnitin_integration_name, x_turnitin_integration_version)
|
197
|
+
p result
|
198
|
+
rescue TCAClient::ApiError => e
|
199
|
+
puts "Exception when calling FeaturesApi->features_enabled_get: #{e}"
|
200
|
+
end
|
201
|
+
# Setup authorization
|
202
|
+
TCAClient.configure do |config|
|
203
|
+
# Configure API key authorization: api_key
|
204
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
205
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
206
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
207
|
+
end
|
208
|
+
|
209
|
+
api_instance = TCAClient::GroupsApi.new
|
210
|
+
body = TCAClient::AddGroupAttachmentRequest.new # AddGroupAttachmentRequest |
|
211
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
212
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
213
|
+
group_id = 'group_id_example' # String | group_id
|
214
|
+
|
215
|
+
|
216
|
+
begin
|
217
|
+
#Add attachment to a group. will create a group if it does not exist.
|
218
|
+
result = api_instance.add_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id)
|
219
|
+
p result
|
220
|
+
rescue TCAClient::ApiError => e
|
221
|
+
puts "Exception when calling GroupsApi->add_group_attachment: #{e}"
|
222
|
+
end
|
223
|
+
# Setup authorization
|
224
|
+
TCAClient.configure do |config|
|
225
|
+
# Configure API key authorization: api_key
|
226
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
227
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
228
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
229
|
+
end
|
230
|
+
|
231
|
+
api_instance = TCAClient::GroupsApi.new
|
232
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
233
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
234
|
+
group_id = 'group_id_example' # String | group_id
|
235
|
+
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
|
236
|
+
|
237
|
+
|
238
|
+
begin
|
239
|
+
#Hard delete group attachment
|
240
|
+
api_instance.delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
|
241
|
+
rescue TCAClient::ApiError => e
|
242
|
+
puts "Exception when calling GroupsApi->delete_group_attachment: #{e}"
|
243
|
+
end
|
244
|
+
# Setup authorization
|
245
|
+
TCAClient.configure do |config|
|
246
|
+
# Configure API key authorization: api_key
|
247
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
248
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
249
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
250
|
+
end
|
251
|
+
|
252
|
+
api_instance = TCAClient::GroupsApi.new
|
253
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
254
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
255
|
+
group_id = 'group_id_example' # String | group_id
|
256
|
+
|
257
|
+
|
258
|
+
begin
|
259
|
+
#Get group, group context and group context owners info
|
260
|
+
result = api_instance.get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id)
|
261
|
+
p result
|
262
|
+
rescue TCAClient::ApiError => e
|
263
|
+
puts "Exception when calling GroupsApi->get_group: #{e}"
|
264
|
+
end
|
265
|
+
# Setup authorization
|
266
|
+
TCAClient.configure do |config|
|
267
|
+
# Configure API key authorization: api_key
|
268
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
269
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
270
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
271
|
+
end
|
272
|
+
|
273
|
+
api_instance = TCAClient::GroupsApi.new
|
274
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
275
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
276
|
+
group_id = 'group_id_example' # String | group_id
|
277
|
+
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
|
278
|
+
|
279
|
+
|
280
|
+
begin
|
281
|
+
#Get group attachment
|
282
|
+
result = api_instance.get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
|
283
|
+
p result
|
284
|
+
rescue TCAClient::ApiError => e
|
285
|
+
puts "Exception when calling GroupsApi->get_group_attachment: #{e}"
|
286
|
+
end
|
287
|
+
# Setup authorization
|
288
|
+
TCAClient.configure do |config|
|
289
|
+
# Configure API key authorization: api_key
|
290
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
291
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
292
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
293
|
+
end
|
294
|
+
|
295
|
+
api_instance = TCAClient::GroupsApi.new
|
296
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
297
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
298
|
+
group_id = 'group_id_example' # String | group_id
|
299
|
+
|
300
|
+
|
301
|
+
begin
|
302
|
+
#Get all attachments
|
303
|
+
result = api_instance.get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id)
|
304
|
+
p result
|
305
|
+
rescue TCAClient::ApiError => e
|
306
|
+
puts "Exception when calling GroupsApi->get_group_attachments: #{e}"
|
307
|
+
end
|
308
|
+
# Setup authorization
|
309
|
+
TCAClient.configure do |config|
|
310
|
+
# Configure API key authorization: api_key
|
311
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
312
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
313
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
314
|
+
end
|
315
|
+
|
316
|
+
api_instance = TCAClient::GroupsApi.new
|
317
|
+
body = TCAClient::AggregateGroup.new # AggregateGroup |
|
318
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
319
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
320
|
+
group_id = 'group_id_example' # String | group_id
|
321
|
+
|
322
|
+
|
323
|
+
begin
|
324
|
+
#upsert group, group context and group context owners info
|
325
|
+
result = api_instance.groups_group_id_put(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id)
|
326
|
+
p result
|
327
|
+
rescue TCAClient::ApiError => e
|
328
|
+
puts "Exception when calling GroupsApi->groups_group_id_put: #{e}"
|
329
|
+
end
|
330
|
+
# Setup authorization
|
331
|
+
TCAClient.configure do |config|
|
332
|
+
# Configure API key authorization: api_key
|
333
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
334
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
335
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
336
|
+
end
|
337
|
+
|
338
|
+
api_instance = TCAClient::GroupsApi.new
|
339
|
+
body = TCAClient::AddGroupAttachmentRequest.new # AddGroupAttachmentRequest |
|
340
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
341
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
342
|
+
group_id = 'group_id_example' # String | group_id
|
343
|
+
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
|
344
|
+
|
345
|
+
|
346
|
+
begin
|
347
|
+
#Patch a group attachment
|
348
|
+
result = api_instance.update_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
|
349
|
+
p result
|
350
|
+
rescue TCAClient::ApiError => e
|
351
|
+
puts "Exception when calling GroupsApi->update_group_attachment: #{e}"
|
352
|
+
end
|
353
|
+
# Setup authorization
|
354
|
+
TCAClient.configure do |config|
|
355
|
+
# Configure API key authorization: api_key
|
356
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
357
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
358
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
359
|
+
end
|
360
|
+
|
361
|
+
api_instance = TCAClient::GroupsApi.new
|
362
|
+
body = nil # Object | the attachment file
|
363
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
364
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
365
|
+
group_id = 'group_id_example' # String | The Group ID (required to already exist)
|
366
|
+
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request)
|
367
|
+
content_disposition = 'content_disposition_example' # String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`
|
368
|
+
|
369
|
+
|
370
|
+
begin
|
371
|
+
#Upload Submitted File
|
372
|
+
result = api_instance.upload_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition)
|
373
|
+
p result
|
374
|
+
rescue TCAClient::ApiError => e
|
375
|
+
puts "Exception when calling GroupsApi->upload_group_attachment: #{e}"
|
376
|
+
end
|
377
|
+
# Setup authorization
|
378
|
+
TCAClient.configure do |config|
|
379
|
+
# Configure API key authorization: api_key
|
380
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
381
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
382
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
383
|
+
end
|
384
|
+
|
385
|
+
api_instance = TCAClient::IndexApi.new
|
386
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
387
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
388
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
389
|
+
|
390
|
+
|
391
|
+
begin
|
392
|
+
#Return index state of submission
|
393
|
+
result = api_instance.get_index_status(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
394
|
+
p result
|
395
|
+
rescue TCAClient::ApiError => e
|
396
|
+
puts "Exception when calling IndexApi->get_index_status: #{e}"
|
397
|
+
end
|
398
|
+
# Setup authorization
|
399
|
+
TCAClient.configure do |config|
|
400
|
+
# Configure API key authorization: api_key
|
401
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
402
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
403
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
404
|
+
end
|
405
|
+
|
406
|
+
api_instance = TCAClient::IndexApi.new
|
407
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
408
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
409
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
410
|
+
|
411
|
+
|
412
|
+
begin
|
413
|
+
#Index and return index state of submission
|
414
|
+
result = api_instance.index_submission(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
415
|
+
p result
|
416
|
+
rescue TCAClient::ApiError => e
|
417
|
+
puts "Exception when calling IndexApi->index_submission: #{e}"
|
418
|
+
end
|
419
|
+
# Setup authorization
|
420
|
+
TCAClient.configure do |config|
|
421
|
+
# Configure API key authorization: api_key
|
422
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
423
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
424
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
425
|
+
end
|
426
|
+
|
427
|
+
api_instance = TCAClient::SimilarityApi.new
|
428
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
429
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
430
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
431
|
+
pdf_id = 'pdf_id_example' # String | The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
432
|
+
|
433
|
+
|
434
|
+
begin
|
435
|
+
#GET download pdf
|
436
|
+
result = api_instance.download_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id)
|
437
|
+
p result
|
438
|
+
rescue TCAClient::ApiError => e
|
439
|
+
puts "Exception when calling SimilarityApi->download_similarity_report_pdf: #{e}"
|
440
|
+
end
|
441
|
+
# Setup authorization
|
442
|
+
TCAClient.configure do |config|
|
443
|
+
# Configure API key authorization: api_key
|
444
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
445
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
446
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
447
|
+
end
|
448
|
+
|
449
|
+
api_instance = TCAClient::SimilarityApi.new
|
450
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
451
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
452
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
453
|
+
pdf_id = 'pdf_id_example' # String | The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
454
|
+
|
455
|
+
|
456
|
+
begin
|
457
|
+
#GET pdf download status
|
458
|
+
result = api_instance.get_similarity_report_pdf_status(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id)
|
459
|
+
p result
|
460
|
+
rescue TCAClient::ApiError => e
|
461
|
+
puts "Exception when calling SimilarityApi->get_similarity_report_pdf_status: #{e}"
|
462
|
+
end
|
463
|
+
# Setup authorization
|
464
|
+
TCAClient.configure do |config|
|
465
|
+
# Configure API key authorization: api_key
|
466
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
467
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
468
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
469
|
+
end
|
470
|
+
|
471
|
+
api_instance = TCAClient::SimilarityApi.new
|
472
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
473
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
474
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
475
|
+
|
476
|
+
|
477
|
+
begin
|
478
|
+
#Get Similarity Report Results
|
479
|
+
result = api_instance.get_similarity_report_results(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
480
|
+
p result
|
481
|
+
rescue TCAClient::ApiError => e
|
482
|
+
puts "Exception when calling SimilarityApi->get_similarity_report_results: #{e}"
|
483
|
+
end
|
484
|
+
# Setup authorization
|
485
|
+
TCAClient.configure do |config|
|
486
|
+
# Configure API key authorization: api_key
|
487
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
488
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
489
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
490
|
+
end
|
491
|
+
|
492
|
+
api_instance = TCAClient::SimilarityApi.new
|
493
|
+
body = TCAClient::SimilarityViewerUrlSettings.new # SimilarityViewerUrlSettings |
|
494
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
495
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
496
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
497
|
+
|
498
|
+
|
499
|
+
begin
|
500
|
+
#Returns a URL to access Cloud Viewer
|
501
|
+
result = api_instance.get_similarity_report_url(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
|
502
|
+
p result
|
503
|
+
rescue TCAClient::ApiError => e
|
504
|
+
puts "Exception when calling SimilarityApi->get_similarity_report_url: #{e}"
|
505
|
+
end
|
506
|
+
# Setup authorization
|
507
|
+
TCAClient.configure do |config|
|
508
|
+
# Configure API key authorization: api_key
|
509
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
510
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
511
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
512
|
+
end
|
513
|
+
|
514
|
+
api_instance = TCAClient::SimilarityApi.new
|
515
|
+
body = TCAClient::SimilarityPutRequest.new # SimilarityPutRequest |
|
516
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
517
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
518
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
519
|
+
|
520
|
+
|
521
|
+
begin
|
522
|
+
#Request Similarity Report generation
|
523
|
+
result = api_instance.request_similarity_report(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
|
524
|
+
p result
|
525
|
+
rescue TCAClient::ApiError => e
|
526
|
+
puts "Exception when calling SimilarityApi->request_similarity_report: #{e}"
|
527
|
+
end
|
528
|
+
# Setup authorization
|
529
|
+
TCAClient.configure do |config|
|
530
|
+
# Configure API key authorization: api_key
|
531
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
532
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
533
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
534
|
+
end
|
535
|
+
|
536
|
+
api_instance = TCAClient::SimilarityApi.new
|
537
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
538
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
539
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
540
|
+
|
541
|
+
|
542
|
+
begin
|
543
|
+
#Request Pdf download and returns the Pdf Id
|
544
|
+
result = api_instance.request_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
545
|
+
p result
|
546
|
+
rescue TCAClient::ApiError => e
|
547
|
+
puts "Exception when calling SimilarityApi->request_similarity_report_pdf: #{e}"
|
548
|
+
end
|
549
|
+
# Setup authorization
|
550
|
+
TCAClient.configure do |config|
|
551
|
+
# Configure API key authorization: api_key
|
552
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
553
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
554
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
555
|
+
end
|
556
|
+
|
557
|
+
api_instance = TCAClient::SubmissionApi.new
|
558
|
+
body = TCAClient::SubmissionBase.new # SubmissionBase |
|
559
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
560
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
561
|
+
|
562
|
+
|
563
|
+
begin
|
564
|
+
#Create a new Submission
|
565
|
+
result = api_instance.create_submission(body, x_turnitin_integration_name, x_turnitin_integration_version)
|
566
|
+
p result
|
567
|
+
rescue TCAClient::ApiError => e
|
568
|
+
puts "Exception when calling SubmissionApi->create_submission: #{e}"
|
569
|
+
end
|
570
|
+
# Setup authorization
|
571
|
+
TCAClient.configure do |config|
|
572
|
+
# Configure API key authorization: api_key
|
573
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
574
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
575
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
576
|
+
end
|
577
|
+
|
578
|
+
api_instance = TCAClient::SubmissionApi.new
|
579
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
580
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
581
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
582
|
+
opts = {
|
583
|
+
hard: 'false' # String | Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered.
|
584
|
+
}
|
585
|
+
|
586
|
+
begin
|
587
|
+
#Deletes a submission and associated similarity report.
|
588
|
+
result = api_instance.delete_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
589
|
+
p result
|
590
|
+
rescue TCAClient::ApiError => e
|
591
|
+
puts "Exception when calling SubmissionApi->delete_submission: #{e}"
|
592
|
+
end
|
593
|
+
# Setup authorization
|
594
|
+
TCAClient.configure do |config|
|
595
|
+
# Configure API key authorization: api_key
|
596
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
597
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
598
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
599
|
+
end
|
600
|
+
|
601
|
+
api_instance = TCAClient::SubmissionApi.new
|
602
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
603
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
604
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
605
|
+
|
606
|
+
|
607
|
+
begin
|
608
|
+
#Get Submission Details
|
609
|
+
result = api_instance.get_submiddion_details(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
610
|
+
p result
|
611
|
+
rescue TCAClient::ApiError => e
|
612
|
+
puts "Exception when calling SubmissionApi->get_submiddion_details: #{e}"
|
613
|
+
end
|
614
|
+
# Setup authorization
|
615
|
+
TCAClient.configure do |config|
|
616
|
+
# Configure API key authorization: api_key
|
617
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
618
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
619
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
620
|
+
end
|
621
|
+
|
622
|
+
api_instance = TCAClient::SubmissionApi.new
|
623
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
624
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
625
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
626
|
+
|
627
|
+
|
628
|
+
begin
|
629
|
+
#Recover a soft deleted submission
|
630
|
+
result = api_instance.recover_submission(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
631
|
+
p result
|
632
|
+
rescue TCAClient::ApiError => e
|
633
|
+
puts "Exception when calling SubmissionApi->recover_submission: #{e}"
|
634
|
+
end
|
635
|
+
# Setup authorization
|
636
|
+
TCAClient.configure do |config|
|
637
|
+
# Configure API key authorization: api_key
|
638
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
639
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
640
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
641
|
+
end
|
642
|
+
|
643
|
+
api_instance = TCAClient::SubmissionApi.new
|
644
|
+
body = nil # Object | the user's submitted file
|
645
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
646
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
647
|
+
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions)
|
648
|
+
content_type = 'content_type_example' # String | *Must be 'binary/octet-stream'
|
649
|
+
content_disposition = 'content_disposition_example' # String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`. To support UTF-8 filenames, you must URL encode the header
|
650
|
+
|
651
|
+
|
652
|
+
begin
|
653
|
+
#Upload Submitted File
|
654
|
+
result = api_instance.upload_submitted_file(body, x_turnitin_integration_name, x_turnitin_integration_version, id, content_type, content_disposition)
|
655
|
+
p result
|
656
|
+
rescue TCAClient::ApiError => e
|
657
|
+
puts "Exception when calling SubmissionApi->upload_submitted_file: #{e}"
|
658
|
+
end
|
659
|
+
# Setup authorization
|
660
|
+
TCAClient.configure do |config|
|
661
|
+
# Configure API key authorization: api_key
|
662
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
663
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
664
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
665
|
+
end
|
666
|
+
|
667
|
+
api_instance = TCAClient::WebhookApi.new
|
668
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
669
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
670
|
+
id = 'id_example' # String |
|
671
|
+
|
672
|
+
|
673
|
+
begin
|
674
|
+
#Delete Webhook endpoint
|
675
|
+
api_instance.delete_webhook(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
676
|
+
rescue TCAClient::ApiError => e
|
677
|
+
puts "Exception when calling WebhookApi->delete_webhook: #{e}"
|
678
|
+
end
|
679
|
+
# Setup authorization
|
680
|
+
TCAClient.configure do |config|
|
681
|
+
# Configure API key authorization: api_key
|
682
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
683
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
684
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
685
|
+
end
|
686
|
+
|
687
|
+
api_instance = TCAClient::WebhookApi.new
|
688
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
689
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
690
|
+
id = 'id_example' # String |
|
691
|
+
|
692
|
+
|
693
|
+
begin
|
694
|
+
#Get Webhook endpoint info
|
695
|
+
result = api_instance.get_webhook(x_turnitin_integration_name, x_turnitin_integration_version, id)
|
696
|
+
p result
|
697
|
+
rescue TCAClient::ApiError => e
|
698
|
+
puts "Exception when calling WebhookApi->get_webhook: #{e}"
|
699
|
+
end
|
700
|
+
# Setup authorization
|
701
|
+
TCAClient.configure do |config|
|
702
|
+
# Configure API key authorization: api_key
|
703
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
704
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
705
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
706
|
+
end
|
707
|
+
|
708
|
+
api_instance = TCAClient::WebhookApi.new
|
709
|
+
body = TCAClient::WebhookPathRequest.new # WebhookPathRequest |
|
710
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
711
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
712
|
+
id = 'id_example' # String |
|
713
|
+
|
714
|
+
|
715
|
+
begin
|
716
|
+
#Update Webhook endpoint info
|
717
|
+
result = api_instance.update_webhook(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
|
718
|
+
p result
|
719
|
+
rescue TCAClient::ApiError => e
|
720
|
+
puts "Exception when calling WebhookApi->update_webhook: #{e}"
|
721
|
+
end
|
722
|
+
# Setup authorization
|
723
|
+
TCAClient.configure do |config|
|
724
|
+
# Configure API key authorization: api_key
|
725
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
726
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
727
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
728
|
+
end
|
729
|
+
|
730
|
+
api_instance = TCAClient::WebhookApi.new
|
731
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
732
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
733
|
+
|
734
|
+
|
735
|
+
begin
|
736
|
+
#List registered Webhook endpoints
|
737
|
+
result = api_instance.webhooks_get(x_turnitin_integration_name, x_turnitin_integration_version)
|
738
|
+
p result
|
739
|
+
rescue TCAClient::ApiError => e
|
740
|
+
puts "Exception when calling WebhookApi->webhooks_get: #{e}"
|
741
|
+
end
|
742
|
+
# Setup authorization
|
743
|
+
TCAClient.configure do |config|
|
744
|
+
# Configure API key authorization: api_key
|
745
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
746
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
747
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
748
|
+
end
|
749
|
+
|
750
|
+
api_instance = TCAClient::WebhookApi.new
|
751
|
+
body = TCAClient::WebhookWithSecret.new # WebhookWithSecret |
|
752
|
+
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
|
753
|
+
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
|
754
|
+
|
755
|
+
|
756
|
+
begin
|
757
|
+
#Register a Webhook endpoint
|
758
|
+
result = api_instance.webhooks_post(body, x_turnitin_integration_name, x_turnitin_integration_version)
|
759
|
+
p result
|
760
|
+
rescue TCAClient::ApiError => e
|
761
|
+
puts "Exception when calling WebhookApi->webhooks_post: #{e}"
|
762
|
+
end
|
763
|
+
```
|
764
|
+
|
765
|
+
## Documentation for API Endpoints
|
766
|
+
|
767
|
+
All URIs are relative to *https://{tenantName}.{hostName}/api/v1*
|
768
|
+
|
769
|
+
Class | Method | HTTP request | Description
|
770
|
+
------------ | ------------- | ------------- | -------------
|
771
|
+
*TCAClient::EULAApi* | [**eula_version_id_accept_post**](docs/EULAApi.md#eula_version_id_accept_post) | **POST** /eula/{version_id}/accept | Accepts a particular EULA version on behalf of an external user
|
772
|
+
*TCAClient::EULAApi* | [**eula_version_id_accept_user_id_get**](docs/EULAApi.md#eula_version_id_accept_user_id_get) | **GET** /eula/{version_id}/accept/{user_id} | Queries the acceptences of a particular EULA version on behalf of an external user
|
773
|
+
*TCAClient::EULAApi* | [**eula_version_id_get**](docs/EULAApi.md#eula_version_id_get) | **GET** /eula/{version_id} | Gets information about a particular EULA version
|
774
|
+
*TCAClient::EULAApi* | [**eula_version_id_view_get**](docs/EULAApi.md#eula_version_id_view_get) | **GET** /eula/{version_id}/view | Gets the text of a particular EULA version
|
775
|
+
*TCAClient::FeaturesApi* | [**features_enabled_get**](docs/FeaturesApi.md#features_enabled_get) | **GET** /features-enabled | Get information about what features are allowed by the current license
|
776
|
+
*TCAClient::GroupsApi* | [**add_group_attachment**](docs/GroupsApi.md#add_group_attachment) | **POST** /groups/{group_id}/attachments | Add attachment to a group. will create a group if it does not exist.
|
777
|
+
*TCAClient::GroupsApi* | [**delete_group_attachment**](docs/GroupsApi.md#delete_group_attachment) | **DELETE** /groups/{group_id}/attachments/{attach_id} | Hard delete group attachment
|
778
|
+
*TCAClient::GroupsApi* | [**get_group**](docs/GroupsApi.md#get_group) | **GET** /groups/{group_id} | Get group, group context and group context owners info
|
779
|
+
*TCAClient::GroupsApi* | [**get_group_attachment**](docs/GroupsApi.md#get_group_attachment) | **GET** /groups/{group_id}/attachments/{attach_id} | Get group attachment
|
780
|
+
*TCAClient::GroupsApi* | [**get_group_attachments**](docs/GroupsApi.md#get_group_attachments) | **GET** /groups/{group_id}/attachments | Get all attachments
|
781
|
+
*TCAClient::GroupsApi* | [**groups_group_id_put**](docs/GroupsApi.md#groups_group_id_put) | **PUT** /groups/{group_id} | upsert group, group context and group context owners info
|
782
|
+
*TCAClient::GroupsApi* | [**update_group_attachment**](docs/GroupsApi.md#update_group_attachment) | **PATCH** /groups/{group_id}/attachments/{attach_id} | Patch a group attachment
|
783
|
+
*TCAClient::GroupsApi* | [**upload_group_attachment**](docs/GroupsApi.md#upload_group_attachment) | **PUT** /groups/{group_id}/attachments/{attach_id}/original | Upload Submitted File
|
784
|
+
*TCAClient::IndexApi* | [**get_index_status**](docs/IndexApi.md#get_index_status) | **GET** /submissions/{id}/index | Return index state of submission
|
785
|
+
*TCAClient::IndexApi* | [**index_submission**](docs/IndexApi.md#index_submission) | **PUT** /submissions/{id}/index | Index and return index state of submission
|
786
|
+
*TCAClient::SimilarityApi* | [**download_similarity_report_pdf**](docs/SimilarityApi.md#download_similarity_report_pdf) | **GET** /submissions/{id}/similarity/pdf/{pdf_id} | GET download pdf
|
787
|
+
*TCAClient::SimilarityApi* | [**get_similarity_report_pdf_status**](docs/SimilarityApi.md#get_similarity_report_pdf_status) | **GET** /submissions/{id}/similarity/pdf/{pdf_id}/status | GET pdf download status
|
788
|
+
*TCAClient::SimilarityApi* | [**get_similarity_report_results**](docs/SimilarityApi.md#get_similarity_report_results) | **GET** /submissions/{id}/similarity | Get Similarity Report Results
|
789
|
+
*TCAClient::SimilarityApi* | [**get_similarity_report_url**](docs/SimilarityApi.md#get_similarity_report_url) | **POST** /submissions/{id}/viewer-url | Returns a URL to access Cloud Viewer
|
790
|
+
*TCAClient::SimilarityApi* | [**request_similarity_report**](docs/SimilarityApi.md#request_similarity_report) | **PUT** /submissions/{id}/similarity | Request Similarity Report generation
|
791
|
+
*TCAClient::SimilarityApi* | [**request_similarity_report_pdf**](docs/SimilarityApi.md#request_similarity_report_pdf) | **POST** /submissions/{id}/similarity/pdf | Request Pdf download and returns the Pdf Id
|
792
|
+
*TCAClient::SubmissionApi* | [**create_submission**](docs/SubmissionApi.md#create_submission) | **POST** /submissions | Create a new Submission
|
793
|
+
*TCAClient::SubmissionApi* | [**delete_submission**](docs/SubmissionApi.md#delete_submission) | **DELETE** /submissions/{id} | Deletes a submission and associated similarity report.
|
794
|
+
*TCAClient::SubmissionApi* | [**get_submiddion_details**](docs/SubmissionApi.md#get_submiddion_details) | **GET** /submissions/{id} | Get Submission Details
|
795
|
+
*TCAClient::SubmissionApi* | [**recover_submission**](docs/SubmissionApi.md#recover_submission) | **PUT** /submissions/{id}/recover | Recover a soft deleted submission
|
796
|
+
*TCAClient::SubmissionApi* | [**upload_submitted_file**](docs/SubmissionApi.md#upload_submitted_file) | **PUT** /submissions/{id}/original | Upload Submitted File
|
797
|
+
*TCAClient::WebhookApi* | [**delete_webhook**](docs/WebhookApi.md#delete_webhook) | **DELETE** /webhooks/{id} | Delete Webhook endpoint
|
798
|
+
*TCAClient::WebhookApi* | [**get_webhook**](docs/WebhookApi.md#get_webhook) | **GET** /webhooks/{id} | Get Webhook endpoint info
|
799
|
+
*TCAClient::WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PATCH** /webhooks/{id} | Update Webhook endpoint info
|
800
|
+
*TCAClient::WebhookApi* | [**webhooks_get**](docs/WebhookApi.md#webhooks_get) | **GET** /webhooks | List registered Webhook endpoints
|
801
|
+
*TCAClient::WebhookApi* | [**webhooks_post**](docs/WebhookApi.md#webhooks_post) | **POST** /webhooks | Register a Webhook endpoint
|
802
|
+
|
803
|
+
## Documentation for Models
|
804
|
+
|
805
|
+
- [TCAClient::AddGroupAttachmentRequest](docs/AddGroupAttachmentRequest.md)
|
806
|
+
- [TCAClient::AddGroupAttachmentResponse](docs/AddGroupAttachmentResponse.md)
|
807
|
+
- [TCAClient::AggregateGroup](docs/AggregateGroup.md)
|
808
|
+
- [TCAClient::AuthorMetadataOverride](docs/AuthorMetadataOverride.md)
|
809
|
+
- [TCAClient::Error](docs/Error.md)
|
810
|
+
- [TCAClient::Eula](docs/Eula.md)
|
811
|
+
- [TCAClient::EulaAcceptListItem](docs/EulaAcceptListItem.md)
|
812
|
+
- [TCAClient::EulaAcceptRequest](docs/EulaAcceptRequest.md)
|
813
|
+
- [TCAClient::EulaVersion](docs/EulaVersion.md)
|
814
|
+
- [TCAClient::FeaturesEnabled](docs/FeaturesEnabled.md)
|
815
|
+
- [TCAClient::FeaturesGenerationSettings](docs/FeaturesGenerationSettings.md)
|
816
|
+
- [TCAClient::FeaturesSimilarity](docs/FeaturesSimilarity.md)
|
817
|
+
- [TCAClient::FeaturesSimilarityViewSettings](docs/FeaturesSimilarityViewSettings.md)
|
818
|
+
- [TCAClient::FeaturesTenant](docs/FeaturesTenant.md)
|
819
|
+
- [TCAClient::FeaturesViewerModes](docs/FeaturesViewerModes.md)
|
820
|
+
- [TCAClient::Group](docs/Group.md)
|
821
|
+
- [TCAClient::GroupAttachmentResponse](docs/GroupAttachmentResponse.md)
|
822
|
+
- [TCAClient::GroupContext](docs/GroupContext.md)
|
823
|
+
- [TCAClient::IndexStateSettings](docs/IndexStateSettings.md)
|
824
|
+
- [TCAClient::IndexingSettings](docs/IndexingSettings.md)
|
825
|
+
- [TCAClient::InlineResponse200](docs/InlineResponse200.md)
|
826
|
+
- [TCAClient::PdfStatusResponse](docs/PdfStatusResponse.md)
|
827
|
+
- [TCAClient::RateLimitError](docs/RateLimitError.md)
|
828
|
+
- [TCAClient::RequestPdfResponse](docs/RequestPdfResponse.md)
|
829
|
+
- [TCAClient::Sidebar](docs/Sidebar.md)
|
830
|
+
- [TCAClient::SimilarityGenerationSettings](docs/SimilarityGenerationSettings.md)
|
831
|
+
- [TCAClient::SimilarityMetadata](docs/SimilarityMetadata.md)
|
832
|
+
- [TCAClient::SimilarityMetadataTopMatches](docs/SimilarityMetadataTopMatches.md)
|
833
|
+
- [TCAClient::SimilarityPutRequest](docs/SimilarityPutRequest.md)
|
834
|
+
- [TCAClient::SimilarityScoreData](docs/SimilarityScoreData.md)
|
835
|
+
- [TCAClient::SimilaritySettings](docs/SimilaritySettings.md)
|
836
|
+
- [TCAClient::SimilaritySettingsModes](docs/SimilaritySettingsModes.md)
|
837
|
+
- [TCAClient::SimilaritySettingsViewSettings](docs/SimilaritySettingsViewSettings.md)
|
838
|
+
- [TCAClient::SimilarityViewSettings](docs/SimilarityViewSettings.md)
|
839
|
+
- [TCAClient::SimilarityViewerUrlResponse](docs/SimilarityViewerUrlResponse.md)
|
840
|
+
- [TCAClient::SimilarityViewerUrlSettings](docs/SimilarityViewerUrlSettings.md)
|
841
|
+
- [TCAClient::SimpleSubmissionResponse](docs/SimpleSubmissionResponse.md)
|
842
|
+
- [TCAClient::Submission](docs/Submission.md)
|
843
|
+
- [TCAClient::SubmissionBase](docs/SubmissionBase.md)
|
844
|
+
- [TCAClient::SubmissionBaseMetadata](docs/SubmissionBaseMetadata.md)
|
845
|
+
- [TCAClient::SubmissionSizeError](docs/SubmissionSizeError.md)
|
846
|
+
- [TCAClient::SuccessMessage](docs/SuccessMessage.md)
|
847
|
+
- [TCAClient::Users](docs/Users.md)
|
848
|
+
- [TCAClient::ViewerPermissions](docs/ViewerPermissions.md)
|
849
|
+
- [TCAClient::Webhook](docs/Webhook.md)
|
850
|
+
- [TCAClient::WebhookBase](docs/WebhookBase.md)
|
851
|
+
- [TCAClient::WebhookPathRequest](docs/WebhookPathRequest.md)
|
852
|
+
- [TCAClient::WebhookWithSecret](docs/WebhookWithSecret.md)
|
853
|
+
|
854
|
+
## Documentation for Authorization
|
855
|
+
|
856
|
+
|
857
|
+
### api_key
|
858
|
+
|
859
|
+
- **Type**: API key
|
860
|
+
- **API key parameter name**: Authorization
|
861
|
+
- **Location**: HTTP header
|
862
|
+
|