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,16 +3,21 @@
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
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class WebhookWithSecret
18
+ # a sercret used to sign all callbacks for this webhook
19
+ attr_accessor :signing_secret
20
+
16
21
  # a human readable description of the webhook
17
22
  attr_accessor :description
18
23
 
@@ -50,6 +55,7 @@ module TCAClient
50
55
  # Attribute mapping from ruby-style variable name to JSON key.
51
56
  def self.attribute_map
52
57
  {
58
+ :'signing_secret' => :'signing_secret',
53
59
  :'description' => :'description',
54
60
  :'url' => :'url',
55
61
  :'allow_insecure' => :'allow_insecure',
@@ -57,13 +63,19 @@ module TCAClient
57
63
  }
58
64
  end
59
65
 
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ attribute_map.values
69
+ end
70
+
60
71
  # Attribute type mapping.
61
72
  def self.openapi_types
62
73
  {
63
- :'description' => :'',
64
- :'url' => :'',
65
- :'allow_insecure' => :'',
66
- :'event_types' => :''
74
+ :'signing_secret' => :'File',
75
+ :'description' => :'String',
76
+ :'url' => :'String',
77
+ :'allow_insecure' => :'Boolean',
78
+ :'event_types' => :'Array<String>'
67
79
  }
68
80
  end
69
81
 
@@ -72,7 +84,15 @@ module TCAClient
72
84
  Set.new([
73
85
  ])
74
86
  end
75
-
87
+
88
+ # List of class defined in allOf (OpenAPI v3)
89
+ def self.openapi_all_of
90
+ [
91
+ :'WebhookBase',
92
+ :'WebhookWithSecretAllOf'
93
+ ]
94
+ end
95
+
76
96
  # Initializes the object
77
97
  # @param [Hash] attributes Model attributes in the form of hash
78
98
  def initialize(attributes = {})
@@ -88,6 +108,10 @@ module TCAClient
88
108
  h[k.to_sym] = v
89
109
  }
90
110
 
111
+ if attributes.key?(:'signing_secret')
112
+ self.signing_secret = attributes[:'signing_secret']
113
+ end
114
+
91
115
  if attributes.key?(:'description')
92
116
  self.description = attributes[:'description']
93
117
  end
@@ -111,6 +135,10 @@ module TCAClient
111
135
  # @return Array for valid properties with the reasons
112
136
  def list_invalid_properties
113
137
  invalid_properties = Array.new
138
+ if @signing_secret.nil?
139
+ invalid_properties.push('invalid value for "signing_secret", signing_secret cannot be nil.')
140
+ end
141
+
114
142
  if @url.nil?
115
143
  invalid_properties.push('invalid value for "url", url cannot be nil.')
116
144
  end
@@ -125,6 +153,7 @@ module TCAClient
125
153
  # Check to see if the all the properties in the model are valid
126
154
  # @return true if the model is valid
127
155
  def valid?
156
+ return false if @signing_secret.nil?
128
157
  return false if @url.nil?
129
158
  return false if @event_types.nil?
130
159
  true
@@ -135,6 +164,7 @@ module TCAClient
135
164
  def ==(o)
136
165
  return true if self.equal?(o)
137
166
  self.class == o.class &&
167
+ signing_secret == o.signing_secret &&
138
168
  description == o.description &&
139
169
  url == o.url &&
140
170
  allow_insecure == o.allow_insecure &&
@@ -150,7 +180,7 @@ module TCAClient
150
180
  # Calculates hash code according to all attributes.
151
181
  # @return [Integer] Hash code
152
182
  def hash
153
- [description, url, allow_insecure, event_types].hash
183
+ [signing_secret, description, url, allow_insecure, event_types].hash
154
184
  end
155
185
 
156
186
  # Builds the object from hash
@@ -165,8 +195,11 @@ module TCAClient
165
195
  # @return [Object] Returns the model itself
166
196
  def build_from_hash(attributes)
167
197
  return nil unless attributes.is_a?(Hash)
198
+ attributes = attributes.transform_keys(&:to_sym)
168
199
  self.class.openapi_types.each_pair do |key, type|
169
- if type =~ /\AArray<(.*)>/i
200
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
201
+ self.send("#{key}=", nil)
202
+ elsif type =~ /\AArray<(.*)>/i
170
203
  # check to ensure the input is an array given that the attribute
171
204
  # is documented as an array but the input is not
172
205
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -174,8 +207,6 @@ module TCAClient
174
207
  end
175
208
  elsif !attributes[self.class.attribute_map[key]].nil?
176
209
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
177
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
178
- self.send("#{key}=", nil)
179
210
  end
180
211
  end
181
212
 
@@ -188,8 +219,8 @@ module TCAClient
188
219
  # @return [Object] Deserialized data
189
220
  def _deserialize(type, value)
190
221
  case type.to_sym
191
- when :DateTime
192
- DateTime.parse(value)
222
+ when :Time
223
+ Time.parse(value)
193
224
  when :Date
194
225
  Date.parse(value)
195
226
  when :String
@@ -219,7 +250,9 @@ module TCAClient
219
250
  end
220
251
  end
221
252
  else # model
222
- TCAClient.const_get(type).build_from_hash(value)
253
+ # models (e.g. Pet) or oneOf
254
+ klass = TCAClient.const_get(type)
255
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
223
256
  end
224
257
  end
225
258
 
@@ -267,5 +300,8 @@ module TCAClient
267
300
  else
268
301
  value
269
302
  end
270
- end end
303
+ end
304
+
305
+ end
306
+
271
307
  end
@@ -0,0 +1,225 @@
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
+ 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
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TCAClient
17
+ class WebhookWithSecretAllOf
18
+ # a sercret used to sign all callbacks for this webhook
19
+ attr_accessor :signing_secret
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'signing_secret' => :'signing_secret'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'signing_secret' => :'File'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TCAClient::WebhookWithSecretAllOf` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TCAClient::WebhookWithSecretAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'signing_secret')
62
+ self.signing_secret = attributes[:'signing_secret']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ if @signing_secret.nil?
71
+ invalid_properties.push('invalid value for "signing_secret", signing_secret cannot be nil.')
72
+ end
73
+
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ return false if @signing_secret.nil?
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ signing_secret == o.signing_secret
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(o)
95
+ self == o
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ def hash
101
+ [signing_secret].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def self.build_from_hash(attributes)
108
+ new.build_from_hash(attributes)
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ attributes = attributes.transform_keys(&:to_sym)
117
+ self.class.openapi_types.each_pair do |key, type|
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :Time
141
+ Time.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ # models (e.g. Pet) or oneOf
172
+ klass = TCAClient.const_get(type)
173
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end
@@ -3,12 +3,13 @@
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
 
12
13
  module TCAClient
13
- VERSION = '1.0.0'
14
+ VERSION = '1.0.1'
14
15
  end
data/lib/tca_client.rb CHANGED
@@ -3,10 +3,11 @@
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
 
12
13
  # Common files
@@ -19,6 +20,7 @@ require 'tca_client/configuration'
19
20
  require 'tca_client/models/add_group_attachment_request'
20
21
  require 'tca_client/models/add_group_attachment_response'
21
22
  require 'tca_client/models/aggregate_group'
23
+ require 'tca_client/models/annotations_settings'
22
24
  require 'tca_client/models/author_metadata_override'
23
25
  require 'tca_client/models/error'
24
26
  require 'tca_client/models/eula'
@@ -31,19 +33,23 @@ require 'tca_client/models/features_similarity'
31
33
  require 'tca_client/models/features_similarity_view_settings'
32
34
  require 'tca_client/models/features_tenant'
33
35
  require 'tca_client/models/features_viewer_modes'
36
+ require 'tca_client/models/generate_similarity_pdf'
37
+ require 'tca_client/models/get_group_attachments200_response'
34
38
  require 'tca_client/models/group'
35
39
  require 'tca_client/models/group_attachment_response'
36
40
  require 'tca_client/models/group_context'
37
41
  require 'tca_client/models/index_state_settings'
38
42
  require 'tca_client/models/indexing_settings'
39
- require 'tca_client/models/inline_response_200'
43
+ require 'tca_client/models/pdf_status_webhook_request'
40
44
  require 'tca_client/models/pdf_status_response'
41
45
  require 'tca_client/models/rate_limit_error'
42
46
  require 'tca_client/models/request_pdf_response'
43
47
  require 'tca_client/models/sidebar'
48
+ require 'tca_client/models/similarity_complete_webhook_request'
44
49
  require 'tca_client/models/similarity_generation_settings'
45
50
  require 'tca_client/models/similarity_metadata'
46
- require 'tca_client/models/similarity_metadata_top_matches'
51
+ require 'tca_client/models/similarity_metadata_all_of'
52
+ require 'tca_client/models/similarity_metadata_all_of_top_matches'
47
53
  require 'tca_client/models/similarity_put_request'
48
54
  require 'tca_client/models/similarity_score_data'
49
55
  require 'tca_client/models/similarity_settings'
@@ -53,17 +59,24 @@ require 'tca_client/models/similarity_view_settings'
53
59
  require 'tca_client/models/similarity_viewer_url_response'
54
60
  require 'tca_client/models/similarity_viewer_url_settings'
55
61
  require 'tca_client/models/simple_submission_response'
62
+ require 'tca_client/models/simple_submission_response_all_of'
56
63
  require 'tca_client/models/submission'
64
+ require 'tca_client/models/submission_all_of'
57
65
  require 'tca_client/models/submission_base'
58
66
  require 'tca_client/models/submission_base_metadata'
67
+ require 'tca_client/models/submission_complete_webhook_request'
68
+ require 'tca_client/models/submission_complete_webhook_request_all_of'
69
+ require 'tca_client/models/submission_complete_webhook_request_all_of_metadata'
59
70
  require 'tca_client/models/submission_size_error'
60
71
  require 'tca_client/models/success_message'
61
72
  require 'tca_client/models/users'
62
73
  require 'tca_client/models/viewer_permissions'
63
74
  require 'tca_client/models/webhook'
75
+ require 'tca_client/models/webhook_all_of'
64
76
  require 'tca_client/models/webhook_base'
65
77
  require 'tca_client/models/webhook_path_request'
66
78
  require 'tca_client/models/webhook_with_secret'
79
+ require 'tca_client/models/webhook_with_secret_all_of'
67
80
 
68
81
  # APIs
69
82
  require 'tca_client/api/eula_api'
Binary file
data/tca_client.gemspec CHANGED
@@ -5,10 +5,11 @@
5
5
 
6
6
  #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
7
7
 
8
- OpenAPI spec version: 1.0.249
8
+ The version of the OpenAPI document: 1.0.258
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
9
12
 
10
- Generated by: https://github.com/swagger-api/swagger-codegen.git
11
- Swagger Codegen version: 3.0.35
12
13
  =end
13
14
 
14
15
  $:.push File.expand_path("../lib", __FILE__)
@@ -18,16 +19,15 @@ Gem::Specification.new do |s|
18
19
  s.name = "tca_client"
19
20
  s.version = TCAClient::VERSION
20
21
  s.platform = Gem::Platform::RUBY
21
- s.authors = ["Swagger-Codegen"]
22
+ s.authors = ["OpenAPI-Generator"]
22
23
  s.email = [""]
23
- s.homepage = "https://github.com/swagger-api/swagger-codegen"
24
+ s.homepage = "https://openapi-generator.tech"
24
25
  s.summary = "Turnitin Core API Ruby Gem"
25
26
  s.description = "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 "
26
27
  s.license = "Unlicense"
27
- s.required_ruby_version = ">= 1.9"
28
+ s.required_ruby_version = ">= 2.7"
28
29
 
29
30
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
30
- s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
31
31
 
32
32
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
33
33