pub struct SubmitModerationReportRequest {
pub category: String,
pub content_id: String,
pub description: Option<String>,
pub details: Option<SubmitModerationReportRequestDetails>,
pub reason: String,
pub type: String,
}Expand description
SubmitModerationReportRequest : Pseudocode steps to build a request with a valid combination: request = {} config = json.parse(GET /config) valid_types = config.reportOptions.keys request.type = select_one(valid_types, (id) => { text: id, tooltip: "" }) valid_categories = config.reportOptions[request.type].keys request.category = select_one(valid_categories, (id) => config.reportCategories[id]) valid_reasons = config.reportOptions[request.type][request.category] request.reason = select_one(valid_reasons, (id) => config.reportReasons[id]) request.contentId = relevant_id_of_type(request.type) request.details = relevant_details_based_on_type(request.type) request.description = input_string()
Fields§
§category: StringValid values are the keys of the object $.reportOptions[type] from GET /config. Descriptions of these are found at $.reportCategories[type].
content_id: StringThe id of the user, group, world, avatar, inventory item, print, etc. being reported.
description: Option<String>The subjective reason for the report
details: Option<SubmitModerationReportRequestDetails>§reason: StringValid values are the strings in the array $.reportOptions[type][category] from GET /config. Descriptions of these are found at $.reportReasons[type].
type: StringValid values are the keys of the object $.reportOptions from GET /config.
Implementations§
Source§impl SubmitModerationReportRequest
impl SubmitModerationReportRequest
Sourcepub fn new(
category: String,
content_id: String,
reason: String,
type: String,
) -> SubmitModerationReportRequest
pub fn new( category: String, content_id: String, reason: String, type: String, ) -> SubmitModerationReportRequest
Pseudocode steps to build a request with a valid combination: request = {} config = json.parse(GET /config) valid_types = config.reportOptions.keys request.type = select_one(valid_types, (id) => { text: id, tooltip: "" }) valid_categories = config.reportOptions[request.type].keys request.category = select_one(valid_categories, (id) => config.reportCategories[id]) valid_reasons = config.reportOptions[request.type][request.category] request.reason = select_one(valid_reasons, (id) => config.reportReasons[id]) request.contentId = relevant_id_of_type(request.type) request.details = relevant_details_based_on_type(request.type) request.description = input_string()