-
Notifications
You must be signed in to change notification settings - Fork 27
mod.io SDK Implementation Guide
The mod.io SDK provides all the functionality needed to access the mod.io backend. See the Getting Started guide to start integrating the SDK on your project.
mod.io offers two different environments: testing and live. Testing is located in test.mod.io website it will only be visible for the developers, its meant to be a safe sandbox to prepare before going to the Live environment. The environment is set as a parameter in the Initialization method.
Users need to be authenticated to accomplish certain task such as creating, editing or subscribing to mods. mod.io offers a secure and easy authentication flow through email. You can find more information in User Authentication.
This are the steps to create a mod profile which can be found in the mod.io API and web. This function creates the mod profile as hidden, to go live you will need to Upload a Modfile.
- Initialize a ModCreator, which will have the Mod's data.
- Fill the Mod's data using the ModCreator functions.
- Call the function addMod by sending ModCreator as a parameter.
- The callback Response Code should be
201 CREATED
.
In order for your mod to go live you will need to upload a modfile. Modfiles can't be edited, if you want to make a change upload a new one as a newer version.
- Initialize a ModfileCreator, which will have the Modfile's data.
- Fill the Modfile's data using the ModfileCreator functions.
- Call the function addModfile by sending ModfileCreator as a parameter.
- The callback Response Code should be
201 CREATED
.
In case changes are wanted it follows a similar process as creating a mod.
- Initialize a ModEditor, which will have the Mod's data.
- Fill the Mod's data to be edited using the ModEditor functions.
- Call the function editMod by sending ModEditor and the mod's id as a parameters.
- The callback Response Code should be
200 OK
.
You can browse Mod's data and filter the result so you retrieve only the mods you want.
- Initialize a FilterCreator to define which would be the query criteria.
- Fill the filters data using the FilterCreator function on the request you want to make.
- Call getMods by sending the FilterCreator as parameter.
- The callback Response Code should be
200 OK
and a collection of Mods should be returned.
Additionally you can obtain the autenticated user's Mods using the getUserMods and getUserSubscriptions methods or a specific mod by using the getMod method.
The mod.io SDK features with a download queue and an installed mod list which gives you a variety of functions to handle local mods. See the Downloads documentation for details.
When a mod is updated through any method (web, API, SDK or plugin) it also updates itself locally. This will happen as long as the automatic option is enabled, additionally if a user subscribes to a mod it will be installed automatically.
Mods can not be permanently deleted but they can be archived so its only seen by the modder. You can delete a Mod by calling deleteMod by sending the mod ID as parameter.
Each method in the documentation displays an example but If you want a complete working example you could go to the official examples list.
Every callback returns an HTTP Response Code so you can check if there were any errors in your request, you could also review the log placed in .modio/log
for details.
The SDK wraps the mod.io API end points. You may achieve the same functionalities by connecting to the API without using the SDK, however it makes the work easier by taking care of automatic tasks and providing an easier interface in C++. See mod.io API Documentation for details.
If you want an integration with more features, you could see the complete method list in the Table of Content.
- Home
- Table of Contents
- Getting Started
- SDK Methods
- Creators
- Editors
- Schemas
- modio::Avatar
- modio::Comment
- modio::Dependency
- modio::Download
- modio::Error
- modio::Filehash
- modio::Game
- modio::GameTagOption
- modio::Header
- modio::Icon
- modio::Image
- modio::InstalledMod
- modio::Logo
- modio::Media
- modio::MetadataKVP
- modio::Mod
- modio::ModEvent
- modio::Modfile
- modio::QueuedModDownload
- modio::QueuedModfileUpload
- modio::Rating
- modio::Response
- modio::Stats
- modio::Tag
- modio::User
- Debugging
- Constants
-
C Compatibility
- Methods
- Initialization, Process and Shutdown (C compatible)
- User Authentication (C compatible)
- Mods (C compatible)
- Modfiles (C compatible)
- Media (C compatible)
- Subscriptions (C compatible)
- Events (C compatible)
- Stats (C compatible)
- Tags (C compatible)
- Ratings (C compatible)
- Metadata KVP (C compatible)
- Dependencies (C compatible)
- Comments (C compatible)
- Reports (C compatible)
- Me (C compatible)
- Downloads (C compatible)
- Uploads (C compatible)
- Logs (C compatible)
- External Auth (C compatible)
- Configuration (C compatible)
- Creators
- Editors
- Schemas
- ModioAvatar
- ModioComment
- ModioDependency
- ModioDownload
- ModioError
- ModioFilehash
- ModioGame
- ModioGameTagOption
- ModioHeader
- ModioIcon
- ModioImage
- ModioInstalledMod
- ModioListNode
- ModioLogo
- ModioMedia
- ModioMetadataKVP
- ModioMod
- ModioModEvent
- ModioModfile
- ModioQueuedModDownload
- ModioQueuedModfileUpload
- ModioRating
- ModioResponse
- ModioStats
- ModioTag
- ModioUser
- Methods
- Building