moderation_api 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +87 -0
- data/README.md +61 -106
- data/docs/AccountApi.md +5 -5
- data/docs/AccountGet200Response.md +2 -2
- data/docs/AccountGet200ResponseCurrentProject.md +2 -2
- data/docs/ActionsCreateRequest.md +2 -2
- data/docs/ActionsCreateRequestWebhooksInner.md +2 -2
- data/docs/ActionsDelete200Response.md +2 -2
- data/docs/ActionsExecute200Response.md +2 -2
- data/docs/ActionsExecuteDeprecatedRequest.md +2 -2
- data/docs/ActionsExecuteRequest.md +2 -2
- data/docs/ActionsGet200Response.md +2 -2
- data/docs/ActionsGet200ResponseWebhooksInner.md +2 -2
- data/docs/ActionsList200ResponseInner.md +2 -2
- data/docs/ActionsList200ResponseInnerPossibleValuesInner.md +2 -2
- data/docs/ActionsList400Response.md +2 -2
- data/docs/ActionsList400ResponseIssuesInner.md +2 -2
- data/docs/ActionsUpdateRequest.md +2 -2
- data/docs/ModerateApi.md +26 -26
- data/docs/ModerationAudioRequest.md +2 -2
- data/docs/ModerationImage200Response.md +2 -2
- data/docs/ModerationImage200ResponseLabelsInner.md +2 -2
- data/docs/ModerationImageRequest.md +2 -2
- data/docs/ModerationObject200Response.md +2 -2
- data/docs/ModerationObject200ResponseAllOfEntitiesInner.md +2 -2
- data/docs/ModerationObject200ResponseAllOfFieldsInner.md +2 -2
- data/docs/ModerationObject200ResponseAllOfLabelsInner.md +2 -2
- data/docs/ModerationObjectRequest.md +2 -2
- data/docs/ModerationObjectRequestValue.md +2 -2
- data/docs/ModerationObjectRequestValueDataValue.md +2 -2
- data/docs/ModerationText200Response.md +2 -2
- data/docs/ModerationText200ResponseAllOfAddress.md +2 -2
- data/docs/ModerationText200ResponseAllOfEmail.md +2 -2
- data/docs/ModerationText200ResponseAllOfName.md +2 -2
- data/docs/ModerationText200ResponseAllOfNsfw.md +2 -2
- data/docs/ModerationText200ResponseAllOfNsfwLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfPhone.md +2 -2
- data/docs/ModerationText200ResponseAllOfProfanity.md +2 -2
- data/docs/ModerationText200ResponseAllOfPropriety.md +2 -2
- data/docs/ModerationText200ResponseAllOfProprietyLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfQuality.md +2 -2
- data/docs/ModerationText200ResponseAllOfQualityLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfRequest.md +2 -2
- data/docs/ModerationText200ResponseAllOfSensitive.md +2 -2
- data/docs/ModerationText200ResponseAllOfSentiment.md +2 -2
- data/docs/ModerationText200ResponseAllOfSentimentLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfToxicity.md +2 -2
- data/docs/ModerationText200ResponseAllOfToxicityLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfUrl.md +2 -2
- data/docs/ModerationText200ResponseAllOfUsername.md +2 -2
- data/docs/ModerationText200ResponseAllOfWordlist.md +2 -2
- data/docs/ModerationText200ResponseAllOfWordlistsInner.md +2 -2
- data/docs/ModerationTextRequest.md +2 -2
- data/docs/ModerationVideo200Response.md +2 -2
- data/docs/ModerationVideoRequest.md +2 -2
- data/docs/QueueActionsApi.md +33 -33
- data/lib/moderation_api/api/account_api.rb +1 -1
- data/lib/moderation_api/api/moderate_api.rb +1 -1
- data/lib/moderation_api/api/queue_actions_api.rb +1 -1
- data/lib/moderation_api/api_client.rb +2 -2
- data/lib/moderation_api/api_error.rb +1 -1
- data/lib/moderation_api/configuration.rb +1 -1
- data/lib/moderation_api/models/account_get200_response.rb +4 -4
- data/lib/moderation_api/models/account_get200_response_current_project.rb +4 -4
- data/lib/moderation_api/models/actions_create_request.rb +4 -4
- data/lib/moderation_api/models/actions_create_request_webhooks_inner.rb +4 -4
- data/lib/moderation_api/models/actions_delete200_response.rb +4 -4
- data/lib/moderation_api/models/actions_execute200_response.rb +4 -4
- data/lib/moderation_api/models/actions_execute_deprecated_request.rb +4 -4
- data/lib/moderation_api/models/actions_execute_request.rb +4 -4
- data/lib/moderation_api/models/actions_get200_response.rb +4 -4
- data/lib/moderation_api/models/actions_get200_response_webhooks_inner.rb +4 -4
- data/lib/moderation_api/models/actions_list200_response_inner.rb +4 -4
- data/lib/moderation_api/models/actions_list200_response_inner_possible_values_inner.rb +4 -4
- data/lib/moderation_api/models/actions_list400_response.rb +4 -4
- data/lib/moderation_api/models/actions_list400_response_issues_inner.rb +4 -4
- data/lib/moderation_api/models/actions_update_request.rb +4 -4
- data/lib/moderation_api/models/moderation_audio_request.rb +4 -4
- data/lib/moderation_api/models/moderation_image200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_image200_response_labels_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_image_request.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response_all_of_entities_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response_all_of_fields_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response_all_of_labels_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_object_request.rb +4 -4
- data/lib/moderation_api/models/moderation_object_request_value.rb +4 -4
- data/lib/moderation_api/models/moderation_object_request_value_data_value.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_address.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_email.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_name.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_phone.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_profanity.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_request.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_sensitive.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_url.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_username.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlist.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlists_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_text_request.rb +4 -4
- data/lib/moderation_api/models/moderation_video200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_video_request.rb +4 -4
- data/lib/moderation_api/version.rb +2 -2
- data/lib/moderation_api/webhook.rb +41 -0
- data/lib/moderation_api.rb +56 -56
- data/moderation_api-1.2.0.gem +0 -0
- data/moderation_api-1.2.1.gem +0 -0
- data/moderation_api.gemspec +3 -3
- data/ruby_config.yaml +30 -0
- data/spec/api/account_api_spec.rb +3 -3
- data/spec/api/moderate_api_spec.rb +3 -3
- data/spec/api/queue_actions_api_spec.rb +3 -3
- data/spec/models/account_get200_response_current_project_spec.rb +4 -4
- data/spec/models/account_get200_response_spec.rb +4 -4
- data/spec/models/actions_create_request_spec.rb +4 -4
- data/spec/models/actions_create_request_webhooks_inner_spec.rb +4 -4
- data/spec/models/actions_delete200_response_spec.rb +4 -4
- data/spec/models/actions_execute200_response_spec.rb +4 -4
- data/spec/models/actions_execute_deprecated_request_spec.rb +4 -4
- data/spec/models/actions_execute_request_spec.rb +4 -4
- data/spec/models/actions_get200_response_spec.rb +4 -4
- data/spec/models/actions_get200_response_webhooks_inner_spec.rb +4 -4
- data/spec/models/actions_list200_response_inner_possible_values_inner_spec.rb +4 -4
- data/spec/models/actions_list200_response_inner_spec.rb +4 -4
- data/spec/models/actions_list400_response_issues_inner_spec.rb +4 -4
- data/spec/models/actions_list400_response_spec.rb +4 -4
- data/spec/models/actions_update_request_spec.rb +4 -4
- data/spec/models/moderation_audio_request_spec.rb +4 -4
- data/spec/models/moderation_image200_response_labels_inner_spec.rb +4 -4
- data/spec/models/moderation_image200_response_spec.rb +4 -4
- data/spec/models/moderation_image_request_spec.rb +4 -4
- data/spec/models/moderation_object200_response_all_of_entities_inner_spec.rb +4 -4
- data/spec/models/moderation_object200_response_all_of_fields_inner_spec.rb +4 -4
- data/spec/models/moderation_object200_response_all_of_labels_inner_spec.rb +4 -4
- data/spec/models/moderation_object200_response_spec.rb +4 -4
- data/spec/models/moderation_object_request_spec.rb +4 -4
- data/spec/models/moderation_object_request_value_data_value_spec.rb +4 -4
- data/spec/models/moderation_object_request_value_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_address_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_email_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_name_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_nsfw_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_nsfw_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_phone_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_profanity_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_propriety_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_propriety_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_quality_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_quality_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_request_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_sensitive_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_sentiment_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_sentiment_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_toxicity_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_toxicity_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_url_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_username_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_wordlist_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_wordlists_inner_spec.rb +4 -4
- data/spec/models/moderation_text200_response_spec.rb +4 -4
- data/spec/models/moderation_text_request_spec.rb +4 -4
- data/spec/models/moderation_video200_response_spec.rb +4 -4
- data/spec/models/moderation_video_request_spec.rb +4 -4
- metadata +9 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# ModerationApi::ModerationText200ResponseAllOfWordlistsInner
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
```ruby
|
21
21
|
require 'moderation_api'
|
22
22
|
|
23
|
-
instance =
|
23
|
+
instance = ModerationApi::ModerationText200ResponseAllOfWordlistsInner.new(
|
24
24
|
mode: null,
|
25
25
|
flagged: null,
|
26
26
|
name: null,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# ModerationApi::ModerationTextRequest
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
```ruby
|
17
17
|
require 'moderation_api'
|
18
18
|
|
19
|
-
instance =
|
19
|
+
instance = ModerationApi::ModerationTextRequest.new(
|
20
20
|
value: null,
|
21
21
|
content_id: null,
|
22
22
|
do_not_store: null,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# ModerationApi::ModerationVideo200Response
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
```ruby
|
15
15
|
require 'moderation_api'
|
16
16
|
|
17
|
-
instance =
|
17
|
+
instance = ModerationApi::ModerationVideo200Response.new(
|
18
18
|
status: null,
|
19
19
|
request: null,
|
20
20
|
flagged: null,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# ModerationApi::ModerationVideoRequest
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
```ruby
|
17
17
|
require 'moderation_api'
|
18
18
|
|
19
|
-
instance =
|
19
|
+
instance = ModerationApi::ModerationVideoRequest.new(
|
20
20
|
url: null,
|
21
21
|
content_id: null,
|
22
22
|
do_not_store: null,
|
data/docs/QueueActionsApi.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# ModerationApi::QueueActionsApi
|
2
2
|
|
3
3
|
All URIs are relative to *https://moderationapi.com/api/v1*
|
4
4
|
|
@@ -27,19 +27,19 @@ Create an action.
|
|
27
27
|
require 'time'
|
28
28
|
require 'moderation_api'
|
29
29
|
# setup authorization
|
30
|
-
|
30
|
+
ModerationApi.configure do |config|
|
31
31
|
# Configure Bearer authorization: Authorization
|
32
32
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
33
33
|
end
|
34
34
|
|
35
|
-
api_instance =
|
36
|
-
actions_create_request =
|
35
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
36
|
+
actions_create_request = ModerationApi::ActionsCreateRequest.new({name: 'name_example'}) # ActionsCreateRequest |
|
37
37
|
|
38
38
|
begin
|
39
39
|
# Create an action
|
40
40
|
result = api_instance.actions_create(actions_create_request)
|
41
41
|
p result
|
42
|
-
rescue
|
42
|
+
rescue ModerationApi::ApiError => e
|
43
43
|
puts "Error when calling QueueActionsApi->actions_create: #{e}"
|
44
44
|
end
|
45
45
|
```
|
@@ -57,7 +57,7 @@ begin
|
|
57
57
|
p status_code # => 2xx
|
58
58
|
p headers # => { ... }
|
59
59
|
p data # => <ActionsList200ResponseInner>
|
60
|
-
rescue
|
60
|
+
rescue ModerationApi::ApiError => e
|
61
61
|
puts "Error when calling QueueActionsApi->actions_create_with_http_info: #{e}"
|
62
62
|
end
|
63
63
|
```
|
@@ -96,19 +96,19 @@ Delete an action and all of its webhooks.
|
|
96
96
|
require 'time'
|
97
97
|
require 'moderation_api'
|
98
98
|
# setup authorization
|
99
|
-
|
99
|
+
ModerationApi.configure do |config|
|
100
100
|
# Configure Bearer authorization: Authorization
|
101
101
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
102
102
|
end
|
103
103
|
|
104
|
-
api_instance =
|
104
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
105
105
|
id = '60c9e1c0e4e7e1001c7a0e1d' # String | The ID of the action to delete.
|
106
106
|
|
107
107
|
begin
|
108
108
|
# Delete an action
|
109
109
|
result = api_instance.actions_delete(id)
|
110
110
|
p result
|
111
|
-
rescue
|
111
|
+
rescue ModerationApi::ApiError => e
|
112
112
|
puts "Error when calling QueueActionsApi->actions_delete: #{e}"
|
113
113
|
end
|
114
114
|
```
|
@@ -126,7 +126,7 @@ begin
|
|
126
126
|
p status_code # => 2xx
|
127
127
|
p headers # => { ... }
|
128
128
|
p data # => <ActionsDelete200Response>
|
129
|
-
rescue
|
129
|
+
rescue ModerationApi::ApiError => e
|
130
130
|
puts "Error when calling QueueActionsApi->actions_delete_with_http_info: #{e}"
|
131
131
|
end
|
132
132
|
```
|
@@ -165,19 +165,19 @@ Execute an action on a set of content items in a queue.
|
|
165
165
|
require 'time'
|
166
166
|
require 'moderation_api'
|
167
167
|
# setup authorization
|
168
|
-
|
168
|
+
ModerationApi.configure do |config|
|
169
169
|
# Configure Bearer authorization: Authorization
|
170
170
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
171
171
|
end
|
172
172
|
|
173
|
-
api_instance =
|
174
|
-
actions_execute_request =
|
173
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
174
|
+
actions_execute_request = ModerationApi::ActionsExecuteRequest.new({content_ids: ['content_ids_example'], action_id: 'action_id_example'}) # ActionsExecuteRequest |
|
175
175
|
|
176
176
|
begin
|
177
177
|
# Execute an action
|
178
178
|
result = api_instance.actions_execute(actions_execute_request)
|
179
179
|
p result
|
180
|
-
rescue
|
180
|
+
rescue ModerationApi::ApiError => e
|
181
181
|
puts "Error when calling QueueActionsApi->actions_execute: #{e}"
|
182
182
|
end
|
183
183
|
```
|
@@ -195,7 +195,7 @@ begin
|
|
195
195
|
p status_code # => 2xx
|
196
196
|
p headers # => { ... }
|
197
197
|
p data # => <ActionsExecute200Response>
|
198
|
-
rescue
|
198
|
+
rescue ModerationApi::ApiError => e
|
199
199
|
puts "Error when calling QueueActionsApi->actions_execute_with_http_info: #{e}"
|
200
200
|
end
|
201
201
|
```
|
@@ -234,20 +234,20 @@ Execute an action on a set of content items in a queue.
|
|
234
234
|
require 'time'
|
235
235
|
require 'moderation_api'
|
236
236
|
# setup authorization
|
237
|
-
|
237
|
+
ModerationApi.configure do |config|
|
238
238
|
# Configure Bearer authorization: Authorization
|
239
239
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
240
240
|
end
|
241
241
|
|
242
|
-
api_instance =
|
242
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
243
243
|
action_id = 'action_id_example' # String | The ID or key of the action to execute.
|
244
|
-
actions_execute_deprecated_request =
|
244
|
+
actions_execute_deprecated_request = ModerationApi::ActionsExecuteDeprecatedRequest.new({content_ids: ['content_ids_example']}) # ActionsExecuteDeprecatedRequest |
|
245
245
|
|
246
246
|
begin
|
247
247
|
# Execute an action
|
248
248
|
result = api_instance.actions_execute_deprecated(action_id, actions_execute_deprecated_request)
|
249
249
|
p result
|
250
|
-
rescue
|
250
|
+
rescue ModerationApi::ApiError => e
|
251
251
|
puts "Error when calling QueueActionsApi->actions_execute_deprecated: #{e}"
|
252
252
|
end
|
253
253
|
```
|
@@ -265,7 +265,7 @@ begin
|
|
265
265
|
p status_code # => 2xx
|
266
266
|
p headers # => { ... }
|
267
267
|
p data # => <ActionsExecute200Response>
|
268
|
-
rescue
|
268
|
+
rescue ModerationApi::ApiError => e
|
269
269
|
puts "Error when calling QueueActionsApi->actions_execute_deprecated_with_http_info: #{e}"
|
270
270
|
end
|
271
271
|
```
|
@@ -305,19 +305,19 @@ Get an action by ID.
|
|
305
305
|
require 'time'
|
306
306
|
require 'moderation_api'
|
307
307
|
# setup authorization
|
308
|
-
|
308
|
+
ModerationApi.configure do |config|
|
309
309
|
# Configure Bearer authorization: Authorization
|
310
310
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
311
311
|
end
|
312
312
|
|
313
|
-
api_instance =
|
313
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
314
314
|
id = '60c9e1c0e4e7e1001c7a0e1d' # String | The ID of the action to get.
|
315
315
|
|
316
316
|
begin
|
317
317
|
# Get an action
|
318
318
|
result = api_instance.actions_get(id)
|
319
319
|
p result
|
320
|
-
rescue
|
320
|
+
rescue ModerationApi::ApiError => e
|
321
321
|
puts "Error when calling QueueActionsApi->actions_get: #{e}"
|
322
322
|
end
|
323
323
|
```
|
@@ -335,7 +335,7 @@ begin
|
|
335
335
|
p status_code # => 2xx
|
336
336
|
p headers # => { ... }
|
337
337
|
p data # => <ActionsGet200Response>
|
338
|
-
rescue
|
338
|
+
rescue ModerationApi::ApiError => e
|
339
339
|
puts "Error when calling QueueActionsApi->actions_get_with_http_info: #{e}"
|
340
340
|
end
|
341
341
|
```
|
@@ -374,12 +374,12 @@ List actions for the current user.
|
|
374
374
|
require 'time'
|
375
375
|
require 'moderation_api'
|
376
376
|
# setup authorization
|
377
|
-
|
377
|
+
ModerationApi.configure do |config|
|
378
378
|
# Configure Bearer authorization: Authorization
|
379
379
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
380
380
|
end
|
381
381
|
|
382
|
-
api_instance =
|
382
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
383
383
|
opts = {
|
384
384
|
queue_id: '60c9e1c0e4e7e1001c7a0e1d' # String | Only return actions available in this queue.
|
385
385
|
}
|
@@ -388,7 +388,7 @@ begin
|
|
388
388
|
# List actions
|
389
389
|
result = api_instance.actions_list(opts)
|
390
390
|
p result
|
391
|
-
rescue
|
391
|
+
rescue ModerationApi::ApiError => e
|
392
392
|
puts "Error when calling QueueActionsApi->actions_list: #{e}"
|
393
393
|
end
|
394
394
|
```
|
@@ -406,7 +406,7 @@ begin
|
|
406
406
|
p status_code # => 2xx
|
407
407
|
p headers # => { ... }
|
408
408
|
p data # => <Array<ActionsList200ResponseInner>>
|
409
|
-
rescue
|
409
|
+
rescue ModerationApi::ApiError => e
|
410
410
|
puts "Error when calling QueueActionsApi->actions_list_with_http_info: #{e}"
|
411
411
|
end
|
412
412
|
```
|
@@ -445,20 +445,20 @@ Update an action.
|
|
445
445
|
require 'time'
|
446
446
|
require 'moderation_api'
|
447
447
|
# setup authorization
|
448
|
-
|
448
|
+
ModerationApi.configure do |config|
|
449
449
|
# Configure Bearer authorization: Authorization
|
450
450
|
config.access_token = 'YOUR_BEARER_TOKEN'
|
451
451
|
end
|
452
452
|
|
453
|
-
api_instance =
|
453
|
+
api_instance = ModerationApi::QueueActionsApi.new
|
454
454
|
id = '60c9e1c0e4e7e1001c7a0e1d' # String | The ID of the action to update.
|
455
|
-
actions_update_request =
|
455
|
+
actions_update_request = ModerationApi::ActionsUpdateRequest.new # ActionsUpdateRequest |
|
456
456
|
|
457
457
|
begin
|
458
458
|
# Update an action
|
459
459
|
result = api_instance.actions_update(id, actions_update_request)
|
460
460
|
p result
|
461
|
-
rescue
|
461
|
+
rescue ModerationApi::ApiError => e
|
462
462
|
puts "Error when calling QueueActionsApi->actions_update: #{e}"
|
463
463
|
end
|
464
464
|
```
|
@@ -476,7 +476,7 @@ begin
|
|
476
476
|
p status_code # => 2xx
|
477
477
|
p headers # => { ... }
|
478
478
|
p data # => <ActionsList200ResponseInner>
|
479
|
-
rescue
|
479
|
+
rescue ModerationApi::ApiError => e
|
480
480
|
puts "Error when calling QueueActionsApi->actions_update_with_http_info: #{e}"
|
481
481
|
end
|
482
482
|
```
|
@@ -20,7 +20,7 @@ require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Versio
|
|
20
20
|
require 'marcel'
|
21
21
|
|
22
22
|
|
23
|
-
module
|
23
|
+
module ModerationApi
|
24
24
|
class ApiClient
|
25
25
|
# The Configuration object holding settings to be used in the API client.
|
26
26
|
attr_accessor :config
|
@@ -323,7 +323,7 @@ module ModerationAPI
|
|
323
323
|
end
|
324
324
|
else
|
325
325
|
# models (e.g. Pet) or oneOf
|
326
|
-
klass =
|
326
|
+
klass = ModerationApi.const_get(return_type)
|
327
327
|
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
328
328
|
end
|
329
329
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class AccountGet200Response
|
18
18
|
attr_accessor :id
|
19
19
|
|
@@ -62,13 +62,13 @@ module ModerationAPI
|
|
62
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
63
|
def initialize(attributes = {})
|
64
64
|
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::AccountGet200Response` initialize method"
|
66
66
|
end
|
67
67
|
|
68
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
69
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::AccountGet200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
72
|
end
|
73
73
|
h[k.to_sym] = v
|
74
74
|
}
|
@@ -222,7 +222,7 @@ module ModerationAPI
|
|
222
222
|
end
|
223
223
|
else # model
|
224
224
|
# models (e.g. Pet) or oneOf
|
225
|
-
klass =
|
225
|
+
klass = ModerationApi.const_get(type)
|
226
226
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
227
227
|
end
|
228
228
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class AccountGet200ResponseCurrentProject
|
18
18
|
attr_accessor :id
|
19
19
|
|
@@ -50,13 +50,13 @@ module ModerationAPI
|
|
50
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
51
|
def initialize(attributes = {})
|
52
52
|
if (!attributes.is_a?(Hash))
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::AccountGet200ResponseCurrentProject` initialize method"
|
54
54
|
end
|
55
55
|
|
56
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::AccountGet200ResponseCurrentProject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
60
|
end
|
61
61
|
h[k.to_sym] = v
|
62
62
|
}
|
@@ -181,7 +181,7 @@ module ModerationAPI
|
|
181
181
|
end
|
182
182
|
else # model
|
183
183
|
# models (e.g. Pet) or oneOf
|
184
|
-
klass =
|
184
|
+
klass = ModerationApi.const_get(type)
|
185
185
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
186
|
end
|
187
187
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ActionsCreateRequest
|
18
18
|
# The name of the action.
|
19
19
|
attr_accessor :name
|
@@ -116,13 +116,13 @@ module ModerationAPI
|
|
116
116
|
# @param [Hash] attributes Model attributes in the form of hash
|
117
117
|
def initialize(attributes = {})
|
118
118
|
if (!attributes.is_a?(Hash))
|
119
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
119
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ActionsCreateRequest` initialize method"
|
120
120
|
end
|
121
121
|
|
122
122
|
# check to see if the attribute exists and convert string to symbol for hash key
|
123
123
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
124
124
|
if (!self.class.attribute_map.key?(k.to_sym))
|
125
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
125
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ActionsCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
126
126
|
end
|
127
127
|
h[k.to_sym] = v
|
128
128
|
}
|
@@ -318,7 +318,7 @@ module ModerationAPI
|
|
318
318
|
end
|
319
319
|
else # model
|
320
320
|
# models (e.g. Pet) or oneOf
|
321
|
-
klass =
|
321
|
+
klass = ModerationApi.const_get(type)
|
322
322
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
323
323
|
end
|
324
324
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ActionsCreateRequestWebhooksInner
|
18
18
|
# The webhook's name, used to identify it in the dashboard
|
19
19
|
attr_accessor :name
|
@@ -63,13 +63,13 @@ module ModerationAPI
|
|
63
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
64
64
|
def initialize(attributes = {})
|
65
65
|
if (!attributes.is_a?(Hash))
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ActionsCreateRequestWebhooksInner` initialize method"
|
67
67
|
end
|
68
68
|
|
69
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
70
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
71
|
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ActionsCreateRequestWebhooksInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
73
|
end
|
74
74
|
h[k.to_sym] = v
|
75
75
|
}
|
@@ -204,7 +204,7 @@ module ModerationAPI
|
|
204
204
|
end
|
205
205
|
else # model
|
206
206
|
# models (e.g. Pet) or oneOf
|
207
|
-
klass =
|
207
|
+
klass = ModerationApi.const_get(type)
|
208
208
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
209
|
end
|
210
210
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ActionsDelete200Response
|
18
18
|
# Whether the action was deleted.
|
19
19
|
attr_accessor :deleted
|
@@ -52,13 +52,13 @@ module ModerationAPI
|
|
52
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
53
53
|
def initialize(attributes = {})
|
54
54
|
if (!attributes.is_a?(Hash))
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ActionsDelete200Response` initialize method"
|
56
56
|
end
|
57
57
|
|
58
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
59
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
60
|
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ActionsDelete200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
62
|
end
|
63
63
|
h[k.to_sym] = v
|
64
64
|
}
|
@@ -183,7 +183,7 @@ module ModerationAPI
|
|
183
183
|
end
|
184
184
|
else # model
|
185
185
|
# models (e.g. Pet) or oneOf
|
186
|
-
klass =
|
186
|
+
klass = ModerationApi.const_get(type)
|
187
187
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
188
|
end
|
189
189
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ActionsExecute200Response
|
18
18
|
# Action executed successfully.
|
19
19
|
attr_accessor :success
|
@@ -57,13 +57,13 @@ module ModerationAPI
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ActionsExecute200Response` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ActionsExecute200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|
@@ -202,7 +202,7 @@ module ModerationAPI
|
|
202
202
|
end
|
203
203
|
else # model
|
204
204
|
# models (e.g. Pet) or oneOf
|
205
|
-
klass =
|
205
|
+
klass = ModerationApi.const_get(type)
|
206
206
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
207
|
end
|
208
208
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ActionsExecuteDeprecatedRequest
|
18
18
|
# The IDs of the content items to perform the action on.
|
19
19
|
attr_accessor :content_ids
|
@@ -57,13 +57,13 @@ module ModerationAPI
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ActionsExecuteDeprecatedRequest` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ActionsExecuteDeprecatedRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|
@@ -188,7 +188,7 @@ module ModerationAPI
|
|
188
188
|
end
|
189
189
|
else # model
|
190
190
|
# models (e.g. Pet) or oneOf
|
191
|
-
klass =
|
191
|
+
klass = ModerationApi.const_get(type)
|
192
192
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
193
|
end
|
194
194
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ActionsExecuteRequest
|
18
18
|
# The IDs of the content items to perform the action on.
|
19
19
|
attr_accessor :content_ids
|
@@ -62,13 +62,13 @@ module ModerationAPI
|
|
62
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
63
|
def initialize(attributes = {})
|
64
64
|
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ActionsExecuteRequest` initialize method"
|
66
66
|
end
|
67
67
|
|
68
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
69
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ActionsExecuteRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
72
|
end
|
73
73
|
h[k.to_sym] = v
|
74
74
|
}
|
@@ -205,7 +205,7 @@ module ModerationAPI
|
|
205
205
|
end
|
206
206
|
else # model
|
207
207
|
# models (e.g. Pet) or oneOf
|
208
|
-
klass =
|
208
|
+
klass = ModerationApi.const_get(type)
|
209
209
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
210
210
|
end
|
211
211
|
end
|