Class: GetStream::Generated::ModerationClient

Inherits:
Object
  • Object
show all
Defined in:
lib/getstream_ruby/generated/moderation_client.rb,
lib/getstream_ruby/extensions/moderation_extensions.rb

Overview

Moderation API client with generated methods

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ModerationClient

Returns a new instance of ModerationClient.



12
13
14
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 12

def initialize(client)
  @client = client
end

Instance Method Details

#appeal(appeal_request) ⇒ Models::AppealResponse

Appeal against the moderation decision

Parameters:

  • appeal_request (AppealRequest)

Returns:



134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 134

def appeal(appeal_request)
  path = '/api/v2/moderation/appeal'
  # Build request body
  body = appeal_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#ban(ban_request) ⇒ Models::BanResponse

Ban a user from a channel or the entire app

Parameters:

  • ban_request (BanRequest)

Returns:



184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 184

def ban(ban_request)
  path = '/api/v2/moderation/ban'
  # Build request body
  body = ban_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#bulk_delete_action_config(bulk_delete_action_config_request) ⇒ Models::BulkDeleteActionConfigResponse

Delete multiple moderation action config entries by UUID in a single request.

Parameters:

  • bulk_delete_action_config_request (BulkDeleteActionConfigRequest)

Returns:



79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 79

def bulk_delete_action_config(bulk_delete_action_config_request)
  path = '/api/v2/moderation/action_config/bulk_delete'
  # Build request body
  body = bulk_delete_action_config_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#bulk_image_moderation(bulk_image_moderation_request) ⇒ Models::BulkImageModerationResponse

Moderate multiple images in bulk using a CSV file

Parameters:

  • bulk_image_moderation_request (BulkImageModerationRequest)

Returns:



201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 201

def bulk_image_moderation(bulk_image_moderation_request)
  path = '/api/v2/moderation/bulk_image_moderation'
  # Build request body
  body = bulk_image_moderation_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#bulk_upsert_action_config(bulk_upsert_action_config_request) ⇒ Models::BulkUpsertActionConfigResponse

Create or update multiple moderation action config entries in a single request. Omit the ID field to create; provide an ID to update.

Parameters:

  • bulk_upsert_action_config_request (BulkUpsertActionConfigRequest)

Returns:



62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 62

def bulk_upsert_action_config(bulk_upsert_action_config_request)
  path = '/api/v2/moderation/action_config/bulk'
  # Build request body
  body = bulk_upsert_action_config_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#bypass(bypass_request) ⇒ Models::BypassResponse

Enable or disable moderation bypass for a user. This endpoint is server-side only.

Parameters:

  • bypass_request (BypassRequest)

Returns:



218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 218

def bypass(bypass_request)
  path = '/api/v2/moderation/bypass'
  # Build request body
  body = bypass_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#check(check_request) ⇒ Models::CheckResponse

Run moderation checks on the provided content

Parameters:

  • check_request (CheckRequest)

Returns:



235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 235

def check(check_request)
  path = '/api/v2/moderation/check'
  # Build request body
  body = check_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#check_s3_access(check_s3_access_request) ⇒ Models::CheckS3AccessResponse

Verifies that the configured IAM role ARN can access private S3 images for moderation. Optionally accepts a stream+s3:// URL to check access to a specific object.

Parameters:

  • check_s3_access_request (CheckS3AccessRequest)

Returns:



252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 252

def check_s3_access(check_s3_access_request)
  path = '/api/v2/moderation/check_s3_access'
  # Build request body
  body = check_s3_access_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#check_user_profile(user_id, profile) ⇒ Models::CheckResponse

Experimental: Check user profile

Warning: This is an experimental feature and the API is subject to change.

This function is used to check a user profile for moderation. This will not create any review queue items for the user profile. You can just use this to check whether to allow a certain user profile to be created or not.

Examples:

client.moderation.('user-id',
  { username: 'bad_username', image: 'https://example.com/profile.jpg' })

Parameters:

  • user_id (String)

    User ID to be checked

  • profile (Hash)

    Profile data to be checked

Options Hash (profile):

  • :username (String)

    Username to be checked

  • :image (String)

    Image URL to be checked

Returns:



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/getstream_ruby/extensions/moderation_extensions.rb', line 27

def (user_id, profile)
  if profile[:username].nil? && profile[:image].nil?
    raise ArgumentError, 'Either username or image must be provided'
  end

  moderation_payload = Models::ModerationPayload.new
  moderation_payload.texts = [profile[:username]] if profile[:username]
  moderation_payload.images = [profile[:image]] if profile[:image]

  check_request = Models::CheckRequest.new(
    entity_type: 'userprofile',
    entity_id: user_id,
    entity_creator_id: user_id,
    moderation_payload: moderation_payload,
    config_key: 'user_profile:default',
    options: { force_sync: true, test_mode: true },
  )

  check(check_request)
end

#custom_check(custom_check_request) ⇒ Models::CustomCheckResponse

Custom check, add your own AI model reports to the review queue

Parameters:

  • custom_check_request (CustomCheckRequest)

Returns:



347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 347

def custom_check(custom_check_request)
  path = '/api/v2/moderation/custom_check'
  # Build request body
  body = custom_check_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#delete_action_config(_id, user_id = nil) ⇒ Models::DeleteActionConfigResponse

Delete a specific moderation action config entry by its UUID.

Parameters:

  • _id (String)
  • user_id (String) (defaults to: nil)

Returns:



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 97

def delete_action_config(_id, user_id = nil)
  path = '/api/v2/moderation/action_config/{id}'
  # Replace path parameters
  path = path.gsub('{id}', _id.to_s)
  # Build query parameters
  query_params = {}
  query_params['user_id'] = user_id unless user_id.nil?

  # Make the API request
  @client.make_request(
    :delete,
    path,
    query_params: query_params
  )
end

#delete_config(key, team = nil, user_id = nil) ⇒ Models::DeleteModerationConfigResponse

Delete a specific moderation policy by its name

Parameters:

  • key (String)
  • team (String) (defaults to: nil)
  • user_id (String) (defaults to: nil)

Returns:



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 288

def delete_config(key, team = nil, user_id = nil)
  path = '/api/v2/moderation/config/{key}'
  # Replace path parameters
  path = path.gsub('{key}', key.to_s)
  # Build query parameters
  query_params = {}
  query_params['team'] = team unless team.nil?
  query_params['user_id'] = user_id unless user_id.nil?

  # Make the API request
  @client.make_request(
    :delete,
    path,
    query_params: query_params
  )
end

#delete_moderation_rule(user_id = nil) ⇒ Models::DeleteModerationRuleResponse

Delete an existing moderation rule

Parameters:

  • user_id (String) (defaults to: nil)

Returns:



526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 526

def delete_moderation_rule(user_id = nil)
  path = '/api/v2/moderation/moderation_rule/{id}'
  # Build query parameters
  query_params = {}
  query_params['user_id'] = user_id unless user_id.nil?

  # Make the API request
  @client.make_request(
    :delete,
    path,
    query_params: query_params
  )
end

#flag(flag_request) ⇒ Models::FlagResponse

Flag any type of content (messages, users, channels, activities) for moderation review. Supports custom content types and additional metadata for flagged content.

Parameters:

  • flag_request (FlagRequest)

Returns:



407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 407

def flag(flag_request)
  path = '/api/v2/moderation/flag'
  # Build request body
  body = flag_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#get_action_config(queue_type = nil, entity_type = nil, exclude_defaults = nil, only_defaults = nil, user_id = nil) ⇒ Models::GetActionConfigResponse

Returns moderation action configs grouped by entity type, sorted by order ascending. Supports fetching DB-configured actions, hardcoded defaults, or both.

Parameters:

  • queue_type (String) (defaults to: nil)
  • entity_type (String) (defaults to: nil)
  • exclude_defaults (Boolean) (defaults to: nil)
  • only_defaults (Boolean) (defaults to: nil)
  • user_id (String) (defaults to: nil)

Returns:



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 23

def get_action_config(queue_type = nil, entity_type = nil, exclude_defaults = nil, only_defaults = nil, user_id = nil)
  path = '/api/v2/moderation/action_config'
  # Build query parameters
  query_params = {}
  query_params['queue_type'] = queue_type unless queue_type.nil?
  query_params['entity_type'] = entity_type unless entity_type.nil?
  query_params['exclude_defaults'] = exclude_defaults unless exclude_defaults.nil?
  query_params['only_defaults'] = only_defaults unless only_defaults.nil?
  query_params['user_id'] = user_id unless user_id.nil?

  # Make the API request
  @client.make_request(
    :get,
    path,
    query_params: query_params
  )
end

#get_appeal(_id) ⇒ Models::GetAppealResponse

Retrieve a specific appeal item by its ID

Parameters:

  • _id (String)

Returns:



151
152
153
154
155
156
157
158
159
160
161
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 151

def get_appeal(_id)
  path = '/api/v2/moderation/appeal/{id}'
  # Replace path parameters
  path = path.gsub('{id}', _id.to_s)

  # Make the API request
  @client.make_request(
    :get,
    path
  )
end

#get_config(key, team = nil) ⇒ Models::GetConfigResponse

Retrieve a specific moderation configuration by its key and team. This configuration contains settings for various moderation features like toxicity detection, AI analysis, and filtering rules.

Parameters:

  • key (String)
  • team (String) (defaults to: nil)

Returns:



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 310

def get_config(key, team = nil)
  path = '/api/v2/moderation/config/{key}'
  # Replace path parameters
  path = path.gsub('{key}', key.to_s)
  # Build query parameters
  query_params = {}
  query_params['team'] = team unless team.nil?

  # Make the API request
  @client.make_request(
    :get,
    path,
    query_params: query_params
  )
end

#get_flag_count(get_flag_count_request) ⇒ Models::GetFlagCountResponse

Returns the number of moderation flags created against a specific user’s content. Optionally filter by entity type.

Parameters:

  • get_flag_count_request (GetFlagCountRequest)

Returns:



424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 424

def get_flag_count(get_flag_count_request)
  path = '/api/v2/moderation/flag_count'
  # Build request body
  body = get_flag_count_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#get_moderation_ruleModels::GetModerationRuleResponse

Get a specific moderation rule by ID



543
544
545
546
547
548
549
550
551
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 543

def get_moderation_rule()
  path = '/api/v2/moderation/moderation_rule/{id}'

  # Make the API request
  @client.make_request(
    :get,
    path
  )
end

#get_review_queue_item(_id) ⇒ Models::GetReviewQueueItemResponse

Retrieve a specific review queue item by its ID

Parameters:

  • _id (String)

Returns:



608
609
610
611
612
613
614
615
616
617
618
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 608

def get_review_queue_item(_id)
  path = '/api/v2/moderation/review_queue/{id}'
  # Replace path parameters
  path = path.gsub('{id}', _id.to_s)

  # Make the API request
  @client.make_request(
    :get,
    path
  )
end

#insert_action_log(insert_action_log_request) ⇒ Models::InsertActionLogResponse

Insert a moderation action log entry. Server-side only. Used by product services to log moderation-related actions.

Parameters:

  • insert_action_log_request (InsertActionLogRequest)

Returns:



117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 117

def insert_action_log(insert_action_log_request)
  path = '/api/v2/moderation/action_logs'
  # Build request body
  body = insert_action_log_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#labels(labels_request) ⇒ Models::LabelsResponse

Run moderation on text and return labels

Parameters:

  • labels_request (LabelsRequest)

Returns:



458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 458

def labels(labels_request)
  path = '/api/v2/moderation/labels'
  # Build request body
  body = labels_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#mute(mute_request) ⇒ Models::MuteResponse

Mute a user. Mutes are generally not visible to the user you mute, while block is something you notice.

Parameters:

  • mute_request (MuteRequest)

Returns:



574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 574

def mute(mute_request)
  path = '/api/v2/moderation/mute'
  # Build request body
  body = mute_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_appeals(query_appeals_request) ⇒ Models::QueryAppealsResponse

Query Appeals

Parameters:

  • query_appeals_request (QueryAppealsRequest)

Returns:



167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 167

def query_appeals(query_appeals_request)
  path = '/api/v2/moderation/appeals'
  # Build request body
  body = query_appeals_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_label_results(query_label_results_request) ⇒ Models::QueryLabelResultsResponse

Search and filter moderation label results with support for pagination and sorting. View the history of moderation labels applied to content.

Parameters:

  • query_label_results_request (QueryLabelResultsRequest)

Returns:



475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 475

def query_label_results(query_label_results_request)
  path = '/api/v2/moderation/labels/results'
  # Build request body
  body = query_label_results_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_moderation_configs(query_moderation_configs_request) ⇒ Models::QueryModerationConfigsResponse

Search and filter moderation configurations across your application. This endpoint is designed for building moderation dashboards and managing multiple configuration sets.

Parameters:

  • query_moderation_configs_request (QueryModerationConfigsRequest)

Returns:



330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 330

def query_moderation_configs(query_moderation_configs_request)
  path = '/api/v2/moderation/configs'
  # Build request body
  body = query_moderation_configs_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_moderation_flags(query_moderation_flags_request) ⇒ Models::QueryModerationFlagsResponse

Query flags associated with moderation items. This is used for building a moderation dashboard.

Parameters:

  • query_moderation_flags_request (QueryModerationFlagsRequest)

Returns:



441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 441

def query_moderation_flags(query_moderation_flags_request)
  path = '/api/v2/moderation/flags'
  # Build request body
  body = query_moderation_flags_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_moderation_logs(query_moderation_logs_request) ⇒ Models::QueryModerationLogsResponse

Search and filter moderation action logs with support for pagination. View the history of moderation actions taken, including who performed them and when.

Parameters:

  • query_moderation_logs_request (QueryModerationLogsRequest)

Returns:



492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 492

def query_moderation_logs(query_moderation_logs_request)
  path = '/api/v2/moderation/logs'
  # Build request body
  body = query_moderation_logs_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_moderation_rules(query_moderation_rules_request) ⇒ Models::QueryModerationRulesResponse

Search and filter moderation rules across your application. This endpoint is designed for building moderation dashboards and managing multiple rule sets.

Parameters:

  • query_moderation_rules_request (QueryModerationRulesRequest)

Returns:



557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 557

def query_moderation_rules(query_moderation_rules_request)
  path = '/api/v2/moderation/moderation_rules'
  # Build request body
  body = query_moderation_rules_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#query_review_queue(query_review_queue_request) ⇒ Models::QueryReviewQueueResponse

Query review queue items allows you to filter the review queue items. This is used for building a moderation dashboard.

Parameters:

  • query_review_queue_request (QueryReviewQueueRequest)

Returns:



591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 591

def query_review_queue(query_review_queue_request)
  path = '/api/v2/moderation/review_queue'
  # Build request body
  body = query_review_queue_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#submit_action(submit_action_request) ⇒ Models::SubmitActionResponse

Take action on flagged content, such as marking content as safe, deleting content, banning users, or executing custom moderation actions. Supports various action types with configurable parameters.

Parameters:

  • submit_action_request (SubmitActionRequest)

Returns:



624
625
626
627
628
629
630
631
632
633
634
635
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 624

def submit_action(submit_action_request)
  path = '/api/v2/moderation/submit_action'
  # Build request body
  body = submit_action_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#unban(unban_request, target_user_id, channel_cid = nil, created_by = nil) ⇒ Models::UnbanResponse

Unban a user from a channel or globally.

Parameters:

  • unban_request (UnbanRequest)
  • target_user_id (String)
  • channel_cid (String) (defaults to: nil)
  • created_by (String) (defaults to: nil)

Returns:



644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 644

def unban(unban_request, target_user_id, channel_cid = nil, created_by = nil)
  path = '/api/v2/moderation/unban'
  # Build query parameters
  query_params = {}
  query_params['target_user_id'] = target_user_id unless target_user_id.nil?
  query_params['channel_cid'] = channel_cid unless channel_cid.nil?
  query_params['created_by'] = created_by unless created_by.nil?
  # Build request body
  body = unban_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    query_params: query_params,
    body: body
  )
end

#unmute(unmute_request) ⇒ Models::UnmuteResponse

Unmute a user

Parameters:

  • unmute_request (UnmuteRequest)

Returns:



667
668
669
670
671
672
673
674
675
676
677
678
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 667

def unmute(unmute_request)
  path = '/api/v2/moderation/unmute'
  # Build request body
  body = unmute_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#upsert_action_config(upsert_action_config_request) ⇒ Models::UpsertActionConfigResponse

Create a new moderation action config entry or update an existing one. Action configs control the action buttons displayed in the moderation dashboard for each entity type.

Parameters:

  • upsert_action_config_request (UpsertActionConfigRequest)

Returns:



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 45

def upsert_action_config(upsert_action_config_request)
  path = '/api/v2/moderation/action_config'
  # Build request body
  body = upsert_action_config_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#upsert_config(upsert_config_request) ⇒ Models::UpsertConfigResponse

Create a new moderation configuration or update an existing one. Configure settings for content filtering, AI analysis, toxicity detection, and other moderation features.

Parameters:

  • upsert_config_request (UpsertConfigRequest)

Returns:



269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 269

def upsert_config(upsert_config_request)
  path = '/api/v2/moderation/config'
  # Build request body
  body = upsert_config_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#upsert_moderation_rule(upsert_moderation_rule_request) ⇒ Models::UpsertModerationRuleResponse

Create or update a moderation rule that can apply app-wide or to specific moderation configs

Parameters:

  • upsert_moderation_rule_request (UpsertModerationRuleRequest)

Returns:



509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 509

def upsert_moderation_rule(upsert_moderation_rule_request)
  path = '/api/v2/moderation/moderation_rule'
  # Build request body
  body = upsert_moderation_rule_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end

#v2_delete_templateModels::DeleteModerationTemplateResponse

Delete a specific moderation template by its name



363
364
365
366
367
368
369
370
371
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 363

def v2_delete_template()
  path = '/api/v2/moderation/feeds_moderation_template'

  # Make the API request
  @client.make_request(
    :delete,
    path
  )
end

#v2_query_templatesModels::QueryFeedModerationTemplatesResponse

Retrieve a list of feed moderation templates that define preset moderation rules and configurations. Limited to 100 templates per request.



376
377
378
379
380
381
382
383
384
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 376

def v2_query_templates()
  path = '/api/v2/moderation/feeds_moderation_template'

  # Make the API request
  @client.make_request(
    :get,
    path
  )
end

#v2_upsert_template(upsert_moderation_template_request) ⇒ Models::UpsertModerationTemplateResponse

Upsert feeds template for moderation

Parameters:

  • upsert_moderation_template_request (UpsertModerationTemplateRequest)

Returns:



390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 390

def v2_upsert_template(upsert_moderation_template_request)
  path = '/api/v2/moderation/feeds_moderation_template'
  # Build request body
  body = upsert_moderation_template_request

  # Make the API request
  @client.make_request(
    :post,
    path,
    body: body
  )
end