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
@@ -0,0 +1,156 @@
|
|
1
|
+
=begin
|
2
|
+
#Turnitin Core API
|
3
|
+
|
4
|
+
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.249
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.35
|
10
|
+
=end
|
11
|
+
|
12
|
+
module TCAClient
|
13
|
+
class IndexApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Return index state of submission
|
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 [Hash] opts the optional parameters
|
24
|
+
# @return [IndexStateSettings]
|
25
|
+
def get_index_status(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
26
|
+
data, _status_code, _headers = get_index_status_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Return index state of submission
|
31
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
32
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
33
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(IndexStateSettings, Integer, Hash)>] IndexStateSettings data, response status code and response headers
|
36
|
+
def get_index_status_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: IndexApi.get_index_status ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
41
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling IndexApi.get_index_status"
|
43
|
+
end
|
44
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
45
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling IndexApi.get_index_status"
|
47
|
+
end
|
48
|
+
# verify the required parameter 'id' is set
|
49
|
+
if @api_client.config.client_side_validation && id.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IndexApi.get_index_status"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/submissions/{id}/index'.sub('{' + 'id' + '}', id.to_s)
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
63
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = opts[:form_params] || {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:body]
|
70
|
+
|
71
|
+
return_type = opts[:return_type] || 'IndexStateSettings'
|
72
|
+
|
73
|
+
auth_names = opts[:auth_names] || ['api_key']
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type)
|
81
|
+
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: IndexApi#get_index_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
# Index and return index state of submission
|
88
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
89
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
90
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [IndexStateSettings]
|
93
|
+
def index_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
94
|
+
data, _status_code, _headers = index_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
# Index and return index state of submission
|
99
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
100
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
101
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(IndexStateSettings, Integer, Hash)>] IndexStateSettings data, response status code and response headers
|
104
|
+
def index_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: IndexApi.index_submission ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
109
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling IndexApi.index_submission"
|
111
|
+
end
|
112
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
113
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling IndexApi.index_submission"
|
115
|
+
end
|
116
|
+
# verify the required parameter 'id' is set
|
117
|
+
if @api_client.config.client_side_validation && id.nil?
|
118
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IndexApi.index_submission"
|
119
|
+
end
|
120
|
+
# resource path
|
121
|
+
local_var_path = '/submissions/{id}/index'.sub('{' + 'id' + '}', id.to_s)
|
122
|
+
|
123
|
+
# query parameters
|
124
|
+
query_params = opts[:query_params] || {}
|
125
|
+
|
126
|
+
# header parameters
|
127
|
+
header_params = opts[:header_params] || {}
|
128
|
+
# HTTP header 'Accept' (if needed)
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
131
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
132
|
+
|
133
|
+
# form parameters
|
134
|
+
form_params = opts[:form_params] || {}
|
135
|
+
|
136
|
+
# http body (model)
|
137
|
+
post_body = opts[:body]
|
138
|
+
|
139
|
+
return_type = opts[:return_type] || 'IndexStateSettings'
|
140
|
+
|
141
|
+
auth_names = opts[:auth_names] || ['api_key']
|
142
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type)
|
149
|
+
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: IndexApi#index_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
@@ -0,0 +1,456 @@
|
|
1
|
+
=begin
|
2
|
+
#Turnitin Core API
|
3
|
+
|
4
|
+
#Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.249
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.35
|
10
|
+
=end
|
11
|
+
|
12
|
+
module TCAClient
|
13
|
+
class SimilarityApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# 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)
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [String]
|
26
|
+
def download_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
27
|
+
data, _status_code, _headers = download_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# 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)
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
38
|
+
def download_similarity_report_pdf_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: SimilarityApi.download_similarity_report_pdf ...'
|
41
|
+
end
|
42
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
43
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.download_similarity_report_pdf"
|
45
|
+
end
|
46
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
47
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SimilarityApi.download_similarity_report_pdf"
|
49
|
+
end
|
50
|
+
# verify the required parameter 'id' is set
|
51
|
+
if @api_client.config.client_side_validation && id.nil?
|
52
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.download_similarity_report_pdf"
|
53
|
+
end
|
54
|
+
# verify the required parameter 'pdf_id' is set
|
55
|
+
if @api_client.config.client_side_validation && pdf_id.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'pdf_id' when calling SimilarityApi.download_similarity_report_pdf"
|
57
|
+
end
|
58
|
+
# resource path
|
59
|
+
local_var_path = '/submissions/{id}/similarity/pdf/{pdf_id}'.sub('{' + 'id' + '}', id.to_s).sub('{' + 'pdf_id' + '}', pdf_id.to_s)
|
60
|
+
|
61
|
+
# query parameters
|
62
|
+
query_params = opts[:query_params] || {}
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = opts[:header_params] || {}
|
66
|
+
# HTTP header 'Accept' (if needed)
|
67
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json'])
|
68
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
69
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
70
|
+
|
71
|
+
# form parameters
|
72
|
+
form_params = opts[:form_params] || {}
|
73
|
+
|
74
|
+
# http body (model)
|
75
|
+
post_body = opts[:body]
|
76
|
+
|
77
|
+
return_type = opts[:return_type] || 'String'
|
78
|
+
|
79
|
+
auth_names = opts[:auth_names] || ['api_key']
|
80
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => return_type)
|
87
|
+
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug "API called: SimilarityApi#download_similarity_report_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
|
+
end
|
91
|
+
return data, status_code, headers
|
92
|
+
end
|
93
|
+
# 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)
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [PdfStatusResponse]
|
100
|
+
def get_similarity_report_pdf_status(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
101
|
+
data, _status_code, _headers = get_similarity_report_pdf_status_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts)
|
102
|
+
data
|
103
|
+
end
|
104
|
+
|
105
|
+
# 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)
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [Array<(PdfStatusResponse, Integer, Hash)>] PdfStatusResponse data, response status code and response headers
|
112
|
+
def get_similarity_report_pdf_status_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id, opts = {})
|
113
|
+
if @api_client.config.debugging
|
114
|
+
@api_client.config.logger.debug 'Calling API: SimilarityApi.get_similarity_report_pdf_status ...'
|
115
|
+
end
|
116
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
117
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
118
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.get_similarity_report_pdf_status"
|
119
|
+
end
|
120
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
121
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
122
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SimilarityApi.get_similarity_report_pdf_status"
|
123
|
+
end
|
124
|
+
# verify the required parameter 'id' is set
|
125
|
+
if @api_client.config.client_side_validation && id.nil?
|
126
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.get_similarity_report_pdf_status"
|
127
|
+
end
|
128
|
+
# verify the required parameter 'pdf_id' is set
|
129
|
+
if @api_client.config.client_side_validation && pdf_id.nil?
|
130
|
+
fail ArgumentError, "Missing the required parameter 'pdf_id' when calling SimilarityApi.get_similarity_report_pdf_status"
|
131
|
+
end
|
132
|
+
# 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)
|
134
|
+
|
135
|
+
# query parameters
|
136
|
+
query_params = opts[:query_params] || {}
|
137
|
+
|
138
|
+
# header parameters
|
139
|
+
header_params = opts[:header_params] || {}
|
140
|
+
# HTTP header 'Accept' (if needed)
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
142
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
143
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
144
|
+
|
145
|
+
# form parameters
|
146
|
+
form_params = opts[:form_params] || {}
|
147
|
+
|
148
|
+
# http body (model)
|
149
|
+
post_body = opts[:body]
|
150
|
+
|
151
|
+
return_type = opts[:return_type] || 'PdfStatusResponse'
|
152
|
+
|
153
|
+
auth_names = opts[:auth_names] || ['api_key']
|
154
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
155
|
+
:header_params => header_params,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body,
|
159
|
+
:auth_names => auth_names,
|
160
|
+
:return_type => return_type)
|
161
|
+
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: SimilarityApi#get_similarity_report_pdf_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
# 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)
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [SimilarityMetadata]
|
173
|
+
def get_similarity_report_results(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
174
|
+
data, _status_code, _headers = get_similarity_report_results_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
175
|
+
data
|
176
|
+
end
|
177
|
+
|
178
|
+
# 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)
|
182
|
+
# @param [Hash] opts the optional parameters
|
183
|
+
# @return [Array<(SimilarityMetadata, Integer, Hash)>] SimilarityMetadata data, response status code and response headers
|
184
|
+
def get_similarity_report_results_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug 'Calling API: SimilarityApi.get_similarity_report_results ...'
|
187
|
+
end
|
188
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
189
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
190
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.get_similarity_report_results"
|
191
|
+
end
|
192
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
193
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
194
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SimilarityApi.get_similarity_report_results"
|
195
|
+
end
|
196
|
+
# verify the required parameter 'id' is set
|
197
|
+
if @api_client.config.client_side_validation && id.nil?
|
198
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.get_similarity_report_results"
|
199
|
+
end
|
200
|
+
# resource path
|
201
|
+
local_var_path = '/submissions/{id}/similarity'.sub('{' + 'id' + '}', id.to_s)
|
202
|
+
|
203
|
+
# query parameters
|
204
|
+
query_params = opts[:query_params] || {}
|
205
|
+
|
206
|
+
# header parameters
|
207
|
+
header_params = opts[:header_params] || {}
|
208
|
+
# HTTP header 'Accept' (if needed)
|
209
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
210
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
211
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
212
|
+
|
213
|
+
# form parameters
|
214
|
+
form_params = opts[:form_params] || {}
|
215
|
+
|
216
|
+
# http body (model)
|
217
|
+
post_body = opts[:body]
|
218
|
+
|
219
|
+
return_type = opts[:return_type] || 'SimilarityMetadata'
|
220
|
+
|
221
|
+
auth_names = opts[:auth_names] || ['api_key']
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
223
|
+
:header_params => header_params,
|
224
|
+
:query_params => query_params,
|
225
|
+
:form_params => form_params,
|
226
|
+
:body => post_body,
|
227
|
+
:auth_names => auth_names,
|
228
|
+
:return_type => return_type)
|
229
|
+
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug "API called: SimilarityApi#get_similarity_report_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
232
|
+
end
|
233
|
+
return data, status_code, headers
|
234
|
+
end
|
235
|
+
# Returns a URL to access Cloud Viewer
|
236
|
+
# @param body
|
237
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
238
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
239
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
240
|
+
# @param [Hash] opts the optional parameters
|
241
|
+
# @return [SimilarityViewerUrlResponse]
|
242
|
+
def get_similarity_report_url(body, x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
243
|
+
data, _status_code, _headers = get_similarity_report_url_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
244
|
+
data
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns a URL to access Cloud Viewer
|
248
|
+
# @param body
|
249
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
250
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
251
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @return [Array<(SimilarityViewerUrlResponse, Integer, Hash)>] SimilarityViewerUrlResponse data, response status code and response headers
|
254
|
+
def get_similarity_report_url_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
255
|
+
if @api_client.config.debugging
|
256
|
+
@api_client.config.logger.debug 'Calling API: SimilarityApi.get_similarity_report_url ...'
|
257
|
+
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
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
263
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.get_similarity_report_url"
|
265
|
+
end
|
266
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
267
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
268
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SimilarityApi.get_similarity_report_url"
|
269
|
+
end
|
270
|
+
# verify the required parameter 'id' is set
|
271
|
+
if @api_client.config.client_side_validation && id.nil?
|
272
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.get_similarity_report_url"
|
273
|
+
end
|
274
|
+
# resource path
|
275
|
+
local_var_path = '/submissions/{id}/viewer-url'.sub('{' + 'id' + '}', id.to_s)
|
276
|
+
|
277
|
+
# query parameters
|
278
|
+
query_params = opts[:query_params] || {}
|
279
|
+
|
280
|
+
# header parameters
|
281
|
+
header_params = opts[:header_params] || {}
|
282
|
+
# HTTP header 'Accept' (if needed)
|
283
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
284
|
+
# HTTP header 'Content-Type'
|
285
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
286
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
287
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
288
|
+
|
289
|
+
# form parameters
|
290
|
+
form_params = opts[:form_params] || {}
|
291
|
+
|
292
|
+
# http body (model)
|
293
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
294
|
+
|
295
|
+
return_type = opts[:return_type] || 'SimilarityViewerUrlResponse'
|
296
|
+
|
297
|
+
auth_names = opts[:auth_names] || ['api_key']
|
298
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
299
|
+
:header_params => header_params,
|
300
|
+
:query_params => query_params,
|
301
|
+
:form_params => form_params,
|
302
|
+
:body => post_body,
|
303
|
+
:auth_names => auth_names,
|
304
|
+
:return_type => return_type)
|
305
|
+
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug "API called: SimilarityApi#get_similarity_report_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
|
+
end
|
309
|
+
return data, status_code, headers
|
310
|
+
end
|
311
|
+
# Request Similarity Report generation
|
312
|
+
# @param body
|
313
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
314
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
315
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @return [SuccessMessage]
|
318
|
+
def request_similarity_report(body, x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
319
|
+
data, _status_code, _headers = request_similarity_report_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
|
320
|
+
data
|
321
|
+
end
|
322
|
+
|
323
|
+
# Request Similarity Report generation
|
324
|
+
# @param body
|
325
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
326
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
327
|
+
# @param id The Submission ID (returned upon a successful POST to /submissions)
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @return [Array<(SuccessMessage, Integer, Hash)>] SuccessMessage data, response status code and response headers
|
330
|
+
def request_similarity_report_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
|
331
|
+
if @api_client.config.debugging
|
332
|
+
@api_client.config.logger.debug 'Calling API: SimilarityApi.request_similarity_report ...'
|
333
|
+
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
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
339
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
340
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.request_similarity_report"
|
341
|
+
end
|
342
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
343
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
344
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SimilarityApi.request_similarity_report"
|
345
|
+
end
|
346
|
+
# verify the required parameter 'id' is set
|
347
|
+
if @api_client.config.client_side_validation && id.nil?
|
348
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.request_similarity_report"
|
349
|
+
end
|
350
|
+
# resource path
|
351
|
+
local_var_path = '/submissions/{id}/similarity'.sub('{' + 'id' + '}', id.to_s)
|
352
|
+
|
353
|
+
# query parameters
|
354
|
+
query_params = opts[:query_params] || {}
|
355
|
+
|
356
|
+
# header parameters
|
357
|
+
header_params = opts[:header_params] || {}
|
358
|
+
# HTTP header 'Accept' (if needed)
|
359
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
360
|
+
# HTTP header 'Content-Type'
|
361
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
362
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
363
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
364
|
+
|
365
|
+
# form parameters
|
366
|
+
form_params = opts[:form_params] || {}
|
367
|
+
|
368
|
+
# http body (model)
|
369
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
370
|
+
|
371
|
+
return_type = opts[:return_type] || 'SuccessMessage'
|
372
|
+
|
373
|
+
auth_names = opts[:auth_names] || ['api_key']
|
374
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
375
|
+
:header_params => header_params,
|
376
|
+
:query_params => query_params,
|
377
|
+
:form_params => form_params,
|
378
|
+
:body => post_body,
|
379
|
+
:auth_names => auth_names,
|
380
|
+
:return_type => return_type)
|
381
|
+
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug "API called: SimilarityApi#request_similarity_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
384
|
+
end
|
385
|
+
return data, status_code, headers
|
386
|
+
end
|
387
|
+
# 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)
|
391
|
+
# @param [Hash] opts the optional parameters
|
392
|
+
# @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)
|
395
|
+
data
|
396
|
+
end
|
397
|
+
|
398
|
+
# 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)
|
402
|
+
# @param [Hash] opts the optional parameters
|
403
|
+
# @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 = {})
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug 'Calling API: SimilarityApi.request_similarity_report_pdf ...'
|
407
|
+
end
|
408
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
409
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
410
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SimilarityApi.request_similarity_report_pdf"
|
411
|
+
end
|
412
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
413
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
414
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SimilarityApi.request_similarity_report_pdf"
|
415
|
+
end
|
416
|
+
# verify the required parameter 'id' is set
|
417
|
+
if @api_client.config.client_side_validation && id.nil?
|
418
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SimilarityApi.request_similarity_report_pdf"
|
419
|
+
end
|
420
|
+
# resource path
|
421
|
+
local_var_path = '/submissions/{id}/similarity/pdf'.sub('{' + 'id' + '}', id.to_s)
|
422
|
+
|
423
|
+
# query parameters
|
424
|
+
query_params = opts[:query_params] || {}
|
425
|
+
|
426
|
+
# header parameters
|
427
|
+
header_params = opts[:header_params] || {}
|
428
|
+
# HTTP header 'Accept' (if needed)
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
430
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
431
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
432
|
+
|
433
|
+
# form parameters
|
434
|
+
form_params = opts[:form_params] || {}
|
435
|
+
|
436
|
+
# http body (model)
|
437
|
+
post_body = opts[:body]
|
438
|
+
|
439
|
+
return_type = opts[:return_type] || 'RequestPdfResponse'
|
440
|
+
|
441
|
+
auth_names = opts[:auth_names] || ['api_key']
|
442
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
443
|
+
:header_params => header_params,
|
444
|
+
:query_params => query_params,
|
445
|
+
:form_params => form_params,
|
446
|
+
:body => post_body,
|
447
|
+
:auth_names => auth_names,
|
448
|
+
:return_type => return_type)
|
449
|
+
|
450
|
+
if @api_client.config.debugging
|
451
|
+
@api_client.config.logger.debug "API called: SimilarityApi#request_similarity_report_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
452
|
+
end
|
453
|
+
return data, status_code, headers
|
454
|
+
end
|
455
|
+
end
|
456
|
+
end
|