This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Dependencies
Ahmed Castro edited this page Mar 27, 2019
·
5 revisions
void Instance::getAllModDependencies(u32 mod_id, const std::function<void(const modio::Response& response, const std::vector<modio::Dependency>& mods)>& callback);
API endpoint used: Get All Mod Dependencies
Get all dependencies the chosen mod has selected. This is useful if a mod requires other mods be installed for it to run.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod unique identifier. |
callback | const std::function<void(const modio::Response& response, const std::vector<modio::Dependency>& mods)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
dependencies | const std::vector<modio::Dependency>& |
modio::Dependency vector. |
modio_instance.getAllModDependencies(mod_id, [&](const modio::Response& response, std::vector<modio::Dependency> dependencies)
{
if(response.code == 200)
{
//Mod dependencies successfully retrieved
}
});
void addModDependencies(u32 mod_id, std::vector<u32> dependencies, const std::function<void(const modio::Response& response)>& callback);
API endpoint used: Add Mod Dependencies
Add mod dependencies required by the corresponding mod.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod unique identifier. |
dependencies | const std::vector<u32> |
Vector containing the dependency mod ids to be added. |
callback | const std::function<void(const modio::Response& response)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
std::vector<u32> dependencies;
dependencies.push_back(501);
dependencies.push_back(502);
modio_instance.addModDependencies(mod_id, dependencies, [&](const modio::Response& response)
{
if(response.code == 201)
{
//Mod dependencies added successfully
}
});
void deleteModDependencies(u32 mod_id, std::vector<u32> dependencies, const std::function<void(const modio::Response& response)>& callback);
API endpoint used: Delete Mod Dependencies
Add mod dependencies required by the corresponding mod.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod unique identifier. |
dependencies | const std::vector<u32> |
Vector containing the dependency mod ids to be deleted. |
callback | const std::function<void(const modio::Response& response)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
std::vector<u32> dependencies;
dependencies.push_back(501);
dependencies.push_back(502);
modio_instance.deleteModDependencies(mod_id, dependencies, [&](const modio::Response& response)
{
if(response.code == 204)
{
//Mod dependencies deleted successfully
}
});
- 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