Skip to main content

C++ Reference Docs

Functions

ToString

inline std::string ToString(Modio::MaturityOption option)

Transform an MaturityOption to an std::string

InitializeAsync

void InitializeAsync(Modio::InitializeOptions InitOptions, std::function<void (Modio::ErrorCode)> OnInitComplete)

Initializes the SDK for the given user. Loads the state of mods installed on the system as well as the set of mods the specified user has installed on this device

Parameters

InitOptionsParameters to the function packed as a struct where all members needs to be initialized for the call to succeed

Error Values

GenericError::SDKAlreadyInitializedSDK already initialized
NetworkErrorCouldn't connect to the mod.io servers
FilesystemErrorCouldn't create the user data or common data folders
ConfigurationErrorInitOptions contains an invalid value - inspect ec.value() to determine what was incorrect

SetLogLevel

void SetLogLevel(Modio::LogLevel Level)

Sets the global logging level - messages with a log level below the specified value will not be displayed

Parameters

LevelValue indicating which priority of messages should be included in the log output

SetLogCallback

void SetLogCallback(std::function<void (Modio::LogLevel, const std::string &)> LogCallback)

Provide a callback to handle log messages emitted by the SDK.

Parameters

LogCallbackCallback invoked by the SDK during xref
Modio::RunPendingHandlers
for each log emitted during that invocation

RunPendingHandlers

void RunPendingHandlers()

Runs any pending SDK work on the calling thread, including invoking any callbacks passed to asynchronous operations. NOTE: This should be called while xref

Modio::InitializeAsync
and xref
Modio::ShutdownAsync
are running, as they both utilize the internal event loop for functionality. NOTE: RunPendingHandlers should never be called inside a callback you provide to the SDK. This will result in a deadlock.

ShutdownAsync

void ShutdownAsync(std::function<void (Modio::ErrorCode)> OnShutdownComplete)

Cancels any running internal operations and invokes any pending callbacks with Modio::GenericError::OperationCanceled. This function does not block; you should keep calling Modio::RunPendingHandlers until the callback you provide to this function is invoked. NOTE: ShutdownAsync should never be called inside a callback you provide to the SDK. This will result in a deadlock.

Requirements

  • initialized-sdk

Parameters

OnShutdownComplete

Error Values

GenericError::SDKNotInitializedSDK not initialized

SubscribeToModAsync

void SubscribeToModAsync(Modio::ModID ModToSubscribeTo, bool IncludeDependencies, std::function<void (Modio::ErrorCode)> OnSubscribeComplete)

Sends a request to the mod.io server to add the specified mod to the user's list of subscriptions, and marks the mod for local installation by the SDK

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting
  • management-enabled
  • mod-not-pending-uninstall

Parameters

ModToSubscribeToMod ID of the mod requiring a subscription.
IncludeDependenciesIf this mod has any dependencies, all of those will also be subscribed to.
OnSubscribeCompleteCallback invoked when the subscription request is completed.

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
ModManagementError::ModBeingProcessedSpecified mod is pending uninstall. Wait until the uninstall process is complete before subscribing again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod does not exist or was deleted

UnsubscribeFromModAsync

void UnsubscribeFromModAsync(Modio::ModID ModToUnsubscribeFrom, std::function<void (Modio::ErrorCode)> OnUnsubscribeComplete)

Sends a request to the mod.io server to remove the specified mod from the user's list of subscriptions. If no other local users are subscribed to the specified mod this function will also mark the mod for uninstallation by the SDK.

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting
  • management-enabled

Parameters

ModToUnsubscribeFromMod ID of the mod requiring unsubscription.
OnUnsubscribeCompleteCallback invoked when the unsubscription request is completed.

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod does not exist or was deleted

FetchExternalUpdatesAsync

void FetchExternalUpdatesAsync(std::function<void (Modio::ErrorCode)> OnFetchDone)

Synchronises the local list of the current user's subscribed mods with the server. Any mods that have been externally subscribed will be automatically marked for installation, and mods that have been externally removed from the user's subscriptions may be uninstalled if no other local users have a current subscription. Calling this before you call QueryUserSubscriptions, QueryUserInstallations orQuerySystemInstallations will ensure that if the system mod directory has been moved or relocated, those functions will still return correct values.

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting
  • management-enabled
  • fetch-external-updates-not-running

Parameters

OnFetchDoneCallback invoked when the external state has been retrieved and merged with the local data

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::RequestInProgressFetchExternalUpdates operation is already running.
NetworkErrorCouldn't connect to mod.io servers

PreviewExternalUpdatesAsync

void PreviewExternalUpdatesAsync(std::function<void (Modio::ErrorCode, int)> OnPreviewDone)

Retrieve a list of updates between the users local mod state, and the server-side state. This allows you to identify which mods will be modified by the next call to FetchExternalUpdatesAsync in order to perform any content management (such as unloading files) that might be required.

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting

Parameters

OnPreviewDoneCallback invoked when the external state has been retrieved. It contains a dictionary with ModID as keys and changes as values. Empty when there are no differences between local and the mod.io API service

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

EnableModManagement

Modio::ErrorCode EnableModManagement(std::function<void (Modio::ModManagementEvent)> ModManagementHandler)

Enables the automatic management of installed mods on the system based on the user's subscriptions. Does nothing if mod management is currently enabled. Note: this function does not behave like other "async" methods, given that its name does not include the word async.

Parameters

ModManagementHandlerThis callback handler will be invoked with a ModManagementEvent for each mod operation performed by the SDK

Returns

Modio::ErrorCode indicating if mod management was enabled successfully

Error Values

GenericError::SDKNotInitializedSDK not initialized
ModManagementError::ModManagementAlreadyEnabledMod management was already enabled. The mod management callback has not been changed

DisableModManagement

void DisableModManagement()

Disables automatic installation or uninstallation of mods based on the user's subscriptions. Allows currently processing installation to complete; will cancel any pending operations when called.

IsModManagementBusy

bool IsModManagementBusy()

Checks if the automatic management process is currently installing or removing mods

Returns

True if automatic management is currently performing an operation

PrioritizeTransferForMod

Modio::ErrorCode PrioritizeTransferForMod(Modio::ModID IDToPrioritize)

Prioritizes the specified mod for upload, install, or update. The priority mod will be processed immediately after the current upload or install completes (if applicable). Only one mod ID can be prioritized at a time.

Parameters

IDToPrioritizeThe ID for the mod to prioritize. This mod must be pending upload, install, or update.

Returns

Error code indicating there is no pending upload, install, or update associated with the provided priority mod ID.

Error Values

GenericError::BadParameterThe supplied mod ID is invalid or not present in the list of pending operations

QueryCurrentModUpdate

int QueryCurrentModUpdate()

Provides progress information for a mod installation or update operation if one is currently in progress.

Returns

Optional ModProgressInfo object containing information regarding the progress of the installation operation.

QueryUserSubscriptions

int QueryUserSubscriptions()

Fetches the local view of the user's subscribed mods, including mods that are subscribed but not yet installed

Returns

std::map using Mod IDs as keys and ModCollectionEntry objects providing information about the subscribed mods

QueryUserInstallations

int QueryUserInstallations(bool bIncludeOutdatedMods)

Fetches the subset of the user's subscribed mods that are installed and therefore ready for loading

Parameters

bIncludeOutdatedModsInclude subscribed mods that are installed but have an updated version on the server that has not yet been installed

Returns

std::map using Mod IDs as keys and ModCollectionEntry objects providing information about the subscribed mods

QuerySystemInstallations

int QuerySystemInstallations()

Fetches all mods installed on the system such that a consuming application can present the information in a UI in order to free up space by uninstalling mods

Returns

std::map using Mod IDs as keys and ModCollectionEntry objects providing information about mods installed on the system regardless of which user installed them

QueryStorageInfo

Modio::StorageInfo QueryStorageInfo()

Retrieves a snapshot of current storage related information such as space consumed by mod installations and total available space

Returns

Structure containing storage information

ForceUninstallModAsync

void ForceUninstallModAsync(Modio::ModID ModToRemove, std::function<void (Modio::ErrorCode)> Callback)

Forcibly uninstalls a mod from the system. This is intended for use when a host application requires more room for a mod that the user wants to install, and as such will return an error if the current user is subscribed to the mod. To remove a mod the current user is subscribed to, use xref

Modio::UnsubscribeFromModAsync
.

Parameters

ModToRemoveThe ID for the mod to force remove.
CallbackCallback invoked when the uninstallation is successful, or if it failed because the current user remains subscribed.

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
ModManagementError::AlreadySubscribedUser is still subscribed to the specified mod
GenericError::BadParameterThe supplied mod ID is invalid

VerifyUserAuthenticationAsync

void VerifyUserAuthenticationAsync(std::function<void (Modio::ErrorCode)> Callback)

Queries the server to verify the state of the currently authenticated user if there is one present. An empty ErrorCode passed to the callback indicates successful verification, i.e. the mod.io server was contactable and the user's authentication remains valid.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

CallbackCallback invoked once the server-side state has been queried

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
NetworkErrorCouldn't connect to mod.io servers

RefreshUserDataAsync

void RefreshUserDataAsync(std::function<void (Modio::ErrorCode)> Callback)

Queries the server to update the user data. An empty ErrorCode passed to the callback indicates successful verification, i.e. the mod.io server was contactable and the user's data got updated.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

CallbackCallback invoked once the server-side state has been queried

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

QueryUserProfile

int QueryUserProfile()

Fetches the currently authenticated mod.io user profile if there is one associated with the current platform user

Returns

Optional Modio::User object containing profile information

AuthenticateUserExternalAsync

void AuthenticateUserExternalAsync(Modio::AuthenticationParams User, Modio::AuthenticationProvider Provider, std::function<void (Modio::ErrorCode)> Callback)

Uses platform-specific authentication to associate a mod.io user account with the current platform user

Requirements

  • initialized-sdk
  • no-rate-limiting
  • no-authenticated-user

Parameters

UserAuthentication payload data to submit to the provider. Any AuthToken string that contains special characters (ex. "+, /, =") requires the boolean "bURLEncodeAuthToken" set as "True" to encode the text accordingly
ProviderThe provider to use to perform the authentication
CallbackCallback invoked once the authentication request has been made

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers
ConfigurationErrorThe SDK's configuration is not valid
InvalidArgsErrorThe arguments passed to the function have failed validation
UserTermsOfUseErrorThe user has not yet accepted the mod.io Terms of Use

GetTermsOfUseAsync

void GetTermsOfUseAsync(std::function<void (Modio::ErrorCode, int)> Callback)

This function retrieves the information required for a game to display the mod.io terms of use to a player who wishes to create a mod.io account

Requirements

  • initialized-sdk

Parameters

CallbackCallback invoked with the terms of use data once retrieved from the server

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

GetModCreationHandle

Modio::ModCreationHandle GetModCreationHandle()

Returns a handle for use with SubmitNewModAsync

Returns

The handle to use in a call to SubmitNewModAsync

SubmitNewModAsync

void SubmitNewModAsync(Modio::ModCreationHandle Handle, Modio::CreateModParams Params, std::function<void (Modio::ErrorCode, int)> Callback)

Requests a new mod be created with the specified properties

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

HandleHandle returned by xref
Modio::GetModCreationHandle
. Each successful call to SubmitNewModAsync requires a new ModCreationHandle.
ParamsInformation about the mod to be created
CallbackCallback invoked with the ID of the created mod once the parameters are validated by the server and the mod is created

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
NetworkErrorCouldn't connect to mod.io servers
InvalidArgsErrorSome of the information in the ModCreateParams did not pass validation

SubmitModChangesAsync

void SubmitModChangesAsync(Modio::ModID Mod, Modio::EditModParams Params, std::function<void (Modio::ErrorCode, int)> Callback)

Edits the parameters of a mod, by updating any fields set in the Params object to match the passed-in values. Fields left empty on the Params object will not be updated. If no fields are populated, will return an error.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

ModThe mod to edit
ParamsDescriptor containing optional fields indicating what properties should be updated
CallbackCallback invoked with the updated mod profile on success

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
GenericError::BadParameterNo fields selected for modification in Params, or the supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
InvalidArgsErrorSome of the information in the EditModParams did not pass validation

SubmitNewModFileForMod

void SubmitNewModFileForMod(Modio::ModID Mod, Modio::CreateModFileParams Params)

Queues the upload of a new modfile release for the specified mod using the submitted parameters. This function takes a Modio::CreateModFileParams object specifying a path to the root folder of the new modfile. The SDK will compress the folder's contents into a .zip archive and queue the result for upload. When the upload completes, a Mod Management Event will be triggered. Note the SDK is also responsible for decompressing the archive upon its installation at a later point in time.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user
  • management-enabled

Parameters

ModThe mod to attach the modfile to
ParamsDescriptor containing information regarding the modfile

Error Values

GenericError::BadParameterThe supplied mod ID is invalid

ListAllModsAsync

void ListAllModsAsync(Modio::FilterParams Filter, std::function<void (Modio::ErrorCode, int)> Callback)

Provides a list of mods for the current game, that match the parameters specified in the filter

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

FilterModio::FilterParams object containing any filters that should be applied to the query
CallbackCallback invoked with a status code and an optional ModInfoList providing mod profiles

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

GetModInfoAsync

void GetModInfoAsync(Modio::ModID ModId, std::function<void (Modio::ErrorCode, int)> Callback)

Fetches detailed information about the specified mod, including description and file metadata for the most recent release

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

ModIdMod ID of the mod to fetch data
CallbackCallback providing a status code and an optional Modio::ModInfo object with the mod's extended information

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod does not exist or was deleted

GetModMediaAsync

void GetModMediaAsync(Modio::ModID ModId, Modio::LogoSize LogoSize, std::function<void (Modio::ErrorCode, int)> Callback)

Downloads the logo for the specified mod. Will use existing file if it is already present on disk

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

ModIdMod ID for use in logo retrieval
LogoSizeParameter indicating the size of logo that's required
CallbackCallback providing a status code and an optional path object pointing to the location of the downloaded image

Error Values

GenericError::SDKNotInitializedSDK not initialized
FilesystemError::InsufficientSpaceNot enough space for the file
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod media does not exist or was deleted

GetModMediaAsync

void GetModMediaAsync(Modio::ModID ModId, Modio::GallerySize GallerySize, Modio::GalleryIndex Index, std::function<void (Modio::ErrorCode, int)> Callback)

Get a gallery image for the specified mod ID. If it already exists on disk the file will be reused unless it is outdated

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

ModIdThe mod you want to retrieve an image for
GallerySizeSize of the image you want to retrieve
IndexThe zero-based index of the image you want to retrieve
CallbackCallback containing a status code and an Optional containing a path to the image file on disk

Error Values

GenericError::SDKNotInitializedSDK not initialized
FilesystemError::InsufficientSpaceNot enough space for the file
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod media does not exist or was deleted

GetModMediaAsync

void GetModMediaAsync(Modio::ModID ModId, Modio::AvatarSize AvatarSize, std::function<void (Modio::ErrorCode, int)> Callback)

Downloads the creator avatar for a specified mod. Will use existing file if it is already present on disk and not outdated

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

ModIdID of the mod the creator avatar will be retrieved for
AvatarSizeParameter indicating the size of avatar image that's required
CallbackCallback providing a status code and an optional path object pointing to the location of the downloaded image

Error Values

GenericError::SDKNotInitializedSDK not initialized
FilesystemError::InsufficientSpaceNot enough space for the file
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod media does not exist or was deleted

SubmitModRatingAsync

void SubmitModRatingAsync(Modio::ModID ModID, Modio::Rating Rating, std::function<void (Modio::ErrorCode)> Callback)

Submits a rating for a mod on behalf of the currently authenticated user.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

ModIDThe mod to submit a rating for
RatingThe rating to submit NOTE: To clear a rating for a mod, submit a rating of Rating::Neutral.
CallbackCallback providing a status code to indicate the rating was submitted successfully

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod could not be found

GetModTagOptionsAsync

void GetModTagOptionsAsync(std::function<void (Modio::ErrorCode, int)> Callback)

Fetches the available tags used on mods for the current game. These tags can them be used in conjunction with the FilterParams passed to ListAllMods

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

CallbackCallback providing a status code and an optional ModTagOptions object containing the available tags

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

GetModDependenciesAsync

void GetModDependenciesAsync(Modio::ModID ModID, bool Recursive, std::function<void (Modio::ErrorCode, int)> Callback)

For a given Mod ID, fetches a list of any mods that the creator has marked as dependencies

Requirements

  • initialized-sdk
  • no-rate-limiting

Parameters

ModIDThe mod to retrieve dependencies for
RecursiveInclude child dependencies in a recursive manner. NOTE: Recursion supports a maximum depth of 5.
CallbackCallback providing a status code and an optional xref
ModDependencyList

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers

AddModDependenciesAsync

void AddModDependenciesAsync(Modio::ModID ModID, int Dependencies, std::function<void (Modio::ErrorCode)> Callback)

Adds dependencies to a specified mod, linking it with other mods that are required for it to function

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

ModIDThe mod to add dependencies to
DependenciesList of mod dependencies to add
CallbackCallback providing a status code to indicate if the dependencies were added successfully

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod could not be found

DeleteModDependenciesAsync

void DeleteModDependenciesAsync(Modio::ModID ModID, int Dependencies, std::function<void (Modio::ErrorCode)> Callback)

Deletes dependencies from a specified mod, unlinking it from other mods that are no longer required.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

ModIDThe mod to delete dependencies from
DependenciesList of mod IDs to delete as dependencies
CallbackCallback providing a status code to indicate if the dependencies were deleted successfully

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod IDs are invalid
NetworkErrorCouldn't connect to mod.io servers

RequestEmailAuthCodeAsync

void RequestEmailAuthCodeAsync(Modio::EmailAddress EmailAddress, std::function<void (Modio::ErrorCode)> Callback)

Begins email authentication for the current session by requesting a one-time code be sent to the specified email address if it is associated with a mod.io account

Requirements

  • initialized-sdk
  • no-rate-limiting
  • no-authenticated-user

Parameters

EmailAddressThe email address to send the code to
CallbackCallback providing a status code indicating the outcome of the request

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserAuthError::AlreadyAuthenticatedAuthenticated user already signed-in. Call ClearUserDataAsync to de-authenticate the old user, then Shutdown() and reinitialize the SDK first.
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

AuthenticateUserEmailAsync

void AuthenticateUserEmailAsync(Modio::EmailAuthCode AuthenticationCode, std::function<void (Modio::ErrorCode)> Callback)

Completes email authentication for the current session by submitting the one-time code sent to the user's email address

Requirements

  • initialized-sdk
  • no-rate-limiting
  • no-authenticated-user

Parameters

AuthenticationCodeUser's authentication code
CallbackCallback providing a status code indicating if authentication was successful or not

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserAuthError::AlreadyAuthenticatedAuthenticated user already signed-in. Call ClearUserDataAsync to de-authenticate the old user, then Shutdown() and reinitialize the SDK first.
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

ClearUserDataAsync

void ClearUserDataAsync(std::function<void (Modio::ErrorCode)> Callback)

De-authenticates the current mod.io user for the current session, and clears all user-specific data stored on the current device. Any subscribed mods that are installed but do not have other local users subscribed will be marked for uninstallation. This method also disables mod management.

Requirements

  • initialized-sdk
  • authenticated-user

Parameters

CallbackCallback providing a status code indicating the outcome of clearing the user data. Error codes returned by this function are informative only - it will always succeed.

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.

GetUserMediaAsync

void GetUserMediaAsync(Modio::AvatarSize AvatarSize, std::function<void (Modio::ErrorCode, int)> Callback)

Downloads the avatar of the currently authenticated user. Will only perform a download if there is no local cache of the avatar or if that cached copy is out-of-date.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

AvatarSizeParameter specifying the size of avatar image to download
CallbackCallback providing a status code for the download and an optional path to the downloaded image

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

GetLastValidationError

int GetLastValidationError()

If the last request to the mod.io servers returned a validation failure, this function returns extended information describing the fields that failed validation.

Requirements

  • initialized-sdk

Returns

Collection of Modio::FieldError objects, or empty collection if there was no validation failures

ReportContentAsync

void ReportContentAsync(Modio::ReportParams Report, std::function<void (Modio::ErrorCode)> Callback)

Sends a content report to mod.io. When using this function, please inform your users that if they provide their contact name or details in the Report parameter, that those may be shared with the person responsible for the content being reported. For more information on what data in a report will be shared with whom, please see link: our website's report form for more information.

Requirements

  • initialized-sdk

Parameters

ReportInformation about the content being reported and a description of the report.
CallbackCallback providing a status code to indicate successful submission of the report.

Error Values

HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe mod ID, game ID, or user ID supplied to ReportParams is invalid
NetworkErrorCouldn't Connect to mod.io servers
InvalidArgsErrorRequired information in the report did not pass validation

AddOrUpdateModLogoAsync

void AddOrUpdateModLogoAsync(Modio::ModID ModID, std::string LogoPath, std::function<void (Modio::ErrorCode)> Callback)

Submit a new logo for an existing mod, overriding any existing image currently stored on the server. The logo must be gif, jpg, or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288. We recommended you supply a high resolution image with a 16:9 ratio. mod.io will use this logo to create three thumbnails with the dimensions of 320x180, 640x360 and 1280x720.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

ModIDID of the mod whose logo will be added or updated
LogoPathPath to the new image file of the logo to be uploaded.
CallbackCallback providing a status code indicating the outcome of the request

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid

AddOrUpdateModGalleryImagesAsync

void AddOrUpdateModGalleryImagesAsync(Modio::ModID ModID, int ImagePaths, bool SyncGallery, std::function<void (Modio::ErrorCode)> Callback)

Add or update images in the gallery for an existing mod. Images must be gif, jpg, or png format and cannot exceed 8MB in filesize.

Requirements

  • initialized-sdk
  • no-rate-limiting
  • authenticated-user

Parameters

ModIDID of the mod whose gallery images will be added or updated
ImagePathsVector of paths to the image files to be uploaded
SyncGalleryIf true, existing gallery images will be replaced; if false, new images will be appended
CallbackCallback providing a status code indicating the outcome of the request

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
GenericError::BadParameterThe supplied mod ID is invalid

ArchiveModAsync

void ArchiveModAsync(Modio::ModID ModID, std::function<void (Modio::ErrorCode)> Callback)

Archives a mod. This mod will no longer be able to be viewed or retrieved via the SDK, but it will still exist should you choose to restore it at a later date. Archiving is restricted to team managers and administrators only. Note that restoration and permanent deletion of a mod is possible only via web interface.

Requirements

  • authenticated-user
  • initialized-sdk
  • no-rate-limiting

Parameters

ModIDThe mod to be archived.

Error Values

ApiError::InsufficientPermissionThe authenticated user does not have permission to archive this mod. This action is restricted to team managers and administrators only.
GenericError::SDKNotInitializedSDK not initialized
GenericError::BadParameterThe supplied mod ID is invalid
APIError::CannotArchiveModWithDependentsThis mod is a dependency of other mods and as such cannot be archived
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified mod does not exist or was deleted

ListUserCreatedModsAsync

void ListUserCreatedModsAsync(Modio::FilterParams Filter, std::function<void (Modio::ErrorCode, int)> Callback)

Provides a list of mods that the user has submitted, or is a team member for, for the current game, applying the parameters specified in the filter

Requirements

  • authenticated-user
  • initialized-sdk
  • no-rate-limiting

Parameters

FilterModio::FilterParams object containing any filters that should be applied to the query
CallbackCallback invoked with a status code and an optional ModInfoList providing mod profiles

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

GetBaseModInstallationDirectories

int GetBaseModInstallationDirectories()

Returns a list of base mod installation directories. Under normal circumstances, this will return a single directory, which is the base directory that all mods are installed to for the current user.

Requirements

  • initialized-sdk

Returns

List of base mod installation directories

GetDefaultModInstallationDirectory

std::string GetDefaultModInstallationDirectory(Modio::GameID GameID)

Returns the default mod installation directory for this game and platform, ignoring overrides and without requiring the SDK to be initialized.

Parameters

GameIDThe Modio::GameID of the game we're fetching the default mod installation directory for.

Returns

The default mod installation directory for the specified game on the current platform

MuteUserAsync

void MuteUserAsync(Modio::UserID UserID, std::function<void (Modio::ErrorCode)> Callback)

Mute a user. This will prevent mod.io from returning mods authored by the muted user. when performing searches.

Requirements

  • authenticated-user
  • initialized-sdk

Parameters

UserIDID of the User to mute

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
GenericError::BadParameterThe supplied user ID is invalid

UnmuteUserAsync

void UnmuteUserAsync(Modio::UserID UserID, std::function<void (Modio::ErrorCode)> Callback)

Unmute a user. This will allow mod.io to mods authored by the previously muted user. when performing searches.

Requirements

  • authenticated-user
  • initialized-sdk

Parameters

UserIDID of the User to unmute

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
GenericError::BadParameterThe supplied user ID is invalid

GetMutedUsersAsync

void GetMutedUsersAsync(std::function<void (Modio::ErrorCode, int)> Callback)

List all the users that have been muted by the current user.

Requirements

  • authenticated-user
  • initialized-sdk

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user

GetGameInfoAsync

void GetGameInfoAsync(Modio::GameID GameID, std::function<void (Modio::ErrorCode, int)> Callback)

Fetches detailed information about the specified game

Requirements

  • initialized-sdk

Parameters

GameIDGame ID of the game data to fetch
CallbackCallback providing a status code and an optional Modio::GameInfo object to store the games's extended information

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
GenericError::BadParameterThe supplied game ID is invalid
NetworkErrorCouldn't connect to mod.io servers
EntityNotFoundErrorSpecified game does not exist

ListUserGamesAsync

void ListUserGamesAsync(Modio::FilterParams Filter, std::function<void (Modio::ErrorCode, int)> Callback)

Provides a list of games for the current user, that match the parameters specified in the filter

Requirements

  • initialized-sdk
  • no-rate-limiting
  • user-authenticated

Parameters

FilterModio::FilterParams object containing any filters that should be applied to the query
CallbackCallback invoked with a status code and an optional GameInfoList providing game infos

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

GetUserRatingsAsync

void GetUserRatingsAsync(std::function<void (Modio::ErrorCode, int)> Callback)

Provides a list of mod ratings for the current user

Requirements

  • initialized-sdk
  • no-rate-limiting
  • user-authenticated

Parameters

CallbackCallback invoked with a status code and an optional UserRatingList providing ratings for each mod

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers

PurchaseModAsync

void PurchaseModAsync(Modio::ModID ModID, uint64_t ExpectedPrice, std::function<void (Modio::ErrorCode, int)> Callback)

Attempts to purchase a specified mod with an expected price. Purchasing a mod will add a subscription to it

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting

Parameters

ModIDThe ID for the mod the user is trying to purchase
ExpectedPriceThe price that was displayed to the user.
CallbackCallback providing a status code and optional transaction confirmation if the purchase was successful. If the expected price that was displayed to the end user is no longer correct, for example if the price was increased or decreased by the mod creator since the price was displayed, an error will be returned. If this is the case you should refresh your user interface with the updated price and the user can retry the purchase at the new value.

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
GenericError::BadParameterThe supplied mod ID is invalid
NetworkErrorCouldn't connect to mod.io servers
MonetizationErrorProblems during purchase transaction

RefreshUserEntitlementsAsync

void RefreshUserEntitlementsAsync(Modio::EntitlementParams Params, std::function<void (Modio::ErrorCode, int)> Callback)

Requests mod.io consume available entitlements for the current authenticated user purchased through the current portal.

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting

Parameters

ParamsAdditional parameters
CallbackCallback providing an error code indicating success or failure of the refresh operation

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
MonetizationError::RetryEntitlementsSome entitlements could not be verified. Wait some time and try again.
NetworkErrorCouldn't connect to mod.io servers
MonetizationErrorProblems during purchase transaction

FetchUserPurchasesAsync

void FetchUserPurchasesAsync(std::function<void (Modio::ErrorCode)> OnFetchDone)

Fetches a list of all purchases that a User has made. Query the list using QueryUserPurchasedMods after a successful call.

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting

Parameters

OnFetchDoneCallback invoked with a status code for whether the fetch was successful

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
NetworkErrorCouldn't connect to mod.io servers
MonetizationErrorProblems during purchase transaction

QueryUserPurchasedMods

int QueryUserPurchasedMods()

Fetches the locally cached view of the user's purchased mods, populated fromRefreshUserPurchasesAsync

Returns

std::map using Mod IDs as keys and ModInfo objects providing information about the mod that was purchased. mods

GetUserDelegationTokenAsync

void GetUserDelegationTokenAsync(std::function<void (Modio::ErrorCode, std::string)> Callback)

Gets a UserDelegationToken that can be used by a backend serve for S2S functionality.

Requirements

  • initialized-sdk
  • authenticated-user
  • no-rate-limiting

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
NetworkErrorCouldn't connect to mod.io servers
MonetizationErrorProblems during purchase transaction

InitTempModSet

Modio::ErrorCode InitTempModSet(int ModIds)

Initialize a Temp Mod Set, installing every specified mod given in the param if they are not already subbed.

Parameters

ModIdsvector of ModID to install as temp mod

Returns

Modio::ErrorCode indicating if temp mod correctly started

Error Values

GenericError::SDKNotInitializedSDK not initialized
ModManagementError::ModManagementDisabledMod Management need to be enabled

AddToTempModSet

Modio::ErrorCode AddToTempModSet(int ModIds)

Add mods to an already created Temp Mod Session, install every temp mod given in the param if they already subbed or already in Temp Mod Set

Parameters

ModIdsvector of ModID to install as temp mod

Returns

Modio::ErrorCode indicating if temp mod correctly started

Error Values

GenericError::SDKNotInitializedSDK not initialized
ModManagementError::ModManagementDisabledMod Management need to be enabled
ModManagementError::TempModSetNotInitializedTemp Mod Set is not initialize, call InitTempModSet.

RemoveFromTempModSet

Modio::ErrorCode RemoveFromTempModSet(int ModIds)

Delete mods to an already created Temp Mod Session, delete every temp mods given in the param if they already subbed mod, it will not delete them.

Parameters

ModIdsvector of ModID to install as temp mod

Returns

Modio::ErrorCode indicating if temp mod correctly started

Error Values

GenericError::SDKNotInitializedSDK not initialized
ModManagementError::ModManagementDisabledMod Management need to be enabled
ModManagementError::TempModSetNotInitializedTemp Mod Set is not initialize, call InitTempModSet.

CloseTempModSet

Modio::ErrorCode CloseTempModSet()

Close a Temp Mod Session, delete all temp mods

Returns

Modio::ErrorCode indicating if temp mod correctly started

Error Values

GenericError::SDKNotInitializedSDK not initialized
ModManagementError::ModManagementDisabledMod Management need to be enabled
ModManagementError::TempModSetNotInitializedTemp Mod Set is not initialize, call InitTempModSet.

QueryTempModSet

int QueryTempModSet()

Fetches the temp mod added to Temp Mod Set

Returns

std::map using Mod IDs as keys and ModCollectionEntry objects providing information about the mods added to temp mod set

MetricsSessionStartAsync

Premium Feature

This functionality requires the Metrics premium feature. Please contact your mod.io representative for details on how to enable it.

Experimental Feature

This function is part of an experimental feature and is subject to change.

void MetricsSessionStartAsync(Modio::MetricsSessionParams Params, std::function<void (Modio::ErrorCode)> Callback)

Start a Metrics play session

Parameters

ParamsModio::MetricsServiceParams object containing information of what and how to start a metrics session
CallbackCallback providing an error code indicating success or failure of the session start operation

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
MetricsError::SessionNotInitializedMetrics session has not yet been initialized
MetricsError::SessionIsActiveMetrics session is currently active and running
GenericError::BadParameterOne or more values in the Metric Session Parameters are invalid

MetricsSessionSendHeartbeatOnceAsync

Premium Feature

This functionality requires the Metrics premium feature. Please contact your mod.io representative for details on how to enable it.

Experimental Feature

This function is part of an experimental feature and is subject to change.

void MetricsSessionSendHeartbeatOnceAsync(std::function<void (Modio::ErrorCode)> Callback)

Sends a single heartbeat to the mod.io server to indicate a session is still active

Parameters

CallbackCallback providing an error code indicating success or failure of the session heartbeat operation

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
MetricsError::SessionNotInitializedMetrics session has not yet been initialized
MetricsError::SessionIsNotActiveMetrics session is not currently running. Call MetricsSessionStartAsync before attempting to sending a heartbeat.

MetricsSessionSendHeartbeatAtIntervalAsync

Premium Feature

This functionality requires the Metrics premium feature. Please contact your mod.io representative for details on how to enable it.

Experimental Feature

This function is part of an experimental feature and is subject to change.

void MetricsSessionSendHeartbeatAtIntervalAsync(uint32_t IntervalSeconds, std::function<void (Modio::ErrorCode)> Callback)

Sends a constant heartbeat at a given interval to the mod.io server to indicate a session is still active

Parameters

IntervalSecondsThe frequency in seconds to send a heartbeat to the mod.io server
CallbackCallback providing an error code indicating success or failure of the session heartbeat operation

Error Values

GenericError::SDKNotInitializedSDK not initialized
UserDataError::InvalidUserNo authenticated user
MetricsError::SessionNotInitializedMetrics session has not yet been initialized
MetricsError::SessionIsNotActiveMetrics session is not currently running. Call MetricsSessionStartAsync before attempting to sending a heartbeat.

MetricsSessionEndAsync

Premium Feature

This functionality requires the Metrics premium feature. Please contact your mod.io representative for details on how to enable it.

Experimental Feature

This function is part of an experimental feature and is subject to change.

void MetricsSessionEndAsync(std::function<void (Modio::ErrorCode)> Callback)

Ends a Metrics play session

Parameters

CallbackCallback providing an error code indicating success or failure of the session end operation

Error Values

GenericError::SDKNotInitializedSDK not initialized
HttpError::RateLimitedToo many frequent calls to the API. Wait some time and try again.
UserDataError::InvalidUserNo authenticated user
MetricsError::SessionNotInitializedMetrics session has not yet been initialized
MetricsError::SessionIsNotActiveMetrics session is not currently running. Call MetricsSessionStartAsync before attempting to end a session.

Classes

ErrorCode

Trivial wrapper around link:https://en.cppreference.com/w/cpp/error/error_code[std::error_code]. Implemented as a class instead of a type alias to allow it to be forward-declared in wrappers, eg the UE4 plugin.

Functions

ErrorCode
ErrorCode(std::error_code ec)

Error code constructor using std::error_code

ErrorCode
ErrorCode()

Error code constructor using an empty value

FlagImpl

Helper class to strongly type bitfield operations

Functions

Variables

intInternal

List

Templated helper class to wrap a dynamic collection of elements

Functions

GetRawList
const ListType &GetRawList() const

Retrieve the raw list as a const reference

GetRawList
ListType &GetRawList()

Retrieve the raw list as a reference

Size
std::size_t Size() const

Retrieve the size of the internal list

Variables

ListTypeInternalList

YoutubeURLList

A URLList subclass to match Youtube urls

SketchfabURLList

A URLList subclass to match Sketchfab urls

GalleryList

List subclass to contain, compare and transform images

CreateModFileParams

Class specifying the parameters to submit when creating a mod file

Variables

std::stringRootDirectoryPath to a directory to treat as the root of the mod. The SDK will compress all contents of this folder into a .zip archive, with a relative path based on this directory. This directory will not be created itself, the contents will exist at the top level of the archive.
intVersionOptional version string for this modfile release
intChangelogOptional changelog string for this modfile release
intbSetAsActiveShould this mod be set as active/latest release? Defaults to true if not set.
intMetadataBlobOptional metadata blob for this mod
intMetadataKvpOptional key-value-pair metadata for this mod
intPlatformsOptional vector of platforms for this modfile

CreateModParams

Class specifying the parameters to submit when creating a mod

Variables

std::stringPathToLogoFilePath to the logo for the mod. Must point to a valid file on disk or the mod will not be created on the server.
std::stringNameThe name of the mod
std::stringSummaryA brief summary of what the mod is
intNamePathOptional override for the name 'slug' in the mod's URL
intVisibilityOptional override for the mod's visibility status. Defaults to Public (1)
intDescriptionOptional long description of the mod
intHomepageURLOptional URL to the mod's homepage. Must be a valid URL
intStockOptional quantity limit on the mod
intMaturityRatingBitwise mask of flags indicating mature content
intCommunityOptionsCommunity options for the mod
intMetadataBlobOptional metadata blob for this mod
intMetadataKvpOptional key-value-pair metadata for this mod
intTagsOptional list of mod tags. All tags must be supported by the parent game to be applied

EditModParams

Class specifying fields to update for a mod

Variables

intNameThe name of the mod
intSummaryA brief summary of what the mod is
intNamePathOptional override for the name 'slug' in the mod's URL
intVisibilityOptional override for the mod's visibility status. Defaults to Public (1)
intDescriptionOptional long description of the mod
intHomepageURLOptional URL to the mod's homepage. Must be a valid URL
intMaturityRatingBitwise mask of flags indicating mature content
intCommunityOptionsCommunity options for the mod
intMetadataBlobOptional metadata blob for this mod
intMetadataKvpOptional key-value-pair metadata for this mod
intLogoPathOptional path to a new logo image
intTagsOptional tags vector for this mod

FilterParams

Class storing a set of filter parameters for use in xref:Modio::ListAllModsAsync[]

Enums

SortFieldType

Enum indicating which field should be used to sort the results.

Values
ID0
DownloadsToday1
SubscriberCount2
Rating3
DateMarkedLive4
DateUpdated5
DownloadsTotal6
Alphabetical7
SortDirection

Enum indicating which direction sorting should be applied

Values
Ascending0
Descending1
RevenueFilterType

Enum indicating filtering options based off revenue type

Values
Free0
Paid1
FreeAndPaid2

Functions

SortBy
FilterParams &SortBy(SortFieldType ByField, SortDirection ByDirection)

Indicates results should be sorted using the specified field and direction

Parameters
ByFieldField to sort with
ByDirectionDirection to sort
Returns

*this

NameContains
FilterParams &NameContains(std::string SearchString)

Only include mods where the name contains the provided string

Parameters
SearchStringSearch string
Returns

*this

NameContains
FilterParams &NameContains(const int &SearchString)

Only include mods where the name contains at least one of the provided strings (string1 OR string2 OR stringN...)

Parameters
SearchStringFirst search string
Returns

*this

MatchingAuthor
FilterParams &MatchingAuthor(const Modio::UserID &UserId)

Only include mods with the specified author User ID

Parameters
UserIdThe User ID to filter on
Returns

*this

MatchingAuthors
FilterParams &MatchingAuthors(const int &UserIds)

Only include mods with the specified author User IDs

Parameters
UserIdsThe list of User IDs to filter on
Returns

*this

MatchingIDs
FilterParams &MatchingIDs(const int &IDSet)

Only include mods with the specified IDs

Parameters
IDSetThe list of Mod IDs to filter on
Returns

*this

ExcludingIDs
FilterParams &ExcludingIDs(const int &IDSet)

Exclude mods with the specified IDs. This takes precedence over MatchingIDs.

Parameters
IDSetThe list of Mod IDs to exclude
Returns

*this

MarkedLiveAfter
FilterParams &MarkedLiveAfter(int LiveAfter)

Only include mods that were marked live (i.e released) after the specified date

Parameters
LiveAfterMinimum date
Returns

*this

MarkedLiveBefore
FilterParams &MarkedLiveBefore(int LiveBefore)

Only include mods that were marked live (i.e released) before the specified date

Parameters
LiveBeforeMaximum date
Returns

*this

WithTags
FilterParams &WithTags(std::string Tag)

Only include mods that have the specified tag

Parameters
TagTag to include
Returns

*this

WithTags
FilterParams &WithTags(int NewTags)

Only include mods that have all the specified tags (tag1 AND tag2 AND tagN...)

Parameters
NewTagsThe set of tags to filter on
Returns

*this

WithoutTags
FilterParams &WithoutTags(std::string Tag)

Only include mods that do not have the specified tag

Parameters
TagTag to exclude
Returns

*this

WithoutTags
FilterParams &WithoutTags(int NewTags)

Only include mods that do not have any of the specified tags ( NOT (tag1 OR tag2 OR tagN...))

Parameters
NewTagsTags to exclude
Returns

*this

MetadataLike
FilterParams &MetadataLike(std::string SearchString)

Only include mods that contain a metadata blob that contains the specified string

Parameters
SearchStringString to search for
Returns

*this

IndexedResults
FilterParams &IndexedResults(std::size_t StartIndex, std::size_t ResultCount)

Returns a sub-range of query results from StartIndex to StartIndex + ResultCount

Parameters
StartIndexZero-based index of first result to return
ResultCountNumber of results to return
Returns

*this

PagedResults
FilterParams &PagedResults(std::size_t PageNumber, std::size_t PageSize)

Returns a sub-range of query results based on a specified page size and index

Parameters
PageNumberZero-based index of page to return
PageSizeNumber of results in a page
Returns

*this

RevenueType
FilterParams &RevenueType(RevenueFilterType ByRevenue)

Indicates results should be filtered by revenue options

Parameters
ByRevenueRevenue filter to use
Returns

*this

DisallowMatureContent
FilterParams &DisallowMatureContent()

Indicates results should exclude all mods which contain mature content

Returns

*this

WithMatureContentFlags
FilterParams &WithMatureContentFlags(Modio::MaturityOption ByMaturity)

Indicates results should be filtered by maturity options

Parameters
ByMaturityMaturity flags to filter by
Returns

*this

FilterParams
FilterParams()

Default FilterParams constructor. Sorts by mod ID in ascending order and returns 100 results (the maximum allowed by the REST API).

Variables

SortFieldTypeSortField
SortDirectionDirection
intAuthorUserIds
intSearchKeywords
intDateRangeBegin
intDateRangeEnd
intTags
intExcludedTags
intIncludedIDs
intExcludedIDs
intRevenue
intMaturity
intMetadataBlobSearchString
_BoolIsPaged
std::size_tIndex
std::size_tCount

PagedResult

Base class for all types that represent a page from a set of results

Functions

GetPageCount
inline std::int32_t GetPageCount() const

Get the PageCount

GetPageIndex
inline std::int32_t GetPageIndex() const

Get the PageIndex

GetPageSize
inline std::int32_t GetPageSize() const

Get the PageSize

GetTotalResultCount
inline std::int32_t GetTotalResultCount() const

Get the TotalResultCount

GetResultCount
inline std::int32_t GetResultCount() const

Get the ResultCount

Variables

std::int32_tPageIndex
std::int32_tPageSize
std::int32_tPageCount
std::int32_tTotalResultCount
std::int32_tResultCount

ModInfoList

Class representing a list of mods that may be a page from a larger set of results

Functions

Append
void Append(const ModInfoList &Other)

Insert ModInfoList to the end of this list

Append
void Append(const ModInfo &ModInfoData)

Insert a ModInfo to the end of this list

ModCollectionEntry

Class representing a mod which is installed locally

Functions

Variables

Modio::ModIDIDThe ID of the mod
std::atomic<Modio::ModState>CurrentStateThe status of the mod, is it pending installation, is it installed but needing an update, etc
intRollbackState
ModInfoModProfileMod descriptor from the REST API
std::atomic<uint8_t>LocalUserSubscriptionCountReference counting to allow automatic uninstallation of unused local mods
intLocalUserSubscriptions
std::stringPathOnDisk
Modio::FileSizeSizeOnDisk
std::atomic<_Bool>ShouldNotRetryflag if this mod should not be processed because it encountered an unrecoverable error during installation/update. This should not be saved to disk as we will more than likely want to retry next session
Modio::ErrorCodeNeverRetryReason
Modio::ErrorCodeLastErrorCode
uint8_tRetriesRemainingThisSession

ModProgressInfo

Class representing the progress of a mod installation or update

Enums

EModProgressState

Enum representing which state the currently processing mod is in

Values
Initializing0
Downloading1
Extracting2
Compressing3
Uploading4

Functions

GetCurrentState
EModProgressState GetCurrentState() const

Retrieves the state of the currently processing mod

Returns

Enum value indicating the current state

GetCurrentProgress
Modio::FileSize GetCurrentProgress(EModProgressState State) const

Retrieves the progress value for the specified state. CurrentProgress == TotalProgress for states which have completed, for example if a mod is currently Extracting, then passing in Downloading would give you a value equal to the total download size

Parameters
Statewhich state to query progress information for
Returns

Modio::FileSize for current progress in bytes

GetTotalProgress
Modio::FileSize GetTotalProgress(EModProgressState State) const

Retrieves the total amount of progress required for the specified state.

Parameters
Statewhich state to query total progress for
Returns

Modio::FileSize for total progress in bytes

Variables

Modio::ModIDIDThe mod ID of the mod being processed

UserSubscriptionList

Class containing the mod IDs the current user is subscribed to

Enums

ChangeType

Enum indicating if a mod was added or removed when calculating the difference of two user subscription lists

Values
Added0
Removed1
Updated2

Functions

ModEventLog

Container of events directly related to a ModID, in particular any error occurred during execution

Functions

AddEntry
void AddEntry(Modio::ModManagementEvent Entry)

Adds a new entry to the event log. If a given mod ID has an existing entry, this replaces it, effectively updating it.

Parameters
EntryThe entry to add
UpdateStatusCode
void UpdateStatusCode(Modio::ModID ID, Modio::ErrorCode ec)

Updates the error/status code for a given Mod ID in the log

Parameters
IDThe mod to update
ecThe new status code
ClearLog
inline int ClearLog()

Clears the log of events

Returns

All entries in the log at the time ClearLog was called

Variables

intInternalData

ModDependencyList

Container for a collection of ModDependency objects

Functions

AppendUnique
void AppendUnique(const ModDependencyList &Other)

Insert the unique contents of a ModDependencyList to the end of this list

AppendUnique
void AppendUnique(const ModDependency &ModDependencyData)

Insert a unique ModDependency to the end of this list

Variables

std::uint64_tTotalFilesizeTotal size of all the dependency files in bytes.
std::uint64_tTotalFilesizeUncompressedTotal Size of the uncompressed dependency files in bytes.

ReportParams

EntitlementConsumptionStatusList

Class representing a list of mods that may be a page from a larger set of results

Functions

Append
void Append(const EntitlementConsumptionStatusList &Other)

Insert ModioEntitlementConsumptionStatusList to the end of this list

Append
void Append(const EntitlementConsumptionStatus &EntitlementConsumptionStatusData)

Insert a ModioEntitlementConsumptionStatus to the end of this list

EntitlementsThatRequireRetry
int EntitlementsThatRequireRetry() const

Filter elements that require a second request to confirm the entitlement

Returns

Optional list with the elements that need a retry, otherwise an empty object.

Variables

intWalletBalanceUpdated wallet balance from syncing entitlements

ModTagOptions

Container for a collection of ModTagInfo objects

GameInfoList

Class representing a list of games that may be a page from a larger set of results

Functions

Append
void Append(const GameInfoList &Other)

Insert GameInfoList to the end of this list

Append
void Append(const GameInfo &GameInfoData)

Insert a GameInfo to the end of this list

ModDetails

Collection of FileMetadata objects representing mod file updates

UserList

Class representing a list of users

Functions

Append
void Append(const UserList &Other)

Insert UserList to the end of this list

Append
void Append(const User &UserData)

Insert a User to the end of this list

Structs

StrongInteger

Strong integer type to prevent accidental function parameter reordering and prevent unwanted implicit conversions

Functions

StrongInteger<UnderlyingIntegerType>
constexpr explicit StrongInteger<UnderlyingIntegerType>(UnderlyingIntegerType Value)

explicit constructor from a value of the underlying integer type

Parameters
Valueinitial value

Variables

EmailAuthCode

Strong type representing an email authentication code sent to a user email address

Functions

EmailAuthCode
explicit EmailAuthCode(const std::string &Code)

Explicit constructor

Parameters
CodeThe code sent to the user's email

Variables

std::stringInternalCode

EmailAddress

Strong type representing an email address

Functions

EmailAddress
explicit EmailAddress(const std::string &Code)

Explicit constructor

Parameters
CodeThe code sent to the user's email

Variables

std::stringInternalAddress

ApiKey

Strong type representing an api key

Functions

ApiKey
explicit ApiKey(const std::string &InApiKey)

Explicit constructor

Parameters
InApiKeyThe code sent to the user's email

Variables

std::stringInternalApiKey

UserID

Strong type for User IDs

Functions

ModID

Strong type for Mod IDs

Functions

FileMetadataID

Strong type for File Metadata IDs

CommentID

Strong type for Comment ID

MediaFileID

Strong type for Media File ID

FileOffset

Strong type for file offsets

FileSize

Strong type for file sizes

GameID

Strong type for a game ID

Functions

{#}

Strong type representing a Guid as 16byte binary value

Functions

Variables

Guid

Strong type representing a Guid

Functions

GenerateGuid
static Guid GenerateGuid()

Generates a new Guid. NOTE: This is a minimalistic implementation of generating a Guid for metrics, an improved more robust per-platform implementation is planned

Guid
explicit Guid(const std::string &InGuid)

Explicit constructor

Parameters
InGuidstring based Guid
Guid
explicit Guid(const Modio::GuidV4 &InGuid)

Explicit constructor

Parameters
InGuidraw 128bit Guid

Variables

std::stringInternalGuid

ModCreationHandle

Strong type wrapping a handle to an as-yet-uncreated mod

AuthenticationParams

Simple struct to encapsulate data passed to external authentication systems

Variables

std::stringAuthTokenAuthToken String received by an authentication provider, that later is used to verify a user on the mod.io API
intUserEmailUserEmail Optional string that associates an email with a user
_BoolbUserHasAcceptedTermsbUserHasAcceptedTerms Boolean value that signals when a user has accepted the mod.io Terms of Service. True when they are accepted, false otherwise.
_BoolbURLEncodeAuthTokenbURLEncodeAuthToken Boolean value to let the SDK know if the AuthToken requires URL encoding before sending the string to the mod.io API. By default, it would not perform URL encoding.
intExtendedParametersExtendedParameters A map to store extended parameters required by some providers.

FieldError

Simple struct representing a validation error from the REST API

Variables

std::stringFieldString description of the field failing validation
std::stringErrorString containing the reason for the validation failure

EntitlementParams

Simple struct to encapsulate portal-specific data required when consuming entitlements

Variables

intExtendedParametersExtendedParameters A map to store extended parameters required by some portals.

MetricsSessionParams

Simple struct to store metric session specific parameters for use in xref:Modio::MetricsSessionStartAsync[]

Variables

intSessionIdSet a custom Session Id to be used in the metrics service for your session
intModIdsIncludes mods which will be tracked as part of the metrics service

StorageInfo

Structure containing storage usage information including availability and consumption

Functions

GetSpace
Modio::FileSize GetSpace(Modio::StorageLocation Location, Modio::StorageUsage Usage) const

Returns the recorded storage space for a given storage location and usage type

Parameters
LocationWhere the storage has been written to
UsageThe type of storage usage recorded
Returns

Modio::FileSize for total storage space in bytes

GetQuota
static int GetQuota(Modio::StorageLocation Location)

Get the storage quota for a given Modio::StorageLocation if one has been set.

Parameters
LocationThe type of storage to get the quota for.
Returns

Modio::Optional<Modio::FileSize> of the storage quota in bytes for the specified Modio::StorageLocation. Empty if no quota is set.

Variables

FileMetadata

Metadata for a release archive for a mod

Enums

VirusScanStatus

Enum related to the Virus scan status of a file

Values
NotScanned0
ScanComplete1
InProgress2
TooLargeToScan3
FileNotFound4
ErrorScanning5
VirusStatus

Enum related to the Virus status of a file

Values
NoThreat0
Malicious1
PotentiallyHarmful2

Variables

Modio::FileMetadataIDMetadataIdUnique modfile id.
Modio::ModIDModIdUnique mod id.
std::int64_tDateAddedUnix timestamp of date file was added.
VirusScanStatusCurrentVirusScanStatusCurrent virus scan status of the file. For newly added files that have yet to be scanned this field will change frequently until a scan is complete
VirusStatusCurrentVirusStatusWas a virus detected?
std::uint64_tFilesizeSize of the file in bytes.
std::uint64_tFilesizeUncompressedSize of the uncompressed file in bytes.
std::stringFilenameFilename including extension.
std::stringVersionRelease version this file represents.
std::stringChangelogChangelog for the file.
std::stringMetadataBlobMetadata stored by the game developer for this file.
std::stringDownloadBinaryURLModfile download URL
std::int64_tDownloadExpiryDateModfile download expiry date

ModCommunityOptionsFlags

A strong type flag object to represent ModCommunityOptions

Functions

ModStats

Contains download stats and ratings for a mod

Variables

std::int64_tPopularityRankPositionCurrent rank of the mod.
std::int64_tPopularityRankTotalModsNumber of ranking spots the current rank is measured against.
std::int64_tDownloadsTotalNumber of total mod downloads.
std::int64_tSubscribersTotalNumber of total users who have subscribed to the mod.
std::int64_tRatingTotalNumber of times this mod has been rated.
std::int64_tRatingPositiveNumber of positive ratings.
std::int64_tRatingNegativeNumber of negative ratings.
std::int64_tRatingPercentagePositiveNumber of positive ratings, divided by the total ratings to determine it’s percentage score.
doubleRatingWeightedAggregateOverall rating of this item calculated using the Wilson score confidence interval. This column is good to sort on, as it will order items based on number of ratings and will place items with many positive ratings above those with a higher score but fewer ratings.
std::stringRatingDisplayTextTextual representation of the rating in format: Overwhelmingly Positive -> Very Positive -> Positive -> Mostly Positive -> Mixed -> Negative -> Mostly Negative -> Very Negative -> Overwhelmingly Negative -> Unrated

ProfileMaturity

A strong type flag object to represent MaturityOption from a mod.io info. * Maturity options flagged by the mod developer, this is only relevant if the parent game allows mods to * be labeled as mature. The value of this field will default to "Maturity Option None" unless the parent * game allows to flag mature content.

Functions

User

Object representing a mod.io user profile

Variables

Modio::UserIDUserIdUnique id for the user
std::stringUsernameUsername of the user
intAuthTokenAuthentification token of the user
std::int64_tDateOnlineUnix timestamp the user was last online
std::stringProfileUrlURL of the user's mod.io profile
Modio::Detail::AvatarAvatarCached information about the user's avatar
std::stringDisplayNamePortalThe display name of the User for the given Portal that the mod search is coming from * ie if the Portal is PSN, then this is the owning user's PSN profile name if accounts are linked.

ModTag

Strong type for a ModTag

Variables

std::stringTag
std::stringTagLocalized

Metadata

Key-Value pair that represents a mod metadata

Variables

ModInfo

Full mod profile including current release information, media links, and stats

Variables

Modio::ModIDModIdUnique Mod ID
std::stringProfileNameName of the mod
std::stringProfileSummarySummary of the mod
std::stringProfileDescriptionDetailed description in HTML format
std::stringProfileDescriptionPlaintextDetailed description in plaintext
std::stringProfileURLURL to the mod profile
Modio::UserProfileSubmittedByInformation on the user who submitted the mod
std::int64_tProfileDateAddedUnix timestamp of the date the mod was registered
std::int64_tProfileDateUpdatedUnix timestamp of the date the mod was updated
std::int64_tProfileDateLiveUnix timestamp of the date the mod was marked live
Modio::ProfileMaturityProfileMaturityOptionObject representing a mod.io user profile * Maturity options flagged by the mod developer, this is only relevant if the parent game allows mods to * be labeled as mature. The value of this field will default to None unless the parent game allows * to flag mature content.
Modio::ModCommunityOptionsFlagsCommunityOptionsCommunity options for the mod
std::stringMetadataBlobMetadata stored by the game developer.
intFileInfoInformation about the mod's most recent public release
intMetadataKvpArbitrary key-value metadata set for this mod
intTagsTags this mod has set
std::size_tNumGalleryImagesNumber of images in the mod's media gallery
Modio::GalleryListGalleryImagesList of images in the mod's media gallery
Modio::YoutubeURLListYoutubeURLsList of youtube links provided by the creator of the mod
Modio::SketchfabURLListSketchfabURLsList of sketchfab links provided by the creator of the mod
Modio::ModStatsStatsStats and rating information for the mod
Modio::Detail::LogoModLogoMedia data related to the mod logo
std::stringVersionThe current ModInfo version. This property is updated when changes to the class happen. This is NOT the version of the mod itself. Mod versioning is tied to FileInfo, not ModInfo.
Modio::ModServerSideStatusModStatusThe current ModStatus on the server: Accepted, NotAccepted, or Deleted.
Modio::ObjectVisibilityVisibilityThe visibility status of the mod, default to Public
uint64_tPricePrice of this mod
_BoolDependenciesIf this mod has any direct dependencies

InitializeOptions

Structure with all initialization parameters needed to start the API, all need to be filled in for the SDK to properly initialize

Functions

InitializeOptions
InitializeOptions()

Default constructor that sets all variables to an invalid base value

InitializeOptions
explicit InitializeOptions(Modio::GameID GameID, Modio::ApiKey APIKey, Modio::Environment GameEnvironment, Modio::Portal PortalInUse, Modio::UserHandleType LocalSessionIdentifier)

Explicit and preferred constructor with the necessary variables to store

Parameters
GameIDThe mod.io provided ID to identify the game
APIKeyThe mod.io provided key associated with the game
GameEnvironmentThe mod.io environment to use, listed in the enumeration Modio::Environment
PortalInUseThe service portal to use, listed in the enumeration Modio::Portal
LocalSessionIdentifierA unique identifier for the local session. This local session can have a single mod.io user account associated with it.

Variables

Modio::GameIDGameIDThe mod.io-provided ID for the game.
Modio::ApiKeyAPIKeyThe mod.io-provided API key for your application or game.
Modio::UserHandleTypeUserUnique identifier for the local session, which will optionally contain user data for an authenticated mod.io user (once authentication is completed).
Modio::PortalPortalInUseThe storefront or distribution method to use. The API uses this parameter to serve platform-compliant user names. Use Modio::Portal::None if your title does not require this.
Modio::EnvironmentGameEnvironmentThe mod.io environment you want to run the SDK on.
intExtendedParametersPlatform-specific extended initialization parameters. See xref:Platform-specific Notes[] for more information regarding any special values your platform requires or supports.

ModManagementEvent

Simple struct representing the outcome of a mod management operation

Enums

EventType

What type of event occurred

Values
BeginInstall0
Installed1
BeginUninstall2
Uninstalled3
BeginUpdate4
Updated5
BeginUpload6
Uploaded7

Functions

Variables

Modio::ModIDIDID for the mod that the event occurred on
EventTypeEventWhat type of event occurred
Modio::ErrorCodeStatusEmpty if operation completed successfully, truthy/contains error code if operation failed

ModDependency

Simple struct containing simplified information about a mod which is a dependency of another mod

Variables

Modio::ModIDModIDUnique mod id.
std::stringModNameName of the mod
std::int64_tDateAddedUnix timestamp of the date the mod was registered
std::int64_tDateUpdatedUnix timestamp of the date the mod was updated
std::uint8_tDependencyDepthThe level at which this dependency sits. When greater than zero (0), it means that this dependency relies on additional dependencies.
Modio::Detail::LogoLogoMedia data related to the mod logo
intFileInfoInformation about the mod's most recent public release
Modio::ModServerSideStatusStatusThe current ModStatus on the server: Accepted, NotAccepted, or Deleted.
Modio::ObjectVisibilityVisibilityThe visibility status of the mod, default to Public

EntitlementConsumptionVirtualCurrencyDetails

Further details about a Virtual Currency entitlement that was consumed

Variables

intTokensAllocatedAmount of tokens that were issued for this specific entitlement consumption

EntitlementConsumptionStatus

The result of an entitlement's consumption

Functions

EntitlementRequiresRetry
bool EntitlementRequiresRetry() const

Ask the entitlement if it needs to sync with the endpoint given that it has not been consumed and the transaction state is failed or pending.

Returns

True when the entitlement needs to sync with the API. Otherwise false

Variables

std::stringTransactionIdID of the transaction to redeem this entitlement
Modio::EntitlementConsumptionStateTransactionStateState of the transaction
std::stringSkuIdID of the SKU that we attempted to consume
_BoolEntitlementConsumedWhether this entitlement was consumed or not
Modio::EntitlementTypeEntitlementTypeType of Entitlement that was consumed
Modio::EntitlementConsumptionVirtualCurrencyDetailsVirtualCurrencyDetailsDetails about

EntitlementWalletBalance

Updated wallet balance from the sync entitlements call

Variables

uint64_tBalance

GameStats

Contains download stats for a game

Variables

Modio::GameIDGameIDUnique game id
std::int64_tModCountTotalAvailable mod count for the game
std::int64_tModDownloadsTodayMods downloaded today for the game
std::int64_tModDownloadsTotalTotal Mods downloaded for the game
std::int64_tModDownloadsDailyAverageAverage mods downloaded on a daily basis
std::int64_tModSubscribersTotalNumber of total users who have subscribed to the mods for the game
std::int64_tDateExpiresUnix timestamp until this game's statistics are considered stale

ModTagLocalizationData

Localization data for a tag value

Variables

std::stringTagThe original raw unlocalized tag value used by the REST API
intTranslationsCulture code -> Localized tag value string mapping for all configured languages.

LocalizedTagCategory

Struct containing pre-localized display strings for a tag group

Variables

std::stringGroupNameLocalized display string for this tag category's name
intTagsLocalized display strings for all valid values in this tag category

ModTagInfo

Metadata about a group of tags that can be used for filtering mods

Functions

Variables

std::stringTagGroupNameRaw unlocalized tag group name
intTagGroupValuesValid raw unlocalized tag values this group contains
intTagGroupNameLocDataCulture code -> localized tag category name mapping for all configured languages
intTagGroupValueLocDataLocalization data for this tag category's values in all configured languages
_BoolbAllowMultipleSelectionTrue if multiple tags from the group can be used simultaneously
_BoolbHiddenTrue if only visible by admins
_BoolbLockedTrue if only editable by admins
std::stringLocalethe culture code for the mod.io locale at the time the mod.io API returned this data

GameCommunityOptionsFlags

A strong type flag object to represent GameCommunityOptions from a mod.io info.

Functions

GameMaturityOptionsFlags

A strong type flag object to represent GameMaturityOptions from a mod.io info.

Functions

GameMonetization

A strong type flag object to represent GameMonetizationOptions from a mod.io info.

Functions

GamePlatform

Details about a platform that this game supports

Variables

Modio::ModfilePlatformPlatformPlatform that the game supports
_BoolLockedWhether or not this platform is Locked from having files submitted to it
_BoolModeratedWhether or not files submitted for this platform are required to go through moderation

HeaderImage

Contains media URLs to the preview header image for the game

Variables

std::stringFilename
std::stringOriginal

OtherUrl

Creator defined URLs to share

Variables

Theme

Theme color values for the game

Variables

GameInfo

Details about a game

Variables

Modio::GameIDGameIDUnique Game ID
std::int64_tDateAddedUnix timestamp of date game was registered
std::int64_tDateUpdatedUnix timestamp of date game was updated
std::int64_tDateLiveUnix timestamp of date game was set live
std::stringUgcNameWord used to describe user-generated content (mods, items, addons etc)
Modio::Detail::IconIconContains media URLs to the icon for the game
Modio::Detail::LogoLogoContains media URLs to the logo for the game
Modio::HeaderImageHeaderImageContains media URLs to the preview header image for the game
std::stringNameName of the game
std::stringSummarySummary of the game's mod support
std::stringInstructionsA guide about creating and uploading mods for this game to mod.io
std::stringInstructionsUrlLink to a mod.io guide, modding wiki, or a page where modders can learn how to make and submit mods to this game's profile
std::stringProfileUrlURL to the game
Modio::ThemeThemeTheme color values for the game
Modio::GameStatsStatsNumerous aggregate stats for the game
intOtherUrlsCreator defined URLs to share
intPlatformSupportPlatforms supported by this title
Modio::GameCommunityOptionsFlagsCommunityOptionsCommunity options for the game
Modio::GameMonetizationGameMonetizationOptionsMonetization options for the game
Modio::GameMaturityOptionsFlagsMaturityOptionsMaturity options for the game
std::stringVirtualTokenNameName of the Virtual Tokens for this game
intTagOptionsTags for this game

UserRatingList

Object representing a mod.io user's ratings

Functions

Append
void Append(const UserRatingList &Other)

Insert ModInfoList to the end of this list

Append
void Append(const UserRating &UserRatingData)

Insert a ModInfo to the end of this list

Terms

This struct contains strings that should be displayed to a user when displaying the terms of use and offering to create a mod.io account

Variables

struct TermsButtonsButtons
struct TermsLinksLinks
std::stringTermsTextThe plaintext version of the mod.io terms of use

TransactionRecord

Contains information about a successful transaction for a mod

Variables

Modio::ModIDAssociatedModIDThe mod the purchase was for
uint64_tPriceThe price the mod was purchased for
uint64_tUpdatedUserWalletBalanceThe updated balance in the user's wallet after the transaction
Modio::ModInfoModModInfo of the mod that was purchase and subscribed to

Enums

Environment

Enum representing what environment your game is deployed in

Values

Test0
Live1

Portal

Enum representing the store or service your game is being distributed through

Values

None0
Apple1
EpicGamesStore2
GOG3
Google4
Itchio5
Nintendo6
PSN7
Steam8
XboxLive9
Meta10

ModfilePlatform

Enum representing the platform(s) that a modfile is enabled for

Values

Windows0
Mac1
Linux2
Android3
iOS4
XboxOne5
XboxSeriesX6
PS47
PS58
Switch9
Oculus10
Source11

LogoSize

Enum representing mod logo sizes

Values

Original0
Thumb3201
Thumb6402
Thumb12803

IconSize

Enum representing game icon sizes

Values

Original0
Thumb641
Thumb1282
Thumb2563

AvatarSize

Enum representing avatar image sizes

Values

Original0
Thumb501
Thumb1002

GallerySize

Enum representing an image gallery size

Values

Original0
Thumb3201
Thumb12802

Language

Enum representing the languages mod.io support responses in

Values

English0
Bulgarian1
French2
German3
Italian4
Polish5
Portuguese6
Hungarian7
Japanese8
Korean9
Russian10
Spanish11
SpanishLatinAmerican12
Thai13
ChineseSimplified14
ChineseTraditional15
Turkish16
Ukrainian17
Arabic18

AuthenticationProvider

Simple struct to encapsulate data passed to external authentication systems

Values

XboxLive0
Steam1
GoG2
Itch3
Switch4
Discord5
PSN6
Oculus7
Epic8
OpenID9
Apple10
GoogleIDToken11
GoogleServerSideToken12

LogLevel

Degree of severity for the log output

Values

Trace0
Detailed1
Info2
Warning3
Error4

LogCategory

The category of the log message (usually the internal service the message is originating from)

Values

Core0
File1
Http2
Compression3
User4
ModManagement5
Test6
System7
ModMetrics8

Rating

A rating for a mod.

Values

Neutral0
Positive1
Negative-1

ObjectVisibility

The visibility of a mod.

Values

Hidden0
Public1

PlatformStatus

File approval status to filter by. Passed in ExtendedInitializationParameters for the duration of a session.

Values

LiveAndPending0
PendingOnly1
ApprovedOnly2

StorageLocation

Where the storage has been written to

Values

Local0
Cache1

StorageUsage

The type of storage usage

Values

Consumed0
Available1

ModCommunityOptions

Community options for a game * 0 = None set (default) * 1 = Comments are enabled * 64 = Enable Previews * 128 = Enable Preview URLs * 1024 = Allow mod dependencies

Values

None0
EnableComments1
EnablePreviews64
EnablePreviewURLs128
AllowDependencies1024

MaturityOption

Maturity types classification according to the mod.io API * 0 = None set (default) * 1 = Alcohol * 2 = Drugs * 4 = Violence * 8 = Explicit

Values

None0
Alcohol1
Drugs2
Violence4
Explicit8

ModServerSideStatus

Possible status as received from the server

Values

NotAccepted0
Accepted1
Deleted3

HttpError

Values

CannotOpenConnection20481
DownloadNotPermitted20482
ExcessiveRedirects20483
HttpAlreadyInitialized20484
HttpNotInitialized20485
InsufficientPermissions20486
InvalidResponse20487
RateLimited20488
RequestError20489
ResourceNotAvailable20490
SecurityConfigurationInvalid20491
ServerClosedConnection20492
ServerUnavailable20493
ServersOverloaded20494

FilesystemError

Values

DirectoryNotEmpty20737
DirectoryNotFound20738
FileLocked20739
FileNotFound20740
InsufficientSpace20741
NoPermission20742
PathTooLong20743
ReadError20744
UnableToCreateFile20745
UnableToCreateFolder20746
WriteError20747

UserAuthError

Values

AlreadyAuthenticated20993
EmailLoginCodeExpired20994
EmailLoginCodeInvalid20995
NoAuthToken20996
StatusAuthTokenInvalid20997
StatusAuthTokenMissing20998
UnableToInitStorage20999

UserDataError

Values

BlobMissing21249
InvalidUser21250

ArchiveError

Values

InvalidHeader21505
UnsupportedCompression21506

GenericError

Values

BadParameter21761
CouldNotCreateHandle21762
EndOfFile21763
IndexOutOfRange21764
NoDataAvailable21765
OperationCanceled21766
OperationError21767
QueueClosed21768
RequestInProgress21769
SDKAlreadyInitialized21770
SDKNotInitialized21771

SystemError

Values

UnknownSystemError22017

ZlibError

Values

EndOfStream22273
IncompleteLengthSet22274
InvalidBitLengthRepeat22275
InvalidBlockType22276
InvalidCodeLengths22277
InvalidDistance22278
InvalidDistanceCode22279
InvalidLiteralLength22280
InvalidStoredLength22281
MissingEOB22282
NeedBuffers22283
OverSubscribedLength22284
StreamError22285
TooManySymbols22286

ModManagementError

Values

AlreadySubscribed22529
InstallOrUpdateCancelled22530
ModBeingProcessed22531
ModManagementAlreadyEnabled22532
ModManagementDisabled22533
NoPendingWork22534
TempModSetNotInitialized22535
UploadCancelled22536

ModValidationError

Values

ModDirectoryNotFound22785
NoFilesFoundForMod22786

MonetizationError

Values

DisplayPriceIncorrect23041
GameMonetizationNotEnabled23042
IncorrectDisplayPrice23043
InsufficientFunds23044
ItemAlreadyOwned23045
MonetizationAuthenticationFailed23046
PaymentFailed23047
RetryEntitlements23048
UserMonetizationDisabled23049
UserMonetizationNotConfigured23050
WalletFetchFailed23051

ParentalControlRestriction

Values

ParentalControlRestriction23297

MetricsError

Values

NoModsInSession23553
SessionAlreadyInitialized23554
SessionIsActive23555
SessionIsNotActive23556
SessionNotInitialized23557

PremiumFeaturesError

Values

FeatureNotEnabled23809

ApiError

Values

APIKeyForTestOnly11017
APIKeyHasNoGame11016
AlreadySubscribed15004
AlreadyUnsubscribed15005
AuthenticatedAccountHasBeenDeleted11006
BannedUserAccount11007
BinaryFileCorrupted13001
BinaryFileUnreadable13002
CannotMuteYourself17039
CannotVerifyExternalCredentials11032
CrossOriginForbidden10001
EmailExchangeCodeAlreadyRedeemed11011
EmailLoginCodeExpired11012
EmailLoginCodeInvalid11014
ExpiredOrRevokedAccessToken11005
FailedToCompleteTheRequest10002
ForbiddenDMCA15000
ForbiddenHidden15001
ForbiddenMissingFile15020
ForbiddenTACNotAccepted15011
InsufficientPermission15019
InvalidAPIKey11002
InvalidApiVersion10003
InvalidJSON13004
MalformedAPIKey11001
MatureModsNotAllowed15054
MissingAPIKey11000
MissingContentTypeHeader13005
MissingReadPermission11004
MissingWritePermission11003
ModCannotAddDependencyMonetized15076
ModCannotAllowDependencyMonetized15073
ModCannotDeleteDependency15074
ModDependenciesNotAllowed15072
ModIsDependency15071
ModfileNoUploadPermission15006
ModioOutage10000
MonetizationAuthentication900002
MonetizationGameMonetizationNotEnabled900022
MonetizationInMaintenance900012
MonetizationIncorrectDisplayPrice900035
MonetizationInsufficientFunds900049
MonetizationItemAlreadyOwned900034
MonetizationPaymentFailed900030
MonetizationUnableToCommunicate900001
MonetizationUnexpectedError900000
MonetizationWalletFetchFailed900008
MuteUserNotFound17000
OpenIDNotConfigured11086
PSNChildAccountNotPermitted11085
PSNNotAllowedToInteractWithUGC11096
PremiumFeatureNotEnabled14040
Ratelimited11008
RatelimitedSameEndpoint11009
ReportedEntityUnavailable15030
RequestedCommentNotFound15026
RequestedGameDeleted14006
RequestedGameNotFound14001
RequestedInvalidResponseFormat13007
RequestedModDeleted15023
RequestedModNotFound15022
RequestedModfileNotFound15010
RequestedResourceNotFound14000
RequestedUserNotFound21000
SubmitReportRightsRevoked15029
UnsupportedContentTypeHeader13006
UserExistingModRating15028
UserMonetizationDisabled900015
UserMonetizationNotConfigured900007
UserNoAcceptTermsOfUse11074
UserNoModRating15043
ValidationErrors13009
XBoxLiveChildAccountNotPermitted11030
XBoxLiveNotAllowedToInteractWithUGC11028

ErrorConditionTypes

Enum describing the different conditions a Modio::ErrorCode can satisfy Check if a Modio::ErrorCode meets a particular condition using ErrorCodeMatches

Values

ModioServiceError1
NetworkError2
ConfigurationError3
InvalidArgsError4
FilesystemError5
InternalError6
ApiErrorRefSuccess7
ModInstallRetryableError8
ModInstallDeferredError9
ModDeleteDeferredError10
ModInstallUnrecoverableError11
EntityNotFoundError12
UserTermsOfUseError13
SubmitReportError14
UserNotAuthenticatedError15
SDKNotInitialized16
UserAlreadyAuthenticatedError17
SystemError18
OperationCanceled19
ModManagementDisabled20
RateLimited21
ModBeingProcessed22
InsufficientSpace23
SDKAlreadyInitialized24
ModManagementAlreadyEnabled25
InsufficientPermissions26
EmailLoginCodeInvalid27
AlreadySubscribed28
InstallOrUpdateCancelled29
UploadCancelled30
TempModSetNotInitialized31
MonetizationOperationError32
PaymentTransactionFailed33
IncorrectPrice34
ItemAlreadyOwned35
ParentalControlRestrictions36
MetricsSessionNotInitialized37
MetricsSessionAlreadyInitialized38
MetricsSessionIsActive39
MetricsSessionIsNotActive40
MetricsSessionHasNoMods41
PremiumFeatureNotAvailable42
EmailExchangeCodeAlreadyRedeemed43
ModDependenciesNotAllowed44
ModCannotAddDependencyMonetized45
ModIsDependency46
ModCannotAllowDependencyMonetized47
ModCannotDeleteDependency48
RequestInProgress49

ModState

Enum representing the current state of a mod

Values

InstallationPending0
Installed1
UpdatePending2
Downloading3
Extracting4
UninstallPending5

ReportType

The type of report being made

Values

Generic0
DMCA1
NotWorking2
RudeContent3
IllegalContent4
StolenContent5
FalseInformation6
Other7

EntitlementConsumptionState

State of an entitlement consumption transaction

Values

Failed0
Pending1
Fulfilled2
ConsumeLimitExceeded3

EntitlementType

Type of entitlement that was consumed

Values

VirtualCurrency0

GameCommunityOptions

Community options for a game * 0 = None set (default) * 1 = Comments are enabled * 2 = Guides are enabled * 4 = Pin on homepage * 8 = Show on homepage * 16 = Show more on homepage * 32 = Allow change status * 64 = Enable Previews (Game must be hidden) * 128 = Allow Preview Share-URL (Previews must be enabled) * 256 = Allow negative ratings * 512 = Allow mods to be edited on web * 1024 = Allow mod dependencies * 2048 = Allow comments on guides

Values

None0
EnableComments1
EnableGuides2
PinOnHomepage4
ShowOnHomepage8
ShowMoreOnHomepage16
AllowChangeStatus32
EnablePreviews64
AllowPreviewShareURL128
AllowNegativeRatings256
AllowModsToBeEditedOnWeb512
AllowModDependencies1024
AllowCommentsOnGuides2048

GameMaturityOptions

Maturity options for a game * 0 = Don't allow mature content in mods (default) * 1 = This game allows mods containing mature content * 2 = This game is for mature audiences only

Values

None0
MatureModsAllowed1
MatureAudiencesOnly2

GameMonetizationOptions

Monetization properties of a game * 0 = None set (default) * 1 = Monetization is enabled * 2 = Marketplace is enabled * 4 = Partner Program is enabled

Values

None0
Monetization1
Marketplace2
PartnerProgram4