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
data/docs/WebhookBase.md
CHANGED
@@ -1,10 +1,24 @@
|
|
1
1
|
# TCAClient::WebhookBase
|
2
2
|
|
3
3
|
## Properties
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
**
|
8
|
-
**
|
9
|
-
**
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **description** | **String** | a human readable description of the webhook | [optional] |
|
8
|
+
| **url** | **String** | the URL to callback with events, this must be https unless (allow_insecure is true) | |
|
9
|
+
| **allow_insecure** | **Boolean** | if using an non https url, this must be set to true | [optional] |
|
10
|
+
| **event_types** | **Array<String>** | an array of the types of callbacks that will be sent to this webhook | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'tca_client'
|
16
|
+
|
17
|
+
instance = TCAClient::WebhookBase.new(
|
18
|
+
description: null,
|
19
|
+
url: null,
|
20
|
+
allow_insecure: null,
|
21
|
+
event_types: null
|
22
|
+
)
|
23
|
+
```
|
10
24
|
|
data/docs/WebhookPathRequest.md
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
# TCAClient::WebhookPathRequest
|
2
2
|
|
3
3
|
## Properties
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
**
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **description** | **String** | a human readable description of the webhook | [optional] |
|
8
|
+
| **event_types** | **Array<String>** | an array of the types of callbacks that will be sent to this webhook | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tca_client'
|
14
|
+
|
15
|
+
instance = TCAClient::WebhookPathRequest.new(
|
16
|
+
description: null,
|
17
|
+
event_types: null
|
18
|
+
)
|
19
|
+
```
|
8
20
|
|
data/docs/WebhookWithSecret.md
CHANGED
@@ -1,10 +1,26 @@
|
|
1
1
|
# TCAClient::WebhookWithSecret
|
2
2
|
|
3
3
|
## Properties
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
**
|
8
|
-
**
|
9
|
-
**
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **signing_secret** | **File** | a sercret used to sign all callbacks for this webhook | |
|
8
|
+
| **description** | **String** | a human readable description of the webhook | [optional] |
|
9
|
+
| **url** | **String** | the URL to callback with events, this must be https unless (allow_insecure is true) | |
|
10
|
+
| **allow_insecure** | **Boolean** | if using an non https url, this must be set to true | [optional] |
|
11
|
+
| **event_types** | **Array<String>** | an array of the types of callbacks that will be sent to this webhook | |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'tca_client'
|
17
|
+
|
18
|
+
instance = TCAClient::WebhookWithSecret.new(
|
19
|
+
signing_secret: null,
|
20
|
+
description: null,
|
21
|
+
url: null,
|
22
|
+
allow_insecure: null,
|
23
|
+
event_types: null
|
24
|
+
)
|
25
|
+
```
|
10
26
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TCAClient::WebhookWithSecretAllOf
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **signing_secret** | **File** | a sercret used to sign all callbacks for this webhook | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'tca_client'
|
13
|
+
|
14
|
+
instance = TCAClient::WebhookWithSecretAllOf.new(
|
15
|
+
signing_secret: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -3,12 +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
|
|
13
|
+
require 'cgi'
|
14
|
+
|
12
15
|
module TCAClient
|
13
16
|
class EULAApi
|
14
17
|
attr_accessor :api_client
|
@@ -17,32 +20,28 @@ module TCAClient
|
|
17
20
|
@api_client = api_client
|
18
21
|
end
|
19
22
|
# Accepts a particular EULA version on behalf of an external user
|
20
|
-
# @param
|
21
|
-
# @param
|
22
|
-
# @param
|
23
|
-
# @param
|
23
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
24
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
25
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
26
|
+
# @param data [EulaAcceptRequest]
|
24
27
|
# @param [Hash] opts the optional parameters
|
25
28
|
# @return [EulaAcceptListItem]
|
26
|
-
def eula_version_id_accept_post(
|
27
|
-
data, _status_code, _headers = eula_version_id_accept_post_with_http_info(
|
29
|
+
def eula_version_id_accept_post(x_turnitin_integration_name, x_turnitin_integration_version, version_id, data, opts = {})
|
30
|
+
data, _status_code, _headers = eula_version_id_accept_post_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, version_id, data, opts)
|
28
31
|
data
|
29
32
|
end
|
30
33
|
|
31
34
|
# Accepts a particular EULA version on behalf of an external user
|
32
|
-
# @param
|
33
|
-
# @param
|
34
|
-
# @param
|
35
|
-
# @param
|
35
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
36
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
37
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
38
|
+
# @param data [EulaAcceptRequest]
|
36
39
|
# @param [Hash] opts the optional parameters
|
37
40
|
# @return [Array<(EulaAcceptListItem, Integer, Hash)>] EulaAcceptListItem data, response status code and response headers
|
38
|
-
def eula_version_id_accept_post_with_http_info(
|
41
|
+
def eula_version_id_accept_post_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, version_id, data, opts = {})
|
39
42
|
if @api_client.config.debugging
|
40
43
|
@api_client.config.logger.debug 'Calling API: EULAApi.eula_version_id_accept_post ...'
|
41
44
|
end
|
42
|
-
# verify the required parameter 'body' is set
|
43
|
-
if @api_client.config.client_side_validation && body.nil?
|
44
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling EULAApi.eula_version_id_accept_post"
|
45
|
-
end
|
46
45
|
# verify the required parameter 'x_turnitin_integration_name' is set
|
47
46
|
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
48
47
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling EULAApi.eula_version_id_accept_post"
|
@@ -55,8 +54,12 @@ module TCAClient
|
|
55
54
|
if @api_client.config.client_side_validation && version_id.nil?
|
56
55
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling EULAApi.eula_version_id_accept_post"
|
57
56
|
end
|
57
|
+
# verify the required parameter 'data' is set
|
58
|
+
if @api_client.config.client_side_validation && data.nil?
|
59
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling EULAApi.eula_version_id_accept_post"
|
60
|
+
end
|
58
61
|
# resource path
|
59
|
-
local_var_path = '/eula/{version_id}/accept'.sub('{' + 'version_id' + '}', version_id.to_s)
|
62
|
+
local_var_path = '/eula/{version_id}/accept'.sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
60
63
|
|
61
64
|
# query parameters
|
62
65
|
query_params = opts[:query_params] || {}
|
@@ -66,7 +69,10 @@ module TCAClient
|
|
66
69
|
# HTTP header 'Accept' (if needed)
|
67
70
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
68
71
|
# HTTP header 'Content-Type'
|
69
|
-
|
72
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
73
|
+
if !content_type.nil?
|
74
|
+
header_params['Content-Type'] = content_type
|
75
|
+
end
|
70
76
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
71
77
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
72
78
|
|
@@ -74,29 +80,36 @@ module TCAClient
|
|
74
80
|
form_params = opts[:form_params] || {}
|
75
81
|
|
76
82
|
# http body (model)
|
77
|
-
post_body = opts[:
|
83
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
84
|
+
|
85
|
+
# return_type
|
86
|
+
return_type = opts[:debug_return_type] || 'EulaAcceptListItem'
|
78
87
|
|
79
|
-
|
88
|
+
# auth_names
|
89
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
80
90
|
|
81
|
-
|
82
|
-
|
91
|
+
new_options = opts.merge(
|
92
|
+
:operation => :"EULAApi.eula_version_id_accept_post",
|
83
93
|
:header_params => header_params,
|
84
94
|
:query_params => query_params,
|
85
95
|
:form_params => form_params,
|
86
96
|
:body => post_body,
|
87
97
|
:auth_names => auth_names,
|
88
|
-
:return_type => return_type
|
98
|
+
:return_type => return_type
|
99
|
+
)
|
89
100
|
|
101
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
90
102
|
if @api_client.config.debugging
|
91
103
|
@api_client.config.logger.debug "API called: EULAApi#eula_version_id_accept_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
104
|
end
|
93
105
|
return data, status_code, headers
|
94
106
|
end
|
107
|
+
|
95
108
|
# Queries the acceptences of a particular EULA version on behalf of an external user
|
96
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
97
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
98
|
-
# @param version_id The EULA version ID (or `latest`)
|
99
|
-
# @param user_id The user associated with the EULA status
|
109
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
110
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
111
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
112
|
+
# @param user_id [String] The user associated with the EULA status
|
100
113
|
# @param [Hash] opts the optional parameters
|
101
114
|
# @return [Array<EulaAcceptListItem>]
|
102
115
|
def eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id, opts = {})
|
@@ -105,10 +118,10 @@ module TCAClient
|
|
105
118
|
end
|
106
119
|
|
107
120
|
# Queries the acceptences of a particular EULA version on behalf of an external user
|
108
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
109
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
110
|
-
# @param version_id The EULA version ID (or `latest`)
|
111
|
-
# @param user_id The user associated with the EULA status
|
121
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
122
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
123
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
124
|
+
# @param user_id [String] The user associated with the EULA status
|
112
125
|
# @param [Hash] opts the optional parameters
|
113
126
|
# @return [Array<(Array<EulaAcceptListItem>, Integer, Hash)>] Array<EulaAcceptListItem> data, response status code and response headers
|
114
127
|
def eula_version_id_accept_user_id_get_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id, opts = {})
|
@@ -132,7 +145,7 @@ module TCAClient
|
|
132
145
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling EULAApi.eula_version_id_accept_user_id_get"
|
133
146
|
end
|
134
147
|
# resource path
|
135
|
-
local_var_path = '/eula/{version_id}/accept/{user_id}'.sub('{' + 'version_id' + '}', version_id.to_s).sub('{' + 'user_id' + '}', user_id.to_s)
|
148
|
+
local_var_path = '/eula/{version_id}/accept/{user_id}'.sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
136
149
|
|
137
150
|
# query parameters
|
138
151
|
query_params = opts[:query_params] || {}
|
@@ -148,28 +161,35 @@ module TCAClient
|
|
148
161
|
form_params = opts[:form_params] || {}
|
149
162
|
|
150
163
|
# http body (model)
|
151
|
-
post_body = opts[:
|
164
|
+
post_body = opts[:debug_body]
|
165
|
+
|
166
|
+
# return_type
|
167
|
+
return_type = opts[:debug_return_type] || 'Array<EulaAcceptListItem>'
|
152
168
|
|
153
|
-
|
169
|
+
# auth_names
|
170
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
154
171
|
|
155
|
-
|
156
|
-
|
172
|
+
new_options = opts.merge(
|
173
|
+
:operation => :"EULAApi.eula_version_id_accept_user_id_get",
|
157
174
|
:header_params => header_params,
|
158
175
|
:query_params => query_params,
|
159
176
|
:form_params => form_params,
|
160
177
|
:body => post_body,
|
161
178
|
:auth_names => auth_names,
|
162
|
-
:return_type => return_type
|
179
|
+
:return_type => return_type
|
180
|
+
)
|
163
181
|
|
182
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
164
183
|
if @api_client.config.debugging
|
165
184
|
@api_client.config.logger.debug "API called: EULAApi#eula_version_id_accept_user_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
185
|
end
|
167
186
|
return data, status_code, headers
|
168
187
|
end
|
188
|
+
|
169
189
|
# Gets information about a particular EULA version
|
170
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
171
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
172
|
-
# @param version_id The EULA version ID (or `latest`)
|
190
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
191
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
192
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
173
193
|
# @param [Hash] opts the optional parameters
|
174
194
|
# @option opts [String] :lang The desired language of the specified EULA version
|
175
195
|
# @return [EulaVersion]
|
@@ -179,9 +199,9 @@ module TCAClient
|
|
179
199
|
end
|
180
200
|
|
181
201
|
# Gets information about a particular EULA version
|
182
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
183
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
184
|
-
# @param version_id The EULA version ID (or `latest`)
|
202
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
203
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
204
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
185
205
|
# @param [Hash] opts the optional parameters
|
186
206
|
# @option opts [String] :lang The desired language of the specified EULA version
|
187
207
|
# @return [Array<(EulaVersion, Integer, Hash)>] EulaVersion data, response status code and response headers
|
@@ -202,7 +222,7 @@ module TCAClient
|
|
202
222
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling EULAApi.eula_version_id_get"
|
203
223
|
end
|
204
224
|
# resource path
|
205
|
-
local_var_path = '/eula/{version_id}'.sub('{' + 'version_id' + '}', version_id.to_s)
|
225
|
+
local_var_path = '/eula/{version_id}'.sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
206
226
|
|
207
227
|
# query parameters
|
208
228
|
query_params = opts[:query_params] || {}
|
@@ -219,28 +239,35 @@ module TCAClient
|
|
219
239
|
form_params = opts[:form_params] || {}
|
220
240
|
|
221
241
|
# http body (model)
|
222
|
-
post_body = opts[:
|
242
|
+
post_body = opts[:debug_body]
|
223
243
|
|
224
|
-
|
244
|
+
# return_type
|
245
|
+
return_type = opts[:debug_return_type] || 'EulaVersion'
|
225
246
|
|
226
|
-
|
227
|
-
|
247
|
+
# auth_names
|
248
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
249
|
+
|
250
|
+
new_options = opts.merge(
|
251
|
+
:operation => :"EULAApi.eula_version_id_get",
|
228
252
|
:header_params => header_params,
|
229
253
|
:query_params => query_params,
|
230
254
|
:form_params => form_params,
|
231
255
|
:body => post_body,
|
232
256
|
:auth_names => auth_names,
|
233
|
-
:return_type => return_type
|
257
|
+
:return_type => return_type
|
258
|
+
)
|
234
259
|
|
260
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
235
261
|
if @api_client.config.debugging
|
236
262
|
@api_client.config.logger.debug "API called: EULAApi#eula_version_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
237
263
|
end
|
238
264
|
return data, status_code, headers
|
239
265
|
end
|
266
|
+
|
240
267
|
# Gets the text of a particular EULA version
|
241
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
242
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
243
|
-
# @param version_id The EULA version ID (or `latest`)
|
268
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
269
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
270
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
244
271
|
# @param [Hash] opts the optional parameters
|
245
272
|
# @option opts [String] :lang The desired language of the specified EULA version
|
246
273
|
# @return [String]
|
@@ -250,9 +277,9 @@ module TCAClient
|
|
250
277
|
end
|
251
278
|
|
252
279
|
# Gets the text of a particular EULA version
|
253
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
254
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
255
|
-
# @param version_id The EULA version ID (or `latest`)
|
280
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
281
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
282
|
+
# @param version_id [String] The EULA version ID (or `latest`)
|
256
283
|
# @param [Hash] opts the optional parameters
|
257
284
|
# @option opts [String] :lang The desired language of the specified EULA version
|
258
285
|
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
@@ -273,7 +300,7 @@ module TCAClient
|
|
273
300
|
fail ArgumentError, "Missing the required parameter 'version_id' when calling EULAApi.eula_version_id_view_get"
|
274
301
|
end
|
275
302
|
# resource path
|
276
|
-
local_var_path = '/eula/{version_id}/view'.sub('{' + 'version_id' + '}', version_id.to_s)
|
303
|
+
local_var_path = '/eula/{version_id}/view'.sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
|
277
304
|
|
278
305
|
# query parameters
|
279
306
|
query_params = opts[:query_params] || {}
|
@@ -290,19 +317,25 @@ module TCAClient
|
|
290
317
|
form_params = opts[:form_params] || {}
|
291
318
|
|
292
319
|
# http body (model)
|
293
|
-
post_body = opts[:
|
320
|
+
post_body = opts[:debug_body]
|
321
|
+
|
322
|
+
# return_type
|
323
|
+
return_type = opts[:debug_return_type] || 'String'
|
294
324
|
|
295
|
-
|
325
|
+
# auth_names
|
326
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
296
327
|
|
297
|
-
|
298
|
-
|
328
|
+
new_options = opts.merge(
|
329
|
+
:operation => :"EULAApi.eula_version_id_view_get",
|
299
330
|
:header_params => header_params,
|
300
331
|
:query_params => query_params,
|
301
332
|
:form_params => form_params,
|
302
333
|
:body => post_body,
|
303
334
|
:auth_names => auth_names,
|
304
|
-
:return_type => return_type
|
335
|
+
:return_type => return_type
|
336
|
+
)
|
305
337
|
|
338
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
306
339
|
if @api_client.config.debugging
|
307
340
|
@api_client.config.logger.debug "API called: EULAApi#eula_version_id_view_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
341
|
end
|
@@ -3,12 +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
|
|
13
|
+
require 'cgi'
|
14
|
+
|
12
15
|
module TCAClient
|
13
16
|
class FeaturesApi
|
14
17
|
attr_accessor :api_client
|
@@ -17,8 +20,8 @@ module TCAClient
|
|
17
20
|
@api_client = api_client
|
18
21
|
end
|
19
22
|
# Get information about what features are allowed by the current license
|
20
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
21
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
23
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
24
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
22
25
|
# @param [Hash] opts the optional parameters
|
23
26
|
# @return [FeaturesEnabled]
|
24
27
|
def features_enabled_get(x_turnitin_integration_name, x_turnitin_integration_version, opts = {})
|
@@ -27,8 +30,8 @@ module TCAClient
|
|
27
30
|
end
|
28
31
|
|
29
32
|
# Get information about what features are allowed by the current license
|
30
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
31
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
33
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
34
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
32
35
|
# @param [Hash] opts the optional parameters
|
33
36
|
# @return [Array<(FeaturesEnabled, Integer, Hash)>] FeaturesEnabled data, response status code and response headers
|
34
37
|
def features_enabled_get_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, opts = {})
|
@@ -60,19 +63,25 @@ module TCAClient
|
|
60
63
|
form_params = opts[:form_params] || {}
|
61
64
|
|
62
65
|
# http body (model)
|
63
|
-
post_body = opts[:
|
66
|
+
post_body = opts[:debug_body]
|
67
|
+
|
68
|
+
# return_type
|
69
|
+
return_type = opts[:debug_return_type] || 'FeaturesEnabled'
|
64
70
|
|
65
|
-
|
71
|
+
# auth_names
|
72
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
66
73
|
|
67
|
-
|
68
|
-
|
74
|
+
new_options = opts.merge(
|
75
|
+
:operation => :"FeaturesApi.features_enabled_get",
|
69
76
|
:header_params => header_params,
|
70
77
|
:query_params => query_params,
|
71
78
|
:form_params => form_params,
|
72
79
|
:body => post_body,
|
73
80
|
:auth_names => auth_names,
|
74
|
-
:return_type => return_type
|
81
|
+
:return_type => return_type
|
82
|
+
)
|
75
83
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
76
85
|
if @api_client.config.debugging
|
77
86
|
@api_client.config.logger.debug "API called: FeaturesApi#features_enabled_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
87
|
end
|