Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
Ahmed Castro edited this page Feb 4, 2018 · 7 revisions

getModEvents

void getModEvents(u32 mod_id, modio::FilterCreator& filter, const std::function<void(const modio::Response&, const std::vector<modio::ModEvent> & mod_events)>& callback);

API endpoint used: Get Mod Events

Get the event log for a mod, showing changes made sorted by latest event first. The result can be filtered using the FilterCreator.

Function parameters

Name Type Description
mod_id u32 Mod's unique identifier.
filter_creator modio::FilterCreator& FilterCreator object to be customized.
callback const std::function<void(const modio::Response&, const std::vector<modio::ModEvent> & mod_events)>& Function called once the process finished.

Callback parameters

Name Type Description
response const modio::Response& Response object that contains the mod.io response status.
mod_events std::vector<modio::ModEvent> Vector containing the ModEvent objects returned.

Example

modio_instance.getModEvents(mod_id, filter, [&](const modio::Response& response, const std::vector<modio::ModEvent> & mod_events)
{
  if(response.code == 200)
  {
    //The tags can be browsed on the mod_events vector
  }
});

getAllModEvents

void getAllModEvents(modio::FilterCreator& filter, const std::function<void(const modio::Response&, const std::vector<modio::ModEvent> & mod_events)>& callback);

API endpoint used: Get All Mod Events

Get all mods events for the corresponding game sorted by latest event first. The result can be filtered using the FilterCreator.

Function parameters

Name Type Description
filter_creator modio::FilterCreator& FilterCreator object to be customized.
callback const std::function<void(const modio::Response&, const std::vector<modio::ModEvent> & mod_events)>& Function called once the process finished.

Callback parameters

Name Type Description
response const modio::Response& Response object that contains the mod.io response status.
mod_events std::vector<modio::ModEvent> Vector containing the ModEvent objects returned.

Example

modio_instance.getAllModEvents(filter, [&](const modio::Response& response, const std::vector<modio::ModEvent> & mod_events)
{
  if(response.code == 200)
  {
    //The tags can be browsed on the mod_events vector
  }
});

Contents

Clone this wiki locally