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 GroupsApi
|
14
17
|
attr_accessor :api_client
|
@@ -17,32 +20,28 @@ module TCAClient
|
|
17
20
|
@api_client = api_client
|
18
21
|
end
|
19
22
|
# Add attachment to a group. will create a group if it does not exist.
|
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 group_id [String] group_id
|
26
|
+
# @param data [AddGroupAttachmentRequest]
|
24
27
|
# @param [Hash] opts the optional parameters
|
25
28
|
# @return [AddGroupAttachmentResponse]
|
26
|
-
def add_group_attachment(
|
27
|
-
data, _status_code, _headers = add_group_attachment_with_http_info(
|
29
|
+
def add_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
|
30
|
+
data, _status_code, _headers = add_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts)
|
28
31
|
data
|
29
32
|
end
|
30
33
|
|
31
34
|
# Add attachment to a group. will create a group if it does not exist.
|
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 group_id [String] group_id
|
38
|
+
# @param data [AddGroupAttachmentRequest]
|
36
39
|
# @param [Hash] opts the optional parameters
|
37
40
|
# @return [Array<(AddGroupAttachmentResponse, Integer, Hash)>] AddGroupAttachmentResponse data, response status code and response headers
|
38
|
-
def add_group_attachment_with_http_info(
|
41
|
+
def add_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
|
39
42
|
if @api_client.config.debugging
|
40
43
|
@api_client.config.logger.debug 'Calling API: GroupsApi.add_group_attachment ...'
|
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 GroupsApi.add_group_attachment"
|
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 GroupsApi.add_group_attachment"
|
@@ -55,8 +54,12 @@ module TCAClient
|
|
55
54
|
if @api_client.config.client_side_validation && group_id.nil?
|
56
55
|
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.add_group_attachment"
|
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 GroupsApi.add_group_attachment"
|
60
|
+
end
|
58
61
|
# resource path
|
59
|
-
local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', group_id.to_s)
|
62
|
+
local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', CGI.escape(group_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)
|
78
84
|
|
79
|
-
|
85
|
+
# return_type
|
86
|
+
return_type = opts[:debug_return_type] || 'AddGroupAttachmentResponse'
|
80
87
|
|
81
|
-
|
82
|
-
|
88
|
+
# auth_names
|
89
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
90
|
+
|
91
|
+
new_options = opts.merge(
|
92
|
+
:operation => :"GroupsApi.add_group_attachment",
|
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: GroupsApi#add_group_attachment\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
|
# Hard delete group attachment
|
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 group_id group_id
|
99
|
-
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
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 group_id [String] group_id
|
112
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
100
113
|
# @param [Hash] opts the optional parameters
|
101
114
|
# @return [nil]
|
102
115
|
def delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
@@ -105,10 +118,10 @@ module TCAClient
|
|
105
118
|
end
|
106
119
|
|
107
120
|
# Hard delete group attachment
|
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 group_id group_id
|
111
|
-
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
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 group_id [String] group_id
|
124
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
112
125
|
# @param [Hash] opts the optional parameters
|
113
126
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
114
127
|
def delete_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
@@ -132,7 +145,7 @@ module TCAClient
|
|
132
145
|
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.delete_group_attachment"
|
133
146
|
end
|
134
147
|
# resource path
|
135
|
-
local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', group_id.to_s).sub('{' + 'attach_id' + '}', attach_id.to_s)
|
148
|
+
local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_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]
|
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 => :"GroupsApi.delete_group_attachment",
|
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(:DELETE, local_var_path, new_options)
|
164
183
|
if @api_client.config.debugging
|
165
184
|
@api_client.config.logger.debug "API called: GroupsApi#delete_group_attachment\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
|
# Get group, group context and group context owners info
|
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 group_id group_id
|
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 group_id [String] group_id
|
173
193
|
# @param [Hash] opts the optional parameters
|
174
194
|
# @return [AggregateGroup]
|
175
195
|
def get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
@@ -178,9 +198,9 @@ module TCAClient
|
|
178
198
|
end
|
179
199
|
|
180
200
|
# Get group, group context and group context owners info
|
181
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
182
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
183
|
-
# @param group_id group_id
|
201
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
202
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
203
|
+
# @param group_id [String] group_id
|
184
204
|
# @param [Hash] opts the optional parameters
|
185
205
|
# @return [Array<(AggregateGroup, Integer, Hash)>] AggregateGroup data, response status code and response headers
|
186
206
|
def get_group_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
@@ -200,7 +220,7 @@ module TCAClient
|
|
200
220
|
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group"
|
201
221
|
end
|
202
222
|
# resource path
|
203
|
-
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)
|
223
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
204
224
|
|
205
225
|
# query parameters
|
206
226
|
query_params = opts[:query_params] || {}
|
@@ -216,29 +236,36 @@ module TCAClient
|
|
216
236
|
form_params = opts[:form_params] || {}
|
217
237
|
|
218
238
|
# http body (model)
|
219
|
-
post_body = opts[:
|
239
|
+
post_body = opts[:debug_body]
|
240
|
+
|
241
|
+
# return_type
|
242
|
+
return_type = opts[:debug_return_type] || 'AggregateGroup'
|
220
243
|
|
221
|
-
|
244
|
+
# auth_names
|
245
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
222
246
|
|
223
|
-
|
224
|
-
|
247
|
+
new_options = opts.merge(
|
248
|
+
:operation => :"GroupsApi.get_group",
|
225
249
|
:header_params => header_params,
|
226
250
|
:query_params => query_params,
|
227
251
|
:form_params => form_params,
|
228
252
|
:body => post_body,
|
229
253
|
:auth_names => auth_names,
|
230
|
-
:return_type => return_type
|
254
|
+
:return_type => return_type
|
255
|
+
)
|
231
256
|
|
257
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
232
258
|
if @api_client.config.debugging
|
233
259
|
@api_client.config.logger.debug "API called: GroupsApi#get_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
234
260
|
end
|
235
261
|
return data, status_code, headers
|
236
262
|
end
|
263
|
+
|
237
264
|
# Get group attachment
|
238
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
239
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
240
|
-
# @param group_id group_id
|
241
|
-
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
265
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
266
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
267
|
+
# @param group_id [String] group_id
|
268
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
242
269
|
# @param [Hash] opts the optional parameters
|
243
270
|
# @return [GroupAttachmentResponse]
|
244
271
|
def get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
@@ -247,10 +274,10 @@ module TCAClient
|
|
247
274
|
end
|
248
275
|
|
249
276
|
# Get group attachment
|
250
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
251
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
252
|
-
# @param group_id group_id
|
253
|
-
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
277
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
278
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
279
|
+
# @param group_id [String] group_id
|
280
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
254
281
|
# @param [Hash] opts the optional parameters
|
255
282
|
# @return [Array<(GroupAttachmentResponse, Integer, Hash)>] GroupAttachmentResponse data, response status code and response headers
|
256
283
|
def get_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
@@ -274,7 +301,7 @@ module TCAClient
|
|
274
301
|
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.get_group_attachment"
|
275
302
|
end
|
276
303
|
# resource path
|
277
|
-
local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', group_id.to_s).sub('{' + 'attach_id' + '}', attach_id.to_s)
|
304
|
+
local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))
|
278
305
|
|
279
306
|
# query parameters
|
280
307
|
query_params = opts[:query_params] || {}
|
@@ -290,41 +317,48 @@ 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] || 'GroupAttachmentResponse'
|
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 => :"GroupsApi.get_group_attachment",
|
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: GroupsApi#get_group_attachment\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
|
# Get all attachments
|
312
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
313
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
314
|
-
# @param group_id group_id
|
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 group_id [String] group_id
|
315
349
|
# @param [Hash] opts the optional parameters
|
316
|
-
# @return [
|
350
|
+
# @return [GetGroupAttachments200Response]
|
317
351
|
def get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
318
352
|
data, _status_code, _headers = get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
|
319
353
|
data
|
320
354
|
end
|
321
355
|
|
322
356
|
# Get all attachments
|
323
|
-
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
324
|
-
# @param x_turnitin_integration_version the version of the integration platform being used
|
325
|
-
# @param group_id group_id
|
357
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
358
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
359
|
+
# @param group_id [String] group_id
|
326
360
|
# @param [Hash] opts the optional parameters
|
327
|
-
# @return [Array<(
|
361
|
+
# @return [Array<(GetGroupAttachments200Response, Integer, Hash)>] GetGroupAttachments200Response data, response status code and response headers
|
328
362
|
def get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
329
363
|
if @api_client.config.debugging
|
330
364
|
@api_client.config.logger.debug 'Calling API: GroupsApi.get_group_attachments ...'
|
@@ -342,7 +376,7 @@ module TCAClient
|
|
342
376
|
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_attachments"
|
343
377
|
end
|
344
378
|
# resource path
|
345
|
-
local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', group_id.to_s)
|
379
|
+
local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
346
380
|
|
347
381
|
# query parameters
|
348
382
|
query_params = opts[:query_params] || {}
|
@@ -358,51 +392,54 @@ module TCAClient
|
|
358
392
|
form_params = opts[:form_params] || {}
|
359
393
|
|
360
394
|
# http body (model)
|
361
|
-
post_body = opts[:
|
395
|
+
post_body = opts[:debug_body]
|
362
396
|
|
363
|
-
|
397
|
+
# return_type
|
398
|
+
return_type = opts[:debug_return_type] || 'GetGroupAttachments200Response'
|
364
399
|
|
365
|
-
|
366
|
-
|
400
|
+
# auth_names
|
401
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
402
|
+
|
403
|
+
new_options = opts.merge(
|
404
|
+
:operation => :"GroupsApi.get_group_attachments",
|
367
405
|
:header_params => header_params,
|
368
406
|
:query_params => query_params,
|
369
407
|
:form_params => form_params,
|
370
408
|
:body => post_body,
|
371
409
|
:auth_names => auth_names,
|
372
|
-
:return_type => return_type
|
410
|
+
:return_type => return_type
|
411
|
+
)
|
373
412
|
|
413
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
374
414
|
if @api_client.config.debugging
|
375
415
|
@api_client.config.logger.debug "API called: GroupsApi#get_group_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
376
416
|
end
|
377
417
|
return data, status_code, headers
|
378
418
|
end
|
419
|
+
|
379
420
|
# upsert group, group context and group context owners info
|
380
|
-
# @param
|
381
|
-
# @param
|
382
|
-
# @param
|
383
|
-
# @param
|
421
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
422
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
423
|
+
# @param group_id [String] group_id
|
424
|
+
# @param data [AggregateGroup]
|
384
425
|
# @param [Hash] opts the optional parameters
|
385
426
|
# @return [AggregateGroup]
|
386
|
-
def groups_group_id_put(
|
387
|
-
data, _status_code, _headers = groups_group_id_put_with_http_info(
|
427
|
+
def groups_group_id_put(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
|
428
|
+
data, _status_code, _headers = groups_group_id_put_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts)
|
388
429
|
data
|
389
430
|
end
|
390
431
|
|
391
432
|
# upsert group, group context and group context owners info
|
392
|
-
# @param
|
393
|
-
# @param
|
394
|
-
# @param
|
395
|
-
# @param
|
433
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
434
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
435
|
+
# @param group_id [String] group_id
|
436
|
+
# @param data [AggregateGroup]
|
396
437
|
# @param [Hash] opts the optional parameters
|
397
438
|
# @return [Array<(AggregateGroup, Integer, Hash)>] AggregateGroup data, response status code and response headers
|
398
|
-
def groups_group_id_put_with_http_info(
|
439
|
+
def groups_group_id_put_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
|
399
440
|
if @api_client.config.debugging
|
400
441
|
@api_client.config.logger.debug 'Calling API: GroupsApi.groups_group_id_put ...'
|
401
442
|
end
|
402
|
-
# verify the required parameter 'body' is set
|
403
|
-
if @api_client.config.client_side_validation && body.nil?
|
404
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_group_id_put"
|
405
|
-
end
|
406
443
|
# verify the required parameter 'x_turnitin_integration_name' is set
|
407
444
|
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
408
445
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.groups_group_id_put"
|
@@ -415,8 +452,12 @@ module TCAClient
|
|
415
452
|
if @api_client.config.client_side_validation && group_id.nil?
|
416
453
|
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.groups_group_id_put"
|
417
454
|
end
|
455
|
+
# verify the required parameter 'data' is set
|
456
|
+
if @api_client.config.client_side_validation && data.nil?
|
457
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling GroupsApi.groups_group_id_put"
|
458
|
+
end
|
418
459
|
# resource path
|
419
|
-
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)
|
460
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
|
420
461
|
|
421
462
|
# query parameters
|
422
463
|
query_params = opts[:query_params] || {}
|
@@ -426,7 +467,10 @@ module TCAClient
|
|
426
467
|
# HTTP header 'Accept' (if needed)
|
427
468
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
428
469
|
# HTTP header 'Content-Type'
|
429
|
-
|
470
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
471
|
+
if !content_type.nil?
|
472
|
+
header_params['Content-Type'] = content_type
|
473
|
+
end
|
430
474
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
431
475
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
432
476
|
|
@@ -434,53 +478,56 @@ module TCAClient
|
|
434
478
|
form_params = opts[:form_params] || {}
|
435
479
|
|
436
480
|
# http body (model)
|
437
|
-
post_body = opts[:
|
481
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
482
|
+
|
483
|
+
# return_type
|
484
|
+
return_type = opts[:debug_return_type] || 'AggregateGroup'
|
438
485
|
|
439
|
-
|
486
|
+
# auth_names
|
487
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
440
488
|
|
441
|
-
|
442
|
-
|
489
|
+
new_options = opts.merge(
|
490
|
+
:operation => :"GroupsApi.groups_group_id_put",
|
443
491
|
:header_params => header_params,
|
444
492
|
:query_params => query_params,
|
445
493
|
:form_params => form_params,
|
446
494
|
:body => post_body,
|
447
495
|
:auth_names => auth_names,
|
448
|
-
:return_type => return_type
|
496
|
+
:return_type => return_type
|
497
|
+
)
|
449
498
|
|
499
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
450
500
|
if @api_client.config.debugging
|
451
501
|
@api_client.config.logger.debug "API called: GroupsApi#groups_group_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
452
502
|
end
|
453
503
|
return data, status_code, headers
|
454
504
|
end
|
505
|
+
|
455
506
|
# Patch a group attachment
|
456
|
-
# @param
|
457
|
-
# @param
|
458
|
-
# @param
|
459
|
-
# @param
|
460
|
-
# @param
|
507
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
508
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
509
|
+
# @param group_id [String] group_id
|
510
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
511
|
+
# @param data [AddGroupAttachmentRequest]
|
461
512
|
# @param [Hash] opts the optional parameters
|
462
513
|
# @return [GroupAttachmentResponse]
|
463
|
-
def update_group_attachment(
|
464
|
-
data, _status_code, _headers = update_group_attachment_with_http_info(
|
514
|
+
def update_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts = {})
|
515
|
+
data, _status_code, _headers = update_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts)
|
465
516
|
data
|
466
517
|
end
|
467
518
|
|
468
519
|
# Patch a group attachment
|
469
|
-
# @param
|
470
|
-
# @param
|
471
|
-
# @param
|
472
|
-
# @param
|
473
|
-
# @param
|
520
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
521
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
522
|
+
# @param group_id [String] group_id
|
523
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
524
|
+
# @param data [AddGroupAttachmentRequest]
|
474
525
|
# @param [Hash] opts the optional parameters
|
475
526
|
# @return [Array<(GroupAttachmentResponse, Integer, Hash)>] GroupAttachmentResponse data, response status code and response headers
|
476
|
-
def update_group_attachment_with_http_info(
|
527
|
+
def update_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts = {})
|
477
528
|
if @api_client.config.debugging
|
478
529
|
@api_client.config.logger.debug 'Calling API: GroupsApi.update_group_attachment ...'
|
479
530
|
end
|
480
|
-
# verify the required parameter 'body' is set
|
481
|
-
if @api_client.config.client_side_validation && body.nil?
|
482
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.update_group_attachment"
|
483
|
-
end
|
484
531
|
# verify the required parameter 'x_turnitin_integration_name' is set
|
485
532
|
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
486
533
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.update_group_attachment"
|
@@ -497,8 +544,12 @@ module TCAClient
|
|
497
544
|
if @api_client.config.client_side_validation && attach_id.nil?
|
498
545
|
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.update_group_attachment"
|
499
546
|
end
|
547
|
+
# verify the required parameter 'data' is set
|
548
|
+
if @api_client.config.client_side_validation && data.nil?
|
549
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling GroupsApi.update_group_attachment"
|
550
|
+
end
|
500
551
|
# resource path
|
501
|
-
local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', group_id.to_s).sub('{' + 'attach_id' + '}', attach_id.to_s)
|
552
|
+
local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))
|
502
553
|
|
503
554
|
# query parameters
|
504
555
|
query_params = opts[:query_params] || {}
|
@@ -508,7 +559,10 @@ module TCAClient
|
|
508
559
|
# HTTP header 'Accept' (if needed)
|
509
560
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
510
561
|
# HTTP header 'Content-Type'
|
511
|
-
|
562
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
563
|
+
if !content_type.nil?
|
564
|
+
header_params['Content-Type'] = content_type
|
565
|
+
end
|
512
566
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
513
567
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
514
568
|
|
@@ -516,55 +570,58 @@ module TCAClient
|
|
516
570
|
form_params = opts[:form_params] || {}
|
517
571
|
|
518
572
|
# http body (model)
|
519
|
-
post_body = opts[:
|
573
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
574
|
+
|
575
|
+
# return_type
|
576
|
+
return_type = opts[:debug_return_type] || 'GroupAttachmentResponse'
|
520
577
|
|
521
|
-
|
578
|
+
# auth_names
|
579
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
522
580
|
|
523
|
-
|
524
|
-
|
581
|
+
new_options = opts.merge(
|
582
|
+
:operation => :"GroupsApi.update_group_attachment",
|
525
583
|
:header_params => header_params,
|
526
584
|
:query_params => query_params,
|
527
585
|
:form_params => form_params,
|
528
586
|
:body => post_body,
|
529
587
|
:auth_names => auth_names,
|
530
|
-
:return_type => return_type
|
588
|
+
:return_type => return_type
|
589
|
+
)
|
531
590
|
|
591
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
532
592
|
if @api_client.config.debugging
|
533
593
|
@api_client.config.logger.debug "API called: GroupsApi#update_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
534
594
|
end
|
535
595
|
return data, status_code, headers
|
536
596
|
end
|
597
|
+
|
537
598
|
# Upload Submitted File
|
538
|
-
# @param
|
539
|
-
# @param
|
540
|
-
# @param
|
541
|
-
# @param
|
542
|
-
# @param
|
543
|
-
# @param
|
599
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
600
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
601
|
+
# @param group_id [String] The Group ID (required to already exist)
|
602
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
603
|
+
# @param content_disposition [String] *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`
|
604
|
+
# @param file [Object] the attachment file
|
544
605
|
# @param [Hash] opts the optional parameters
|
545
606
|
# @return [SuccessMessage]
|
546
|
-
def upload_group_attachment(
|
547
|
-
data, _status_code, _headers = upload_group_attachment_with_http_info(
|
607
|
+
def upload_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts = {})
|
608
|
+
data, _status_code, _headers = upload_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts)
|
548
609
|
data
|
549
610
|
end
|
550
611
|
|
551
612
|
# Upload Submitted File
|
552
|
-
# @param
|
553
|
-
# @param
|
554
|
-
# @param
|
555
|
-
# @param
|
556
|
-
# @param
|
557
|
-
# @param
|
613
|
+
# @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
|
614
|
+
# @param x_turnitin_integration_version [String] the version of the integration platform being used
|
615
|
+
# @param group_id [String] The Group ID (required to already exist)
|
616
|
+
# @param attach_id [String] The attachment ID (returned from a successful group attachment request)
|
617
|
+
# @param content_disposition [String] *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`
|
618
|
+
# @param file [Object] the attachment file
|
558
619
|
# @param [Hash] opts the optional parameters
|
559
620
|
# @return [Array<(SuccessMessage, Integer, Hash)>] SuccessMessage data, response status code and response headers
|
560
|
-
def upload_group_attachment_with_http_info(
|
621
|
+
def upload_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts = {})
|
561
622
|
if @api_client.config.debugging
|
562
623
|
@api_client.config.logger.debug 'Calling API: GroupsApi.upload_group_attachment ...'
|
563
624
|
end
|
564
|
-
# verify the required parameter 'body' is set
|
565
|
-
if @api_client.config.client_side_validation && body.nil?
|
566
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.upload_group_attachment"
|
567
|
-
end
|
568
625
|
# verify the required parameter 'x_turnitin_integration_name' is set
|
569
626
|
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
570
627
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.upload_group_attachment"
|
@@ -573,10 +630,6 @@ module TCAClient
|
|
573
630
|
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
574
631
|
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.upload_group_attachment"
|
575
632
|
end
|
576
|
-
# verify the required parameter 'content_disposition' is set
|
577
|
-
if @api_client.config.client_side_validation && content_disposition.nil?
|
578
|
-
fail ArgumentError, "Missing the required parameter 'content_disposition' when calling GroupsApi.upload_group_attachment"
|
579
|
-
end
|
580
633
|
# verify the required parameter 'group_id' is set
|
581
634
|
if @api_client.config.client_side_validation && group_id.nil?
|
582
635
|
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.upload_group_attachment"
|
@@ -585,8 +638,16 @@ module TCAClient
|
|
585
638
|
if @api_client.config.client_side_validation && attach_id.nil?
|
586
639
|
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.upload_group_attachment"
|
587
640
|
end
|
641
|
+
# verify the required parameter 'content_disposition' is set
|
642
|
+
if @api_client.config.client_side_validation && content_disposition.nil?
|
643
|
+
fail ArgumentError, "Missing the required parameter 'content_disposition' when calling GroupsApi.upload_group_attachment"
|
644
|
+
end
|
645
|
+
# verify the required parameter 'file' is set
|
646
|
+
if @api_client.config.client_side_validation && file.nil?
|
647
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling GroupsApi.upload_group_attachment"
|
648
|
+
end
|
588
649
|
# resource path
|
589
|
-
local_var_path = '/groups/{group_id}/attachments/{attach_id}/original'.sub('{' + 'group_id' + '}', group_id.to_s).sub('{' + 'attach_id' + '}', attach_id.to_s)
|
650
|
+
local_var_path = '/groups/{group_id}/attachments/{attach_id}/original'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))
|
590
651
|
|
591
652
|
# query parameters
|
592
653
|
query_params = opts[:query_params] || {}
|
@@ -596,7 +657,10 @@ module TCAClient
|
|
596
657
|
# HTTP header 'Accept' (if needed)
|
597
658
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
598
659
|
# HTTP header 'Content-Type'
|
599
|
-
|
660
|
+
content_type = @api_client.select_header_content_type(['binary/octet-stream'])
|
661
|
+
if !content_type.nil?
|
662
|
+
header_params['Content-Type'] = content_type
|
663
|
+
end
|
600
664
|
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
601
665
|
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
602
666
|
header_params[:'Content-Disposition'] = content_disposition
|
@@ -605,19 +669,25 @@ module TCAClient
|
|
605
669
|
form_params = opts[:form_params] || {}
|
606
670
|
|
607
671
|
# http body (model)
|
608
|
-
post_body = opts[:
|
672
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(file)
|
673
|
+
|
674
|
+
# return_type
|
675
|
+
return_type = opts[:debug_return_type] || 'SuccessMessage'
|
609
676
|
|
610
|
-
|
677
|
+
# auth_names
|
678
|
+
auth_names = opts[:debug_auth_names] || ['api_key']
|
611
679
|
|
612
|
-
|
613
|
-
|
680
|
+
new_options = opts.merge(
|
681
|
+
:operation => :"GroupsApi.upload_group_attachment",
|
614
682
|
:header_params => header_params,
|
615
683
|
:query_params => query_params,
|
616
684
|
:form_params => form_params,
|
617
685
|
:body => post_body,
|
618
686
|
:auth_names => auth_names,
|
619
|
-
:return_type => return_type
|
687
|
+
:return_type => return_type
|
688
|
+
)
|
620
689
|
|
690
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
621
691
|
if @api_client.config.debugging
|
622
692
|
@api_client.config.logger.debug "API called: GroupsApi#upload_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
623
693
|
end
|