Class: GetStream::Generated::ModerationClient
- Inherits:
-
Object
- Object
- GetStream::Generated::ModerationClient
- 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
-
#analyze(analyze_request) ⇒ Models::AnalyzeResponse
Moderate named text fields and raw image bytes via multipart/form-data.
-
#appeal(appeal_request) ⇒ Models::AppealResponse
Appeal against the moderation decision.
-
#ban(ban_request) ⇒ Models::ModerationBanResponse
Ban a user from a channel or the entire app.
-
#bulk_action_appeals(bulk_action_appeals_request) ⇒ Models::BulkActionAppealsResponse
Process multiple appeals in a single request by applying the specified action to each.
-
#bulk_delete_action_config(bulk_delete_action_config_request) ⇒ Models::BulkDeleteActionConfigResponse
Delete multiple moderation action config entries by UUID in a single request.
-
#bulk_image_moderation(bulk_image_moderation_request) ⇒ Models::BulkImageModerationResponse
Moderate multiple images in bulk using a CSV file.
-
#bulk_upsert_action_config(bulk_upsert_action_config_request) ⇒ Models::BulkUpsertActionConfigResponse
Create or update multiple moderation action config entries in a single request.
-
#bypass(bypass_request) ⇒ Models::BypassResponse
Enable or disable moderation bypass for a user.
-
#check(check_request) ⇒ Models::CheckResponse
Run moderation checks on the provided content.
-
#check_s3_access(check_s3_access_request) ⇒ Models::CheckS3AccessResponse
Verifies that the configured IAM role ARN can access private S3 images for moderation.
-
#check_user_profile(user_id, profile) ⇒ Models::CheckResponse
Experimental: Check user profile.
-
#custom_check(custom_check_request) ⇒ Models::CustomCheckResponse
Custom check, add your own AI model reports to the review queue.
-
#delete_action_config(_id, user_id = nil) ⇒ Models::DeleteActionConfigResponse
Delete a specific moderation action config entry by its UUID.
-
#delete_config(key, team = nil, user_id = nil) ⇒ Models::DeleteModerationConfigResponse
Delete a specific moderation policy by its name.
-
#delete_moderation_rule(user_id = nil) ⇒ Models::DeleteModerationRuleResponse
Delete an existing moderation rule.
-
#flag(flag_request) ⇒ Models::FlagItemResponse
Flag any type of content (messages, users, channels, activities) for moderation review.
-
#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.
-
#get_appeal(_id) ⇒ Models::GetAppealResponse
Retrieve a specific appeal item by its ID.
-
#get_config(key, team = nil) ⇒ Models::GetConfigResponse
Retrieve a specific moderation configuration by its key and team.
-
#get_flag_count(get_flag_count_request) ⇒ Models::GetFlagCountResponse
Returns the number of moderation flags created against a specific user’s content.
-
#get_moderation_rule ⇒ Models::GetModerationRuleResponse
Get a specific moderation rule by ID.
-
#get_review_queue_item(_id) ⇒ Models::GetReviewQueueItemResponse
Retrieve a specific review queue item by its ID.
-
#get_setup_session ⇒ Models::GetSetupSessionResponse
Retrieve a setup session for an app.
-
#initialize(client) ⇒ ModerationClient
constructor
A new instance of ModerationClient.
-
#insert_action_log(insert_action_log_request) ⇒ Models::InsertActionLogResponse
Insert a moderation action log entry.
-
#labels(labels_request) ⇒ Models::LabelsResponse
Run moderation on text and return labels.
-
#mute(mute_request) ⇒ Models::MuteResponse
Mute a user.
-
#query_appeals(query_appeals_request) ⇒ Models::QueryAppealsResponse
Query Appeals.
-
#query_label_results(query_label_results_request) ⇒ Models::QueryLabelResultsResponse
Search and filter moderation label results with support for pagination and sorting.
-
#query_moderation_configs(query_moderation_configs_request) ⇒ Models::QueryModerationConfigsResponse
Search and filter moderation configurations across your application.
-
#query_moderation_flags(query_moderation_flags_request) ⇒ Models::QueryModerationFlagsResponse
Query flags associated with moderation items.
-
#query_moderation_logs(query_moderation_logs_request) ⇒ Models::QueryModerationLogsResponse
Search and filter moderation action logs with support for pagination.
-
#query_moderation_rules(query_moderation_rules_request) ⇒ Models::QueryModerationRulesResponse
Search and filter moderation rules across your application.
-
#query_review_queue(query_review_queue_request) ⇒ Models::QueryReviewQueueResponse
Query review queue items allows you to filter the review queue items.
-
#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.
-
#submit_moderation_feedback(submit_moderation_feedback_request) ⇒ Models::SubmitModerationFeedbackResponse
Forward a moderator-supplied correction to the moderation feedback pipeline.
-
#unban(unban_request, target_user_id, channel_cid = nil, created_by = nil) ⇒ Models::UnbanResponse
Unban a user from a channel or globally.
-
#unmute(unmute_request) ⇒ Models::UnmuteResponse
Unmute a user.
-
#upsert_action_config(upsert_action_config_request) ⇒ Models::UpsertActionConfigResponse
Create a new moderation action config entry or update an existing one.
-
#upsert_config(upsert_config_request) ⇒ Models::UpsertConfigResponse
Create a new moderation configuration or update an existing one.
-
#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.
-
#upsert_setup_session(upsert_setup_session_request) ⇒ Models::UpsertSetupSessionResponse
Update a setup session for an app.
-
#v2_delete_template ⇒ Models::DeleteModerationTemplateResponse
Delete a specific moderation template by its name.
-
#v2_query_templates ⇒ Models::QueryFeedModerationTemplatesResponse
Retrieve a list of feed moderation templates that define preset moderation rules and configurations.
-
#v2_upsert_template(upsert_moderation_template_request) ⇒ Models::UpsertModerationTemplateResponse
Upsert feeds template for moderation.
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
#analyze(analyze_request) ⇒ Models::AnalyzeResponse
Moderate named text fields and raw image bytes via multipart/form-data. Returns a per-field lightweight verdict.
134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 134 def analyze(analyze_request) path = '/api/v2/moderation/analyze' # Build request body body = analyze_request # Make the API request @client.make_request( :post, path, body: body ) end |
#appeal(appeal_request) ⇒ Models::AppealResponse
Appeal against the moderation decision
151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 151 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::ModerationBanResponse
Ban a user from a channel or the entire app
218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 218 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_action_appeals(bulk_action_appeals_request) ⇒ Models::BulkActionAppealsResponse
Process multiple appeals in a single request by applying the specified action to each. Supported actions: unban, restore, unblock, mark_reviewed, reject_appeal. Each appeal goes through the same path as a single submit_action call.
201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 201 def bulk_action_appeals(bulk_action_appeals_request) path = '/api/v2/moderation/appeals/bulk_action' # Build request body body = bulk_action_appeals_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.
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
235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 235 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.
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.
252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 252 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
269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 269 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.
286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 286 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.
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 check_user_profile(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
381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 381 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.
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
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 322 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
560 561 562 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 560 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::FlagItemResponse
Flag any type of content (messages, users, channels, activities) for moderation review. Supports custom content types and additional metadata for flagged content.
441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 441 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.
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
168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 168 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.
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 344 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.
458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 458 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_rule ⇒ Models::GetModerationRuleResponse
Get a specific moderation rule by ID
577 578 579 580 581 582 583 584 585 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 577 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
642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 642 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 |
#get_setup_session ⇒ Models::GetSetupSessionResponse
Retrieve a setup session for an app
657 658 659 660 661 662 663 664 665 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 657 def get_setup_session() path = '/api/v2/moderation/setup' # 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.
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
492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 492 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.
608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 608 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
184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 184 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.
509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 509 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.
364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 364 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.
475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 475 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.
526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 526 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.
591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 591 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.
625 626 627 628 629 630 631 632 633 634 635 636 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 625 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.
688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 688 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 |
#submit_moderation_feedback(submit_moderation_feedback_request) ⇒ Models::SubmitModerationFeedbackResponse
Forward a moderator-supplied correction to the moderation feedback pipeline. Server-side only.
705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 705 def submit_moderation_feedback(submit_moderation_feedback_request) path = '/api/v2/moderation/submit_moderation_feedback' # Build request body body = submit_moderation_feedback_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.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 725 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
748 749 750 751 752 753 754 755 756 757 758 759 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 748 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.
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.
303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 303 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
543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 543 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 |
#upsert_setup_session(upsert_setup_session_request) ⇒ Models::UpsertSetupSessionResponse
Update a setup session for an app
671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 671 def upsert_setup_session(upsert_setup_session_request) path = '/api/v2/moderation/setup' # Build request body body = upsert_setup_session_request # Make the API request @client.make_request( :post, path, body: body ) end |
#v2_delete_template ⇒ Models::DeleteModerationTemplateResponse
Delete a specific moderation template by its name
397 398 399 400 401 402 403 404 405 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 397 def v2_delete_template() path = '/api/v2/moderation/feeds_moderation_template' # Make the API request @client.make_request( :delete, path ) end |
#v2_query_templates ⇒ Models::QueryFeedModerationTemplatesResponse
Retrieve a list of feed moderation templates that define preset moderation rules and configurations. Limited to 100 templates per request.
410 411 412 413 414 415 416 417 418 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 410 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
424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/getstream_ruby/generated/moderation_client.rb', line 424 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 |