tca_client 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/AddGroupAttachmentRequest.md +16 -4
- data/docs/AddGroupAttachmentResponse.md +14 -3
- data/docs/AggregateGroup.md +24 -8
- data/docs/AnnotationsSettings.md +18 -0
- data/docs/AuthorMetadataOverride.md +16 -4
- data/docs/EULAApi.md +166 -92
- data/docs/Error.md +16 -4
- data/docs/Eula.md +18 -5
- data/docs/EulaAcceptListItem.md +20 -6
- data/docs/EulaAcceptRequest.md +20 -6
- data/docs/EulaVersion.md +22 -7
- data/docs/FeaturesApi.md +41 -23
- data/docs/FeaturesEnabled.md +20 -6
- data/docs/FeaturesGenerationSettings.md +16 -4
- data/docs/FeaturesSimilarity.md +18 -5
- data/docs/FeaturesSimilarityViewSettings.md +38 -15
- data/docs/FeaturesTenant.md +14 -3
- data/docs/FeaturesViewerModes.md +16 -4
- data/docs/GenerateSimilarityPDF.md +18 -0
- data/docs/GetGroupAttachments200Response.md +18 -0
- data/docs/Group.md +18 -5
- data/docs/GroupAttachmentResponse.md +20 -6
- data/docs/GroupContext.md +18 -5
- data/docs/GroupsApi.md +321 -177
- data/docs/IndexApi.md +84 -44
- data/docs/IndexStateSettings.md +14 -3
- data/docs/IndexingSettings.md +14 -3
- data/docs/PDFStatusWebhookRequest.md +24 -0
- data/docs/PdfStatusResponse.md +14 -3
- data/docs/RateLimitError.md +16 -4
- data/docs/RequestPdfResponse.md +14 -3
- data/docs/Sidebar.md +14 -3
- data/docs/SimilarityApi.md +239 -129
- data/docs/SimilarityCompleteWebhookRequest.md +38 -0
- data/docs/SimilarityGenerationSettings.md +20 -6
- data/docs/SimilarityMetadata.md +32 -12
- data/docs/SimilarityMetadataAllOf.md +28 -0
- data/docs/SimilarityMetadataAllOfTopMatches.md +30 -0
- data/docs/SimilarityPutRequest.md +18 -5
- data/docs/SimilarityScoreData.md +20 -6
- data/docs/SimilaritySettings.md +18 -5
- data/docs/SimilaritySettingsModes.md +16 -4
- data/docs/SimilaritySettingsViewSettings.md +14 -3
- data/docs/SimilarityViewSettings.md +38 -15
- data/docs/SimilarityViewerUrlResponse.md +14 -3
- data/docs/SimilarityViewerUrlSettings.md +30 -10
- data/docs/SimpleSubmissionResponse.md +22 -2
- data/docs/SimpleSubmissionResponseAllOf.md +26 -0
- data/docs/Submission.md +34 -2
- data/docs/SubmissionAllOf.md +38 -0
- data/docs/SubmissionApi.md +202 -111
- data/docs/SubmissionBase.md +30 -11
- data/docs/SubmissionBaseMetadata.md +24 -8
- data/docs/SubmissionCompleteWebhookRequest.md +40 -0
- data/docs/SubmissionCompleteWebhookRequestAllOf.md +18 -0
- data/docs/SubmissionCompleteWebhookRequestAllOfMetadata.md +18 -0
- data/docs/SubmissionSizeError.md +16 -4
- data/docs/SuccessMessage.md +14 -3
- data/docs/Users.md +20 -6
- data/docs/ViewerPermissions.md +22 -7
- data/docs/Webhook.md +24 -6
- data/docs/WebhookAllOf.md +20 -0
- data/docs/WebhookApi.md +193 -103
- data/docs/WebhookBase.md +20 -6
- data/docs/WebhookPathRequest.md +16 -4
- data/docs/WebhookWithSecret.md +22 -6
- data/docs/WebhookWithSecretAllOf.md +18 -0
- data/lib/tca_client/api/eula_api.rb +96 -63
- data/lib/tca_client/api/features_api.rb +21 -12
- data/lib/tca_client/api/groups_api.rb +225 -155
- data/lib/tca_client/api/index_api.rb +46 -27
- data/lib/tca_client/api/similarity_api.rb +165 -104
- data/lib/tca_client/api/submission_api.rb +132 -89
- data/lib/tca_client/api/webhook_api.rb +120 -77
- data/lib/tca_client/api_client.rb +61 -57
- data/lib/tca_client/api_error.rb +4 -4
- data/lib/tca_client/configuration.rb +93 -13
- data/lib/tca_client/models/add_group_attachment_request.rb +50 -13
- data/lib/tca_client/models/add_group_attachment_response.rb +25 -12
- data/lib/tca_client/models/aggregate_group.rb +34 -21
- data/lib/tca_client/models/annotations_settings.rb +220 -0
- data/lib/tca_client/models/author_metadata_override.rb +26 -13
- data/lib/tca_client/models/error.rb +26 -13
- data/lib/tca_client/models/eula.rb +27 -14
- data/lib/tca_client/models/eula_accept_list_item.rb +28 -15
- data/lib/tca_client/models/eula_accept_request.rb +28 -15
- data/lib/tca_client/models/eula_version.rb +29 -16
- data/lib/tca_client/models/features_enabled.rb +28 -15
- data/lib/tca_client/models/features_generation_settings.rb +26 -13
- data/lib/tca_client/models/features_similarity.rb +27 -14
- data/lib/tca_client/models/features_similarity_view_settings.rb +37 -24
- data/lib/tca_client/models/features_tenant.rb +25 -12
- data/lib/tca_client/models/features_viewer_modes.rb +26 -13
- data/lib/tca_client/models/generate_similarity_pdf.rb +254 -0
- data/lib/tca_client/models/{inline_response_200.rb → get_group_attachments200_response.rb} +28 -15
- data/lib/tca_client/models/group.rb +29 -16
- data/lib/tca_client/models/group_attachment_response.rb +30 -17
- data/lib/tca_client/models/group_context.rb +27 -14
- data/lib/tca_client/models/index_state_settings.rb +25 -12
- data/lib/tca_client/models/indexing_settings.rb +25 -12
- data/lib/tca_client/models/pdf_status_response.rb +27 -14
- data/lib/tca_client/models/pdf_status_webhook_request.rb +283 -0
- data/lib/tca_client/models/rate_limit_error.rb +36 -20
- data/lib/tca_client/models/request_pdf_response.rb +25 -12
- data/lib/tca_client/models/sidebar.rb +27 -14
- data/lib/tca_client/models/similarity_complete_webhook_request.rb +366 -0
- data/lib/tca_client/models/similarity_generation_settings.rb +30 -17
- data/lib/tca_client/models/similarity_metadata.rb +45 -28
- data/lib/tca_client/models/similarity_metadata_all_of.rb +301 -0
- data/lib/tca_client/models/{similarity_metadata_top_matches.rb → similarity_metadata_all_of_top_matches.rb} +34 -21
- data/lib/tca_client/models/similarity_put_request.rb +27 -14
- data/lib/tca_client/models/similarity_score_data.rb +28 -15
- data/lib/tca_client/models/similarity_settings.rb +29 -16
- data/lib/tca_client/models/similarity_settings_modes.rb +26 -13
- data/lib/tca_client/models/similarity_settings_view_settings.rb +25 -12
- data/lib/tca_client/models/similarity_view_settings.rb +37 -24
- data/lib/tca_client/models/similarity_viewer_url_response.rb +25 -12
- data/lib/tca_client/models/similarity_viewer_url_settings.rb +46 -24
- data/lib/tca_client/models/simple_submission_response.rb +117 -13
- data/lib/tca_client/models/simple_submission_response_all_of.rb +294 -0
- data/lib/tca_client/models/submission.rb +191 -13
- data/lib/tca_client/models/submission_all_of.rb +368 -0
- data/lib/tca_client/models/submission_base.rb +82 -23
- data/lib/tca_client/models/submission_base_metadata.rb +30 -17
- data/lib/tca_client/models/submission_complete_webhook_request.rb +385 -0
- data/lib/tca_client/models/submission_complete_webhook_request_all_of.rb +219 -0
- data/lib/tca_client/models/submission_complete_webhook_request_all_of_metadata.rb +219 -0
- data/lib/tca_client/models/submission_size_error.rb +36 -20
- data/lib/tca_client/models/success_message.rb +25 -12
- data/lib/tca_client/models/users.rb +28 -15
- data/lib/tca_client/models/viewer_permissions.rb +29 -16
- data/lib/tca_client/models/webhook.rb +62 -16
- data/lib/tca_client/models/webhook_all_of.rb +235 -0
- data/lib/tca_client/models/webhook_base.rb +28 -15
- data/lib/tca_client/models/webhook_path_request.rb +26 -13
- data/lib/tca_client/models/webhook_with_secret.rb +52 -16
- data/lib/tca_client/models/webhook_with_secret_all_of.rb +225 -0
- data/lib/tca_client/version.rb +5 -4
- data/lib/tca_client.rb +18 -5
- data/tca_client-1.0.0.gem +0 -0
- data/tca_client.gemspec +7 -7
- metadata +34 -29
- data/docs/InlineResponse200.md +0 -7
- data/docs/SimilarityMetadataTopMatches.md +0 -13
@@ -3,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 SimilarityApi
|
14
17
|
attr_accessor :api_client
|
@@ -17,24 +20,24 @@ module TCAClient
|
|
17
20
|
@api_client = api_client
|
18
21
|
end
|
19
22
|
# GET download pdf
|
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
|
22
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
23
|
-
# @param pdf_id The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
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 id [String] The Submission ID (returned upon a successful POST to /submissions)
|
26
|
+
# @param pdf_id [String] The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
24
27
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @return [
|
28
|
+
# @return [File]
|
26
29
|
def download_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
27
30
|
data, _status_code, _headers = download_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts)
|
28
31
|
data
|
29
32
|
end
|
30
33
|
|
31
34
|
# GET download pdf
|
32
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
33
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
34
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
35
|
-
# @param pdf_id The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
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 id [String] The Submission ID (returned upon a successful POST to /submissions)
|
38
|
+
# @param pdf_id [String] The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
36
39
|
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [Array<(
|
40
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
38
41
|
def download_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
39
42
|
if @api_client.config.debugging
|
40
43
|
@api_client.config.logger.debug 'Calling API: SimilarityApi.download_similarity_report_pdf ...'
|
@@ -56,7 +59,7 @@ module TCAClient
|
|
56
59
|
fail ArgumentError, "Missing the required parameter 'pdf_id' when calling SimilarityApi.download_similarity_report_pdf"
|
57
60
|
end
|
58
61
|
# resource path
|
59
|
-
local_var_path = '/submissions/{id}/similarity/pdf/{pdf_id}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'pdf_id' + '}', pdf_id.to_s)
|
62
|
+
local_var_path = '/submissions/{id}/similarity/pdf/{pdf_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'pdf_id' + '}', CGI.escape(pdf_id.to_s))
|
60
63
|
|
61
64
|
# query parameters
|
62
65
|
query_params = opts[:query_params] || {}
|
@@ -72,29 +75,36 @@ module TCAClient
|
|
72
75
|
form_params = opts[:form_params] || {}
|
73
76
|
|
74
77
|
# http body (model)
|
75
|
-
post_body = opts[:
|
78
|
+
post_body = opts[:debug_body]
|
79
|
+
|
80
|
+
# return_type
|
81
|
+
return_type = opts[:debug_return_type] || 'File'
|
76
82
|
|
77
|
-
|
83
|
+
# auth_names
|
84
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
78
85
|
|
79
|
-
|
80
|
-
|
86
|
+
new_options = opts.merge(
|
87
|
+
:operation => :"SimilarityApi.download_similarity_report_pdf",
|
81
88
|
:header_params => header_params,
|
82
89
|
:query_params => query_params,
|
83
90
|
:form_params => form_params,
|
84
91
|
:body => post_body,
|
85
92
|
:auth_names => auth_names,
|
86
|
-
:return_type => return_type
|
93
|
+
:return_type => return_type
|
94
|
+
)
|
87
95
|
|
96
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
88
97
|
if @api_client.config.debugging
|
89
98
|
@api_client.config.logger.debug "API called: SimilarityApi#download_similarity_report_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
99
|
end
|
91
100
|
return data, status_code, headers
|
92
101
|
end
|
102
|
+
|
93
103
|
# GET pdf download status
|
94
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
95
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
96
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
97
|
-
# @param pdf_id The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
104
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
105
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
106
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
107
|
+
# @param pdf_id [String] The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
98
108
|
# @param [Hash] opts the optional parameters
|
99
109
|
# @return [PdfStatusResponse]
|
100
110
|
def get_similarity_report_pdf_status(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
@@ -103,10 +113,10 @@ module TCAClient
|
|
103
113
|
end
|
104
114
|
|
105
115
|
# GET pdf download status
|
106
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
107
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
108
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
109
|
-
# @param pdf_id The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
116
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
117
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
118
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
119
|
+
# @param pdf_id [String] The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf)
|
110
120
|
# @param [Hash] opts the optional parameters
|
111
121
|
# @return [Array<(PdfStatusResponse, Integer, Hash)>] PdfStatusResponse data, response status code and response headers
|
112
122
|
def get_similarity_report_pdf_status_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
@@ -130,7 +140,7 @@ module TCAClient
|
|
130
140
|
fail ArgumentError, "Missing the required parameter 'pdf_id' when calling SimilarityApi.get_similarity_report_pdf_status"
|
131
141
|
end
|
132
142
|
# resource path
|
133
|
-
local_var_path = '/submissions/{id}/similarity/pdf/{pdf_id}/status'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'pdf_id' + '}', pdf_id.to_s)
|
143
|
+
local_var_path = '/submissions/{id}/similarity/pdf/{pdf_id}/status'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'pdf_id' + '}', CGI.escape(pdf_id.to_s))
|
134
144
|
|
135
145
|
# query parameters
|
136
146
|
query_params = opts[:query_params] || {}
|
@@ -146,28 +156,35 @@ module TCAClient
|
|
146
156
|
form_params = opts[:form_params] || {}
|
147
157
|
|
148
158
|
# http body (model)
|
149
|
-
post_body = opts[:
|
159
|
+
post_body = opts[:debug_body]
|
160
|
+
|
161
|
+
# return_type
|
162
|
+
return_type = opts[:debug_return_type] || 'PdfStatusResponse'
|
150
163
|
|
151
|
-
|
164
|
+
# auth_names
|
165
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
152
166
|
|
153
|
-
|
154
|
-
|
167
|
+
new_options = opts.merge(
|
168
|
+
:operation => :"SimilarityApi.get_similarity_report_pdf_status",
|
155
169
|
:header_params => header_params,
|
156
170
|
:query_params => query_params,
|
157
171
|
:form_params => form_params,
|
158
172
|
:body => post_body,
|
159
173
|
:auth_names => auth_names,
|
160
|
-
:return_type => return_type
|
174
|
+
:return_type => return_type
|
175
|
+
)
|
161
176
|
|
177
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
162
178
|
if @api_client.config.debugging
|
163
179
|
@api_client.config.logger.debug "API called: SimilarityApi#get_similarity_report_pdf_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
180
|
end
|
165
181
|
return data, status_code, headers
|
166
182
|
end
|
183
|
+
|
167
184
|
# Get Similarity Report Results
|
168
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
169
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
170
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
185
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
186
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
187
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
171
188
|
# @param [Hash] opts the optional parameters
|
172
189
|
# @return [SimilarityMetadata]
|
173
190
|
def get_similarity_report_results(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
@@ -176,9 +193,9 @@ module TCAClient
|
|
176
193
|
end
|
177
194
|
|
178
195
|
# Get Similarity Report Results
|
179
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
180
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
181
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
196
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
197
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
198
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
182
199
|
# @param [Hash] opts the optional parameters
|
183
200
|
# @return [Array<(SimilarityMetadata, Integer, Hash)>] SimilarityMetadata data, response status code and response headers
|
184
201
|
def get_similarity_report_results_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
@@ -198,7 +215,7 @@ module TCAClient
|
|
198
215
|
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.get_similarity_report_results"
|
199
216
|
end
|
200
217
|
# resource path
|
201
|
-
local_var_path = '/submissions/{id}/similarity'.sub('{' + 'id' + '}', id.to_s)
|
218
|
+
local_var_path = '/submissions/{id}/similarity'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
202
219
|
|
203
220
|
# query parameters
|
204
221
|
query_params = opts[:query_params] || {}
|
@@ -214,51 +231,54 @@ module TCAClient
|
|
214
231
|
form_params = opts[:form_params] || {}
|
215
232
|
|
216
233
|
# http body (model)
|
217
|
-
post_body = opts[:
|
234
|
+
post_body = opts[:debug_body]
|
218
235
|
|
219
|
-
|
236
|
+
# return_type
|
237
|
+
return_type = opts[:debug_return_type] || 'SimilarityMetadata'
|
220
238
|
|
221
|
-
|
222
|
-
|
239
|
+
# auth_names
|
240
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
241
|
+
|
242
|
+
new_options = opts.merge(
|
243
|
+
:operation => :"SimilarityApi.get_similarity_report_results",
|
223
244
|
:header_params => header_params,
|
224
245
|
:query_params => query_params,
|
225
246
|
:form_params => form_params,
|
226
247
|
:body => post_body,
|
227
248
|
:auth_names => auth_names,
|
228
|
-
:return_type => return_type
|
249
|
+
:return_type => return_type
|
250
|
+
)
|
229
251
|
|
252
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
230
253
|
if @api_client.config.debugging
|
231
254
|
@api_client.config.logger.debug "API called: SimilarityApi#get_similarity_report_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
255
|
end
|
233
256
|
return data, status_code, headers
|
234
257
|
end
|
258
|
+
|
235
259
|
# Returns a URL to access Cloud Viewer
|
236
|
-
# @param
|
237
|
-
# @param
|
238
|
-
# @param
|
239
|
-
# @param
|
260
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
261
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
262
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
263
|
+
# @param data [SimilarityViewerUrlSettings]
|
240
264
|
# @param [Hash] opts the optional parameters
|
241
265
|
# @return [SimilarityViewerUrlResponse]
|
242
|
-
def get_similarity_report_url(
|
243
|
-
data, _status_code, _headers = get_similarity_report_url_with_http_info(
|
266
|
+
def get_similarity_report_url(x_turnitin_integration_name, x_turnitin_integration_version, id, data, opts = {})
|
267
|
+
data, _status_code, _headers = get_similarity_report_url_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, data, opts)
|
244
268
|
data
|
245
269
|
end
|
246
270
|
|
247
271
|
# Returns a URL to access Cloud Viewer
|
248
|
-
# @param
|
249
|
-
# @param
|
250
|
-
# @param
|
251
|
-
# @param
|
272
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
273
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
274
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
275
|
+
# @param data [SimilarityViewerUrlSettings]
|
252
276
|
# @param [Hash] opts the optional parameters
|
253
277
|
# @return [Array<(SimilarityViewerUrlResponse, Integer, Hash)>] SimilarityViewerUrlResponse data, response status code and response headers
|
254
|
-
def get_similarity_report_url_with_http_info(
|
278
|
+
def get_similarity_report_url_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, data, opts = {})
|
255
279
|
if @api_client.config.debugging
|
256
280
|
@api_client.config.logger.debug 'Calling API: SimilarityApi.get_similarity_report_url ...'
|
257
281
|
end
|
258
|
-
# verify the required parameter 'body' is set
|
259
|
-
if @api_client.config.client_side_validation && body.nil?
|
260
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling SimilarityApi.get_similarity_report_url"
|
261
|
-
end
|
262
282
|
# verify the required parameter 'x_turnitin_integration_name' is set
|
263
283
|
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
264
284
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.get_similarity_report_url"
|
@@ -271,8 +291,12 @@ module TCAClient
|
|
271
291
|
if @api_client.config.client_side_validation && id.nil?
|
272
292
|
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.get_similarity_report_url"
|
273
293
|
end
|
294
|
+
# verify the required parameter 'data' is set
|
295
|
+
if @api_client.config.client_side_validation && data.nil?
|
296
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling SimilarityApi.get_similarity_report_url"
|
297
|
+
end
|
274
298
|
# resource path
|
275
|
-
local_var_path = '/submissions/{id}/viewer-url'.sub('{' + 'id' + '}', id.to_s)
|
299
|
+
local_var_path = '/submissions/{id}/viewer-url'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
276
300
|
|
277
301
|
# query parameters
|
278
302
|
query_params = opts[:query_params] || {}
|
@@ -282,7 +306,10 @@ module TCAClient
|
|
282
306
|
# HTTP header 'Accept' (if needed)
|
283
307
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
284
308
|
# HTTP header 'Content-Type'
|
285
|
-
|
309
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
310
|
+
if !content_type.nil?
|
311
|
+
header_params['Content-Type'] = content_type
|
312
|
+
end
|
286
313
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
287
314
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
288
315
|
|
@@ -290,51 +317,54 @@ 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] || @api_client.object_to_http_body(data)
|
294
321
|
|
295
|
-
|
322
|
+
# return_type
|
323
|
+
return_type = opts[:debug_return_type] || 'SimilarityViewerUrlResponse'
|
296
324
|
|
297
|
-
|
298
|
-
|
325
|
+
# auth_names
|
326
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
327
|
+
|
328
|
+
new_options = opts.merge(
|
329
|
+
:operation => :"SimilarityApi.get_similarity_report_url",
|
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(:POST, local_var_path, new_options)
|
306
339
|
if @api_client.config.debugging
|
307
340
|
@api_client.config.logger.debug "API called: SimilarityApi#get_similarity_report_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
341
|
end
|
309
342
|
return data, status_code, headers
|
310
343
|
end
|
344
|
+
|
311
345
|
# Request Similarity Report generation
|
312
|
-
# @param
|
313
|
-
# @param
|
314
|
-
# @param
|
315
|
-
# @param
|
346
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
347
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
348
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
349
|
+
# @param data [SimilarityPutRequest]
|
316
350
|
# @param [Hash] opts the optional parameters
|
317
351
|
# @return [SuccessMessage]
|
318
|
-
def request_similarity_report(
|
319
|
-
data, _status_code, _headers = request_similarity_report_with_http_info(
|
352
|
+
def request_similarity_report(x_turnitin_integration_name, x_turnitin_integration_version, id, data, opts = {})
|
353
|
+
data, _status_code, _headers = request_similarity_report_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, data, opts)
|
320
354
|
data
|
321
355
|
end
|
322
356
|
|
323
357
|
# Request Similarity Report generation
|
324
|
-
# @param
|
325
|
-
# @param
|
326
|
-
# @param
|
327
|
-
# @param
|
358
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
359
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
360
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
361
|
+
# @param data [SimilarityPutRequest]
|
328
362
|
# @param [Hash] opts the optional parameters
|
329
363
|
# @return [Array<(SuccessMessage, Integer, Hash)>] SuccessMessage data, response status code and response headers
|
330
|
-
def request_similarity_report_with_http_info(
|
364
|
+
def request_similarity_report_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, data, opts = {})
|
331
365
|
if @api_client.config.debugging
|
332
366
|
@api_client.config.logger.debug 'Calling API: SimilarityApi.request_similarity_report ...'
|
333
367
|
end
|
334
|
-
# verify the required parameter 'body' is set
|
335
|
-
if @api_client.config.client_side_validation && body.nil?
|
336
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling SimilarityApi.request_similarity_report"
|
337
|
-
end
|
338
368
|
# verify the required parameter 'x_turnitin_integration_name' is set
|
339
369
|
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
340
370
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.request_similarity_report"
|
@@ -347,8 +377,12 @@ module TCAClient
|
|
347
377
|
if @api_client.config.client_side_validation && id.nil?
|
348
378
|
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.request_similarity_report"
|
349
379
|
end
|
380
|
+
# verify the required parameter 'data' is set
|
381
|
+
if @api_client.config.client_side_validation && data.nil?
|
382
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling SimilarityApi.request_similarity_report"
|
383
|
+
end
|
350
384
|
# resource path
|
351
|
-
local_var_path = '/submissions/{id}/similarity'.sub('{' + 'id' + '}', id.to_s)
|
385
|
+
local_var_path = '/submissions/{id}/similarity'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
352
386
|
|
353
387
|
# query parameters
|
354
388
|
query_params = opts[:query_params] || {}
|
@@ -358,7 +392,10 @@ module TCAClient
|
|
358
392
|
# HTTP header 'Accept' (if needed)
|
359
393
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
360
394
|
# HTTP header 'Content-Type'
|
361
|
-
|
395
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
396
|
+
if !content_type.nil?
|
397
|
+
header_params['Content-Type'] = content_type
|
398
|
+
end
|
362
399
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
363
400
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
364
401
|
|
@@ -366,42 +403,51 @@ module TCAClient
|
|
366
403
|
form_params = opts[:form_params] || {}
|
367
404
|
|
368
405
|
# http body (model)
|
369
|
-
post_body = opts[:
|
406
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
407
|
+
|
408
|
+
# return_type
|
409
|
+
return_type = opts[:debug_return_type] || 'SuccessMessage'
|
370
410
|
|
371
|
-
|
411
|
+
# auth_names
|
412
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
372
413
|
|
373
|
-
|
374
|
-
|
414
|
+
new_options = opts.merge(
|
415
|
+
:operation => :"SimilarityApi.request_similarity_report",
|
375
416
|
:header_params => header_params,
|
376
417
|
:query_params => query_params,
|
377
418
|
:form_params => form_params,
|
378
419
|
:body => post_body,
|
379
420
|
:auth_names => auth_names,
|
380
|
-
:return_type => return_type
|
421
|
+
:return_type => return_type
|
422
|
+
)
|
381
423
|
|
424
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
382
425
|
if @api_client.config.debugging
|
383
426
|
@api_client.config.logger.debug "API called: SimilarityApi#request_similarity_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
384
427
|
end
|
385
428
|
return data, status_code, headers
|
386
429
|
end
|
430
|
+
|
387
431
|
# Request Pdf download and returns the Pdf Id
|
388
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
389
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
390
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
432
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
433
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
434
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
435
|
+
# @param generate_similarity_pdf [GenerateSimilarityPDF]
|
391
436
|
# @param [Hash] opts the optional parameters
|
392
437
|
# @return [RequestPdfResponse]
|
393
|
-
def request_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
394
|
-
data, _status_code, _headers = request_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
438
|
+
def request_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, generate_similarity_pdf, opts = {})
|
439
|
+
data, _status_code, _headers = request_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, generate_similarity_pdf, opts)
|
395
440
|
data
|
396
441
|
end
|
397
442
|
|
398
443
|
# Request Pdf download and returns the Pdf Id
|
399
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
400
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
401
|
-
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
444
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
445
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
446
|
+
# @param id [String] The Submission ID (returned upon a successful POST to /submissions)
|
447
|
+
# @param generate_similarity_pdf [GenerateSimilarityPDF]
|
402
448
|
# @param [Hash] opts the optional parameters
|
403
449
|
# @return [Array<(RequestPdfResponse, Integer, Hash)>] RequestPdfResponse data, response status code and response headers
|
404
|
-
def request_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
450
|
+
def request_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, generate_similarity_pdf, opts = {})
|
405
451
|
if @api_client.config.debugging
|
406
452
|
@api_client.config.logger.debug 'Calling API: SimilarityApi.request_similarity_report_pdf ...'
|
407
453
|
end
|
@@ -417,8 +463,12 @@ module TCAClient
|
|
417
463
|
if @api_client.config.client_side_validation && id.nil?
|
418
464
|
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.request_similarity_report_pdf"
|
419
465
|
end
|
466
|
+
# verify the required parameter 'generate_similarity_pdf' is set
|
467
|
+
if @api_client.config.client_side_validation && generate_similarity_pdf.nil?
|
468
|
+
fail ArgumentError, "Missing the required parameter 'generate_similarity_pdf' when calling SimilarityApi.request_similarity_report_pdf"
|
469
|
+
end
|
420
470
|
# resource path
|
421
|
-
local_var_path = '/submissions/{id}/similarity/pdf'.sub('{' + 'id' + '}', id.to_s)
|
471
|
+
local_var_path = '/submissions/{id}/similarity/pdf'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
422
472
|
|
423
473
|
# query parameters
|
424
474
|
query_params = opts[:query_params] || {}
|
@@ -427,6 +477,11 @@ module TCAClient
|
|
427
477
|
header_params = opts[:header_params] || {}
|
428
478
|
# HTTP header 'Accept' (if needed)
|
429
479
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
480
|
+
# HTTP header 'Content-Type'
|
481
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
482
|
+
if !content_type.nil?
|
483
|
+
header_params['Content-Type'] = content_type
|
484
|
+
end
|
430
485
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
431
486
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
432
487
|
|
@@ -434,19 +489,25 @@ module TCAClient
|
|
434
489
|
form_params = opts[:form_params] || {}
|
435
490
|
|
436
491
|
# http body (model)
|
437
|
-
post_body = opts[:
|
492
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_similarity_pdf)
|
493
|
+
|
494
|
+
# return_type
|
495
|
+
return_type = opts[:debug_return_type] || 'RequestPdfResponse'
|
438
496
|
|
439
|
-
|
497
|
+
# auth_names
|
498
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
440
499
|
|
441
|
-
|
442
|
-
|
500
|
+
new_options = opts.merge(
|
501
|
+
:operation => :"SimilarityApi.request_similarity_report_pdf",
|
443
502
|
:header_params => header_params,
|
444
503
|
:query_params => query_params,
|
445
504
|
:form_params => form_params,
|
446
505
|
:body => post_body,
|
447
506
|
:auth_names => auth_names,
|
448
|
-
:return_type => return_type
|
507
|
+
:return_type => return_type
|
508
|
+
)
|
449
509
|
|
510
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
450
511
|
if @api_client.config.debugging
|
451
512
|
@api_client.config.logger.debug "API called: SimilarityApi#request_similarity_report_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
452
513
|
end
|