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,627 @@
|
|
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 GroupsApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# Add attachment to a group. will create a group if it does not exist.
|
20
|
+
# @param body
|
21
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
22
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
23
|
+
# @param group_id group_id
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [AddGroupAttachmentResponse]
|
26
|
+
def add_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
27
|
+
data, _status_code, _headers = add_group_attachment_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Add attachment to a group. will create a group if it does not exist.
|
32
|
+
# @param body
|
33
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
34
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
35
|
+
# @param group_id group_id
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(AddGroupAttachmentResponse, Integer, Hash)>] AddGroupAttachmentResponse data, response status code and response headers
|
38
|
+
def add_group_attachment_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.add_group_attachment ...'
|
41
|
+
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
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
47
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.add_group_attachment"
|
49
|
+
end
|
50
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
51
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
52
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.add_group_attachment"
|
53
|
+
end
|
54
|
+
# verify the required parameter 'group_id' is set
|
55
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.add_group_attachment"
|
57
|
+
end
|
58
|
+
# resource path
|
59
|
+
local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', group_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/json'])
|
68
|
+
# HTTP header 'Content-Type'
|
69
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
70
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
71
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
78
|
+
|
79
|
+
return_type = opts[:return_type] || 'AddGroupAttachmentResponse'
|
80
|
+
|
81
|
+
auth_names = opts[:auth_names] || ['api_key']
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type)
|
89
|
+
|
90
|
+
if @api_client.config.debugging
|
91
|
+
@api_client.config.logger.debug "API called: GroupsApi#add_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
|
+
end
|
93
|
+
return data, status_code, headers
|
94
|
+
end
|
95
|
+
# 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)
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [nil]
|
102
|
+
def delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
103
|
+
delete_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts)
|
104
|
+
nil
|
105
|
+
end
|
106
|
+
|
107
|
+
# 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)
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
114
|
+
def delete_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.delete_group_attachment ...'
|
117
|
+
end
|
118
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
119
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.delete_group_attachment"
|
121
|
+
end
|
122
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
123
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
124
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.delete_group_attachment"
|
125
|
+
end
|
126
|
+
# verify the required parameter 'group_id' is set
|
127
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
128
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group_attachment"
|
129
|
+
end
|
130
|
+
# verify the required parameter 'attach_id' is set
|
131
|
+
if @api_client.config.client_side_validation && attach_id.nil?
|
132
|
+
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.delete_group_attachment"
|
133
|
+
end
|
134
|
+
# 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)
|
136
|
+
|
137
|
+
# query parameters
|
138
|
+
query_params = opts[:query_params] || {}
|
139
|
+
|
140
|
+
# header parameters
|
141
|
+
header_params = opts[:header_params] || {}
|
142
|
+
# HTTP header 'Accept' (if needed)
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
144
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
145
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
146
|
+
|
147
|
+
# form parameters
|
148
|
+
form_params = opts[:form_params] || {}
|
149
|
+
|
150
|
+
# http body (model)
|
151
|
+
post_body = opts[:body]
|
152
|
+
|
153
|
+
return_type = opts[:return_type]
|
154
|
+
|
155
|
+
auth_names = opts[:auth_names] || ['api_key']
|
156
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
157
|
+
:header_params => header_params,
|
158
|
+
:query_params => query_params,
|
159
|
+
:form_params => form_params,
|
160
|
+
:body => post_body,
|
161
|
+
:auth_names => auth_names,
|
162
|
+
:return_type => return_type)
|
163
|
+
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "API called: GroupsApi#delete_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
|
+
end
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
# 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
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @return [AggregateGroup]
|
175
|
+
def get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
176
|
+
data, _status_code, _headers = get_group_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
|
177
|
+
data
|
178
|
+
end
|
179
|
+
|
180
|
+
# 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
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @return [Array<(AggregateGroup, Integer, Hash)>] AggregateGroup data, response status code and response headers
|
186
|
+
def get_group_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
187
|
+
if @api_client.config.debugging
|
188
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.get_group ...'
|
189
|
+
end
|
190
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
191
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
192
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.get_group"
|
193
|
+
end
|
194
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
195
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
196
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.get_group"
|
197
|
+
end
|
198
|
+
# verify the required parameter 'group_id' is set
|
199
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
200
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group"
|
201
|
+
end
|
202
|
+
# resource path
|
203
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)
|
204
|
+
|
205
|
+
# query parameters
|
206
|
+
query_params = opts[:query_params] || {}
|
207
|
+
|
208
|
+
# header parameters
|
209
|
+
header_params = opts[:header_params] || {}
|
210
|
+
# HTTP header 'Accept' (if needed)
|
211
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
212
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
213
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
214
|
+
|
215
|
+
# form parameters
|
216
|
+
form_params = opts[:form_params] || {}
|
217
|
+
|
218
|
+
# http body (model)
|
219
|
+
post_body = opts[:body]
|
220
|
+
|
221
|
+
return_type = opts[:return_type] || 'AggregateGroup'
|
222
|
+
|
223
|
+
auth_names = opts[:auth_names] || ['api_key']
|
224
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
225
|
+
:header_params => header_params,
|
226
|
+
:query_params => query_params,
|
227
|
+
:form_params => form_params,
|
228
|
+
:body => post_body,
|
229
|
+
:auth_names => auth_names,
|
230
|
+
:return_type => return_type)
|
231
|
+
|
232
|
+
if @api_client.config.debugging
|
233
|
+
@api_client.config.logger.debug "API called: GroupsApi#get_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
234
|
+
end
|
235
|
+
return data, status_code, headers
|
236
|
+
end
|
237
|
+
# 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)
|
242
|
+
# @param [Hash] opts the optional parameters
|
243
|
+
# @return [GroupAttachmentResponse]
|
244
|
+
def get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
245
|
+
data, _status_code, _headers = get_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts)
|
246
|
+
data
|
247
|
+
end
|
248
|
+
|
249
|
+
# 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)
|
254
|
+
# @param [Hash] opts the optional parameters
|
255
|
+
# @return [Array<(GroupAttachmentResponse, Integer, Hash)>] GroupAttachmentResponse data, response status code and response headers
|
256
|
+
def get_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
257
|
+
if @api_client.config.debugging
|
258
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.get_group_attachment ...'
|
259
|
+
end
|
260
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
261
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
262
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.get_group_attachment"
|
263
|
+
end
|
264
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
265
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
266
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.get_group_attachment"
|
267
|
+
end
|
268
|
+
# verify the required parameter 'group_id' is set
|
269
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
270
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_attachment"
|
271
|
+
end
|
272
|
+
# verify the required parameter 'attach_id' is set
|
273
|
+
if @api_client.config.client_side_validation && attach_id.nil?
|
274
|
+
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.get_group_attachment"
|
275
|
+
end
|
276
|
+
# 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)
|
278
|
+
|
279
|
+
# query parameters
|
280
|
+
query_params = opts[:query_params] || {}
|
281
|
+
|
282
|
+
# header parameters
|
283
|
+
header_params = opts[:header_params] || {}
|
284
|
+
# HTTP header 'Accept' (if needed)
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['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]
|
294
|
+
|
295
|
+
return_type = opts[:return_type] || 'GroupAttachmentResponse'
|
296
|
+
|
297
|
+
auth_names = opts[:auth_names] || ['api_key']
|
298
|
+
data, status_code, headers = @api_client.call_api(:GET, 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: GroupsApi#get_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
|
+
end
|
309
|
+
return data, status_code, headers
|
310
|
+
end
|
311
|
+
# 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
|
315
|
+
# @param [Hash] opts the optional parameters
|
316
|
+
# @return [InlineResponse200]
|
317
|
+
def get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
318
|
+
data, _status_code, _headers = get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
|
319
|
+
data
|
320
|
+
end
|
321
|
+
|
322
|
+
# 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
|
326
|
+
# @param [Hash] opts the optional parameters
|
327
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
328
|
+
def get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
329
|
+
if @api_client.config.debugging
|
330
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.get_group_attachments ...'
|
331
|
+
end
|
332
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
333
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
334
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.get_group_attachments"
|
335
|
+
end
|
336
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
337
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
338
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.get_group_attachments"
|
339
|
+
end
|
340
|
+
# verify the required parameter 'group_id' is set
|
341
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
342
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_attachments"
|
343
|
+
end
|
344
|
+
# resource path
|
345
|
+
local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', group_id.to_s)
|
346
|
+
|
347
|
+
# query parameters
|
348
|
+
query_params = opts[:query_params] || {}
|
349
|
+
|
350
|
+
# header parameters
|
351
|
+
header_params = opts[:header_params] || {}
|
352
|
+
# HTTP header 'Accept' (if needed)
|
353
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
354
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
355
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
356
|
+
|
357
|
+
# form parameters
|
358
|
+
form_params = opts[:form_params] || {}
|
359
|
+
|
360
|
+
# http body (model)
|
361
|
+
post_body = opts[:body]
|
362
|
+
|
363
|
+
return_type = opts[:return_type] || 'InlineResponse200'
|
364
|
+
|
365
|
+
auth_names = opts[:auth_names] || ['api_key']
|
366
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
367
|
+
:header_params => header_params,
|
368
|
+
:query_params => query_params,
|
369
|
+
:form_params => form_params,
|
370
|
+
:body => post_body,
|
371
|
+
:auth_names => auth_names,
|
372
|
+
:return_type => return_type)
|
373
|
+
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug "API called: GroupsApi#get_group_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
376
|
+
end
|
377
|
+
return data, status_code, headers
|
378
|
+
end
|
379
|
+
# upsert group, group context and group context owners info
|
380
|
+
# @param body
|
381
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
382
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
383
|
+
# @param group_id group_id
|
384
|
+
# @param [Hash] opts the optional parameters
|
385
|
+
# @return [AggregateGroup]
|
386
|
+
def groups_group_id_put(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
387
|
+
data, _status_code, _headers = groups_group_id_put_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
|
388
|
+
data
|
389
|
+
end
|
390
|
+
|
391
|
+
# upsert group, group context and group context owners info
|
392
|
+
# @param body
|
393
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
394
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
395
|
+
# @param group_id group_id
|
396
|
+
# @param [Hash] opts the optional parameters
|
397
|
+
# @return [Array<(AggregateGroup, Integer, Hash)>] AggregateGroup data, response status code and response headers
|
398
|
+
def groups_group_id_put_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
|
399
|
+
if @api_client.config.debugging
|
400
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.groups_group_id_put ...'
|
401
|
+
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
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
407
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
408
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.groups_group_id_put"
|
409
|
+
end
|
410
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
411
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
412
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.groups_group_id_put"
|
413
|
+
end
|
414
|
+
# verify the required parameter 'group_id' is set
|
415
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
416
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.groups_group_id_put"
|
417
|
+
end
|
418
|
+
# resource path
|
419
|
+
local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', group_id.to_s)
|
420
|
+
|
421
|
+
# query parameters
|
422
|
+
query_params = opts[:query_params] || {}
|
423
|
+
|
424
|
+
# header parameters
|
425
|
+
header_params = opts[:header_params] || {}
|
426
|
+
# HTTP header 'Accept' (if needed)
|
427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
428
|
+
# HTTP header 'Content-Type'
|
429
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['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] || @api_client.object_to_http_body(body)
|
438
|
+
|
439
|
+
return_type = opts[:return_type] || 'AggregateGroup'
|
440
|
+
|
441
|
+
auth_names = opts[:auth_names] || ['api_key']
|
442
|
+
data, status_code, headers = @api_client.call_api(:PUT, 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: GroupsApi#groups_group_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
452
|
+
end
|
453
|
+
return data, status_code, headers
|
454
|
+
end
|
455
|
+
# Patch a group attachment
|
456
|
+
# @param body
|
457
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
458
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
459
|
+
# @param group_id group_id
|
460
|
+
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
461
|
+
# @param [Hash] opts the optional parameters
|
462
|
+
# @return [GroupAttachmentResponse]
|
463
|
+
def update_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
464
|
+
data, _status_code, _headers = update_group_attachment_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts)
|
465
|
+
data
|
466
|
+
end
|
467
|
+
|
468
|
+
# Patch a group attachment
|
469
|
+
# @param body
|
470
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
471
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
472
|
+
# @param group_id group_id
|
473
|
+
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
474
|
+
# @param [Hash] opts the optional parameters
|
475
|
+
# @return [Array<(GroupAttachmentResponse, Integer, Hash)>] GroupAttachmentResponse data, response status code and response headers
|
476
|
+
def update_group_attachment_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
|
477
|
+
if @api_client.config.debugging
|
478
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.update_group_attachment ...'
|
479
|
+
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
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
485
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
486
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.update_group_attachment"
|
487
|
+
end
|
488
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
489
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
490
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.update_group_attachment"
|
491
|
+
end
|
492
|
+
# verify the required parameter 'group_id' is set
|
493
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
494
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.update_group_attachment"
|
495
|
+
end
|
496
|
+
# verify the required parameter 'attach_id' is set
|
497
|
+
if @api_client.config.client_side_validation && attach_id.nil?
|
498
|
+
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.update_group_attachment"
|
499
|
+
end
|
500
|
+
# 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)
|
502
|
+
|
503
|
+
# query parameters
|
504
|
+
query_params = opts[:query_params] || {}
|
505
|
+
|
506
|
+
# header parameters
|
507
|
+
header_params = opts[:header_params] || {}
|
508
|
+
# HTTP header 'Accept' (if needed)
|
509
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
510
|
+
# HTTP header 'Content-Type'
|
511
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
512
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
513
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
514
|
+
|
515
|
+
# form parameters
|
516
|
+
form_params = opts[:form_params] || {}
|
517
|
+
|
518
|
+
# http body (model)
|
519
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
520
|
+
|
521
|
+
return_type = opts[:return_type] || 'GroupAttachmentResponse'
|
522
|
+
|
523
|
+
auth_names = opts[:auth_names] || ['api_key']
|
524
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
525
|
+
:header_params => header_params,
|
526
|
+
:query_params => query_params,
|
527
|
+
:form_params => form_params,
|
528
|
+
:body => post_body,
|
529
|
+
:auth_names => auth_names,
|
530
|
+
:return_type => return_type)
|
531
|
+
|
532
|
+
if @api_client.config.debugging
|
533
|
+
@api_client.config.logger.debug "API called: GroupsApi#update_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
534
|
+
end
|
535
|
+
return data, status_code, headers
|
536
|
+
end
|
537
|
+
# Upload Submitted File
|
538
|
+
# @param body the attachment file
|
539
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
540
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
541
|
+
# @param content_disposition *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`
|
542
|
+
# @param group_id The Group ID (required to already exist)
|
543
|
+
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
544
|
+
# @param [Hash] opts the optional parameters
|
545
|
+
# @return [SuccessMessage]
|
546
|
+
def upload_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, content_disposition, group_id, attach_id, opts = {})
|
547
|
+
data, _status_code, _headers = upload_group_attachment_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, content_disposition, group_id, attach_id, opts)
|
548
|
+
data
|
549
|
+
end
|
550
|
+
|
551
|
+
# Upload Submitted File
|
552
|
+
# @param body the attachment file
|
553
|
+
# @param x_turnitin_integration_name a human readable string representing the type of integration being used
|
554
|
+
# @param x_turnitin_integration_version the version of the integration platform being used
|
555
|
+
# @param content_disposition *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`
|
556
|
+
# @param group_id The Group ID (required to already exist)
|
557
|
+
# @param attach_id The attachment ID (returned from a successful group attachment request)
|
558
|
+
# @param [Hash] opts the optional parameters
|
559
|
+
# @return [Array<(SuccessMessage, Integer, Hash)>] SuccessMessage data, response status code and response headers
|
560
|
+
def upload_group_attachment_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, content_disposition, group_id, attach_id, opts = {})
|
561
|
+
if @api_client.config.debugging
|
562
|
+
@api_client.config.logger.debug 'Calling API: GroupsApi.upload_group_attachment ...'
|
563
|
+
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
|
+
# verify the required parameter 'x_turnitin_integration_name' is set
|
569
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
|
570
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.upload_group_attachment"
|
571
|
+
end
|
572
|
+
# verify the required parameter 'x_turnitin_integration_version' is set
|
573
|
+
if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
|
574
|
+
fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.upload_group_attachment"
|
575
|
+
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
|
+
# verify the required parameter 'group_id' is set
|
581
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
582
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.upload_group_attachment"
|
583
|
+
end
|
584
|
+
# verify the required parameter 'attach_id' is set
|
585
|
+
if @api_client.config.client_side_validation && attach_id.nil?
|
586
|
+
fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.upload_group_attachment"
|
587
|
+
end
|
588
|
+
# 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)
|
590
|
+
|
591
|
+
# query parameters
|
592
|
+
query_params = opts[:query_params] || {}
|
593
|
+
|
594
|
+
# header parameters
|
595
|
+
header_params = opts[:header_params] || {}
|
596
|
+
# HTTP header 'Accept' (if needed)
|
597
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
598
|
+
# HTTP header 'Content-Type'
|
599
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['binary/octet-stream'])
|
600
|
+
header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
|
601
|
+
header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
|
602
|
+
header_params[:'Content-Disposition'] = content_disposition
|
603
|
+
|
604
|
+
# form parameters
|
605
|
+
form_params = opts[:form_params] || {}
|
606
|
+
|
607
|
+
# http body (model)
|
608
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
609
|
+
|
610
|
+
return_type = opts[:return_type] || 'SuccessMessage'
|
611
|
+
|
612
|
+
auth_names = opts[:auth_names] || ['api_key']
|
613
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
614
|
+
:header_params => header_params,
|
615
|
+
:query_params => query_params,
|
616
|
+
:form_params => form_params,
|
617
|
+
:body => post_body,
|
618
|
+
:auth_names => auth_names,
|
619
|
+
:return_type => return_type)
|
620
|
+
|
621
|
+
if @api_client.config.debugging
|
622
|
+
@api_client.config.logger.debug "API called: GroupsApi#upload_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
623
|
+
end
|
624
|
+
return data, status_code, headers
|
625
|
+
end
|
626
|
+
end
|
627
|
+
end
|