Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Reports

Ahmed Castro edited this page Aug 29, 2018 · 3 revisions

submitReport

void submitReport(std::string resource, u32 id, u32 type, std::string name, std::string summary, const std::function<void(const modio::Response &response)>& callback);

API endpoint used: Submit Report

Submit a report for any resource on mod.io.

Function parameters

Name Type Description
resource std::string Type of resource you are reporting. Must be one of the following values: "mods" "games" or "users"
id u32 Unique id of the resource you are reporting.
type u32 Report type you are submitting.
name std::string Informative title for your report.
summary std::string Detailed description of your report. Make sure you include all relevant information and links to help moderators investigate and respond appropriately.
callback const std::function<void(const modio::Response &response)>& Function called once the process finished.

Callback parameters

Name Type Description
response const modio::Response& modio::Response object that contains the mod.io response status.

Example

modio_instance.submitReport(resource, id, type, name, summary, [&](const modio::Response& response)
{
  if(response.code == 201)
  {
    //Report successfully submitted
  }
});

Contents

Clone this wiki locally