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.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AddGroupAttachmentRequest.md +16 -4
  3. data/docs/AddGroupAttachmentResponse.md +14 -3
  4. data/docs/AggregateGroup.md +24 -8
  5. data/docs/AnnotationsSettings.md +18 -0
  6. data/docs/AuthorMetadataOverride.md +16 -4
  7. data/docs/EULAApi.md +166 -92
  8. data/docs/Error.md +16 -4
  9. data/docs/Eula.md +18 -5
  10. data/docs/EulaAcceptListItem.md +20 -6
  11. data/docs/EulaAcceptRequest.md +20 -6
  12. data/docs/EulaVersion.md +22 -7
  13. data/docs/FeaturesApi.md +41 -23
  14. data/docs/FeaturesEnabled.md +20 -6
  15. data/docs/FeaturesGenerationSettings.md +16 -4
  16. data/docs/FeaturesSimilarity.md +18 -5
  17. data/docs/FeaturesSimilarityViewSettings.md +38 -15
  18. data/docs/FeaturesTenant.md +14 -3
  19. data/docs/FeaturesViewerModes.md +16 -4
  20. data/docs/GenerateSimilarityPDF.md +18 -0
  21. data/docs/GetGroupAttachments200Response.md +18 -0
  22. data/docs/Group.md +18 -5
  23. data/docs/GroupAttachmentResponse.md +20 -6
  24. data/docs/GroupContext.md +18 -5
  25. data/docs/GroupsApi.md +321 -177
  26. data/docs/IndexApi.md +84 -44
  27. data/docs/IndexStateSettings.md +14 -3
  28. data/docs/IndexingSettings.md +14 -3
  29. data/docs/PDFStatusWebhookRequest.md +24 -0
  30. data/docs/PdfStatusResponse.md +14 -3
  31. data/docs/RateLimitError.md +16 -4
  32. data/docs/RequestPdfResponse.md +14 -3
  33. data/docs/Sidebar.md +14 -3
  34. data/docs/SimilarityApi.md +239 -129
  35. data/docs/SimilarityCompleteWebhookRequest.md +38 -0
  36. data/docs/SimilarityGenerationSettings.md +20 -6
  37. data/docs/SimilarityMetadata.md +32 -12
  38. data/docs/SimilarityMetadataAllOf.md +28 -0
  39. data/docs/SimilarityMetadataAllOfTopMatches.md +30 -0
  40. data/docs/SimilarityPutRequest.md +18 -5
  41. data/docs/SimilarityScoreData.md +20 -6
  42. data/docs/SimilaritySettings.md +18 -5
  43. data/docs/SimilaritySettingsModes.md +16 -4
  44. data/docs/SimilaritySettingsViewSettings.md +14 -3
  45. data/docs/SimilarityViewSettings.md +38 -15
  46. data/docs/SimilarityViewerUrlResponse.md +14 -3
  47. data/docs/SimilarityViewerUrlSettings.md +30 -10
  48. data/docs/SimpleSubmissionResponse.md +22 -2
  49. data/docs/SimpleSubmissionResponseAllOf.md +26 -0
  50. data/docs/Submission.md +34 -2
  51. data/docs/SubmissionAllOf.md +38 -0
  52. data/docs/SubmissionApi.md +202 -111
  53. data/docs/SubmissionBase.md +30 -11
  54. data/docs/SubmissionBaseMetadata.md +24 -8
  55. data/docs/SubmissionCompleteWebhookRequest.md +40 -0
  56. data/docs/SubmissionCompleteWebhookRequestAllOf.md +18 -0
  57. data/docs/SubmissionCompleteWebhookRequestAllOfMetadata.md +18 -0
  58. data/docs/SubmissionSizeError.md +16 -4
  59. data/docs/SuccessMessage.md +14 -3
  60. data/docs/Users.md +20 -6
  61. data/docs/ViewerPermissions.md +22 -7
  62. data/docs/Webhook.md +24 -6
  63. data/docs/WebhookAllOf.md +20 -0
  64. data/docs/WebhookApi.md +193 -103
  65. data/docs/WebhookBase.md +20 -6
  66. data/docs/WebhookPathRequest.md +16 -4
  67. data/docs/WebhookWithSecret.md +22 -6
  68. data/docs/WebhookWithSecretAllOf.md +18 -0
  69. data/lib/tca_client/api/eula_api.rb +96 -63
  70. data/lib/tca_client/api/features_api.rb +21 -12
  71. data/lib/tca_client/api/groups_api.rb +225 -155
  72. data/lib/tca_client/api/index_api.rb +46 -27
  73. data/lib/tca_client/api/similarity_api.rb +165 -104
  74. data/lib/tca_client/api/submission_api.rb +132 -89
  75. data/lib/tca_client/api/webhook_api.rb +120 -77
  76. data/lib/tca_client/api_client.rb +61 -57
  77. data/lib/tca_client/api_error.rb +4 -4
  78. data/lib/tca_client/configuration.rb +93 -13
  79. data/lib/tca_client/models/add_group_attachment_request.rb +50 -13
  80. data/lib/tca_client/models/add_group_attachment_response.rb +25 -12
  81. data/lib/tca_client/models/aggregate_group.rb +34 -21
  82. data/lib/tca_client/models/annotations_settings.rb +220 -0
  83. data/lib/tca_client/models/author_metadata_override.rb +26 -13
  84. data/lib/tca_client/models/error.rb +26 -13
  85. data/lib/tca_client/models/eula.rb +27 -14
  86. data/lib/tca_client/models/eula_accept_list_item.rb +28 -15
  87. data/lib/tca_client/models/eula_accept_request.rb +28 -15
  88. data/lib/tca_client/models/eula_version.rb +29 -16
  89. data/lib/tca_client/models/features_enabled.rb +28 -15
  90. data/lib/tca_client/models/features_generation_settings.rb +26 -13
  91. data/lib/tca_client/models/features_similarity.rb +27 -14
  92. data/lib/tca_client/models/features_similarity_view_settings.rb +37 -24
  93. data/lib/tca_client/models/features_tenant.rb +25 -12
  94. data/lib/tca_client/models/features_viewer_modes.rb +26 -13
  95. data/lib/tca_client/models/generate_similarity_pdf.rb +254 -0
  96. data/lib/tca_client/models/{inline_response_200.rb → get_group_attachments200_response.rb} +28 -15
  97. data/lib/tca_client/models/group.rb +29 -16
  98. data/lib/tca_client/models/group_attachment_response.rb +30 -17
  99. data/lib/tca_client/models/group_context.rb +27 -14
  100. data/lib/tca_client/models/index_state_settings.rb +25 -12
  101. data/lib/tca_client/models/indexing_settings.rb +25 -12
  102. data/lib/tca_client/models/pdf_status_response.rb +27 -14
  103. data/lib/tca_client/models/pdf_status_webhook_request.rb +283 -0
  104. data/lib/tca_client/models/rate_limit_error.rb +36 -20
  105. data/lib/tca_client/models/request_pdf_response.rb +25 -12
  106. data/lib/tca_client/models/sidebar.rb +27 -14
  107. data/lib/tca_client/models/similarity_complete_webhook_request.rb +366 -0
  108. data/lib/tca_client/models/similarity_generation_settings.rb +30 -17
  109. data/lib/tca_client/models/similarity_metadata.rb +45 -28
  110. data/lib/tca_client/models/similarity_metadata_all_of.rb +301 -0
  111. data/lib/tca_client/models/{similarity_metadata_top_matches.rb → similarity_metadata_all_of_top_matches.rb} +34 -21
  112. data/lib/tca_client/models/similarity_put_request.rb +27 -14
  113. data/lib/tca_client/models/similarity_score_data.rb +28 -15
  114. data/lib/tca_client/models/similarity_settings.rb +29 -16
  115. data/lib/tca_client/models/similarity_settings_modes.rb +26 -13
  116. data/lib/tca_client/models/similarity_settings_view_settings.rb +25 -12
  117. data/lib/tca_client/models/similarity_view_settings.rb +37 -24
  118. data/lib/tca_client/models/similarity_viewer_url_response.rb +25 -12
  119. data/lib/tca_client/models/similarity_viewer_url_settings.rb +46 -24
  120. data/lib/tca_client/models/simple_submission_response.rb +117 -13
  121. data/lib/tca_client/models/simple_submission_response_all_of.rb +294 -0
  122. data/lib/tca_client/models/submission.rb +191 -13
  123. data/lib/tca_client/models/submission_all_of.rb +368 -0
  124. data/lib/tca_client/models/submission_base.rb +82 -23
  125. data/lib/tca_client/models/submission_base_metadata.rb +30 -17
  126. data/lib/tca_client/models/submission_complete_webhook_request.rb +385 -0
  127. data/lib/tca_client/models/submission_complete_webhook_request_all_of.rb +219 -0
  128. data/lib/tca_client/models/submission_complete_webhook_request_all_of_metadata.rb +219 -0
  129. data/lib/tca_client/models/submission_size_error.rb +36 -20
  130. data/lib/tca_client/models/success_message.rb +25 -12
  131. data/lib/tca_client/models/users.rb +28 -15
  132. data/lib/tca_client/models/viewer_permissions.rb +29 -16
  133. data/lib/tca_client/models/webhook.rb +62 -16
  134. data/lib/tca_client/models/webhook_all_of.rb +235 -0
  135. data/lib/tca_client/models/webhook_base.rb +28 -15
  136. data/lib/tca_client/models/webhook_path_request.rb +26 -13
  137. data/lib/tca_client/models/webhook_with_secret.rb +52 -16
  138. data/lib/tca_client/models/webhook_with_secret_all_of.rb +225 -0
  139. data/lib/tca_client/version.rb +5 -4
  140. data/lib/tca_client.rb +18 -5
  141. data/tca_client-1.0.0.gem +0 -0
  142. data/tca_client.gemspec +7 -7
  143. metadata +34 -29
  144. data/docs/InlineResponse200.md +0 -7
  145. 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 spec version: 1.0.249
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 IndexApi
14
17
  attr_accessor :api_client
@@ -17,9 +20,9 @@ module TCAClient
17
20
  @api_client = api_client
18
21
  end
19
22
  # Return index state of submission
20
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
21
- # @param x_turnitin_integration_version the version of the integration platform being used
22
- # @param id The Submission ID (returned upon a successful POST to /submissions)
23
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
24
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
25
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
23
26
  # @param [Hash] opts the optional parameters
24
27
  # @return [IndexStateSettings]
25
28
  def get_index_status(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
@@ -28,9 +31,9 @@ module TCAClient
28
31
  end
29
32
 
30
33
  # Return index state of submission
31
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
32
- # @param x_turnitin_integration_version the version of the integration platform being used
33
- # @param id The Submission ID (returned upon a successful POST to /submissions)
34
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
35
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
36
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @return [Array<(IndexStateSettings, Integer, Hash)>] IndexStateSettings data, response status code and response headers
36
39
  def get_index_status_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
@@ -50,7 +53,7 @@ module TCAClient
50
53
  fail ArgumentError, "Missing the required parameter 'id' when calling IndexApi.get_index_status"
51
54
  end
52
55
  # resource path
53
- local_var_path = '/submissions/{id}/index'.sub('{' + 'id' + '}', id.to_s)
56
+ local_var_path = '/submissions/{id}/index'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
54
57
 
55
58
  # query parameters
56
59
  query_params = opts[:query_params] || {}
@@ -66,29 +69,37 @@ module TCAClient
66
69
  form_params = opts[:form_params] || {}
67
70
 
68
71
  # http body (model)
69
- post_body = opts[:body]
72
+ post_body = opts[:debug_body]
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'IndexStateSettings'
70
76
 
71
- return_type = opts[:return_type] || 'IndexStateSettings'
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['api_key']
72
79
 
73
- auth_names = opts[:auth_names] || ['api_key']
74
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
80
+ new_options = opts.merge(
81
+ :operation => :"IndexApi.get_index_status",
75
82
  :header_params => header_params,
76
83
  :query_params => query_params,
77
84
  :form_params => form_params,
78
85
  :body => post_body,
79
86
  :auth_names => auth_names,
80
- :return_type => return_type)
87
+ :return_type => return_type
88
+ )
81
89
 
90
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
82
91
  if @api_client.config.debugging
83
92
  @api_client.config.logger.debug "API called: IndexApi#get_index_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
93
  end
85
94
  return data, status_code, headers
86
95
  end
96
+
87
97
  # Index and return index state of submission
88
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
89
- # @param x_turnitin_integration_version the version of the integration platform being used
90
- # @param id The Submission ID (returned upon a successful POST to /submissions)
98
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
99
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
100
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
91
101
  # @param [Hash] opts the optional parameters
102
+ # @option opts [Boolean] :asynchronous asynchronous request
92
103
  # @return [IndexStateSettings]
93
104
  def index_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
94
105
  data, _status_code, _headers = index_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
@@ -96,10 +107,11 @@ module TCAClient
96
107
  end
97
108
 
98
109
  # Index and return index state of submission
99
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
100
- # @param x_turnitin_integration_version the version of the integration platform being used
101
- # @param id The Submission ID (returned upon a successful POST to /submissions)
110
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
111
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
112
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
102
113
  # @param [Hash] opts the optional parameters
114
+ # @option opts [Boolean] :asynchronous asynchronous request
103
115
  # @return [Array<(IndexStateSettings, Integer, Hash)>] IndexStateSettings data, response status code and response headers
104
116
  def index_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
105
117
  if @api_client.config.debugging
@@ -118,10 +130,11 @@ module TCAClient
118
130
  fail ArgumentError, "Missing the required parameter 'id' when calling IndexApi.index_submission"
119
131
  end
120
132
  # resource path
121
- local_var_path = '/submissions/{id}/index'.sub('{' + 'id' + '}', id.to_s)
133
+ local_var_path = '/submissions/{id}/index'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
122
134
 
123
135
  # query parameters
124
136
  query_params = opts[:query_params] || {}
137
+ query_params[:'asynchronous'] = opts[:'asynchronous'] if !opts[:'asynchronous'].nil?
125
138
 
126
139
  # header parameters
127
140
  header_params = opts[:header_params] || {}
@@ -134,19 +147,25 @@ module TCAClient
134
147
  form_params = opts[:form_params] || {}
135
148
 
136
149
  # http body (model)
137
- post_body = opts[:body]
150
+ post_body = opts[:debug_body]
151
+
152
+ # return_type
153
+ return_type = opts[:debug_return_type] || 'IndexStateSettings'
138
154
 
139
- return_type = opts[:return_type] || 'IndexStateSettings'
155
+ # auth_names
156
+ auth_names = opts[:debug_auth_names] || ['api_key']
140
157
 
141
- auth_names = opts[:auth_names] || ['api_key']
142
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
158
+ new_options = opts.merge(
159
+ :operation => :"IndexApi.index_submission",
143
160
  :header_params => header_params,
144
161
  :query_params => query_params,
145
162
  :form_params => form_params,
146
163
  :body => post_body,
147
164
  :auth_names => auth_names,
148
- :return_type => return_type)
165
+ :return_type => return_type
166
+ )
149
167
 
168
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
150
169
  if @api_client.config.debugging
151
170
  @api_client.config.logger.debug "API called: IndexApi#index_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
171
  end