Skip to content
YYBartT edited this page Jun 16, 2023 · 2 revisions

Stats

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

modio_stats_game

mod.io Endpoint: Get Game Stats


This function gets the game stats for the corresponding game. A successful request will return a single GameStats struct.


Syntax:

modio_stats_game(_callback_success, _callback_failed, _game_id)
Argument Type Description
_callback_success Function or Method The function to trigger when the request is successful.
_callback_failed Function or Method The function to trigger when the request failed.
_game_id Real OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided

Returns:

GameStats




Back To Top

modio_stats_mods_get_list

mod.io Endpoint: Get Mods Stats


This function gets all mod stats for mods of the corresponding game. A successful request will return an array of ModStats structs.

ℹ️ NOTE

We highly recommend you apply filters to this endpoint to get only the results you need. For more information regarding filtering please see the filtering section.


Syntax:

modio_stats_mods_get_list(_callback_success, _callback_failed, _game_id)
Argument Type Description
_callback_success Function or Method The function to trigger when the request is successful.
_callback_failed Function or Method The function to trigger when the request failed.
_game_id Real OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided

Returns:

GetModStats




Back To Top

modio_stats_mods_get

mod.io Endpoint: Get Mod Stats


This function gets mod stats for the corresponding mod. A successful request will return a single ModStats struct.


Syntax:

modio_stats_mods_get(_mod_id, _callback_success, _callback_failed, _game_id)
Argument Type Description
_mod_id Real Unique id of the mod.
_callback_success Function or Method The function to trigger when the request is successful.
_callback_failed Function or Method The function to trigger when the request failed.
_game_id Real OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided

Returns:

ModStats