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
Metadata KVP
Ahmed Castro edited this page Sep 3, 2018
·
1 revision
void Instance::getAllMetadataKVP(u32 mod_id, const std::function<void(const modio::Response& response, std::vector<modio::MetadataKVP> metadata_kvp)>& callback);
API endpoint used: Get All Mod KVP Metadata
Returns a vector containing all corresponding mod's modio::MetadataKVP objects.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Id of the corresponding mod. |
callback | std::function<void(const modio::Response& response, std::vector<modio::MetadataKVP> metadata_kvp)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
metadata_kvp | std::vector<modio::MetadataKVP> |
Vector containing the returned modio::MetadataKVP objects. |
modio_instance.getAllMetadataKVP(mod_id, [&](const modio::Response &response, std::vector<modio::MetadataKVP> metadata_kvp) {
if(response.code == 200)
{
//Metadata KVP successfully retrieved
}
});
void Instance::addMetadataKVP(u32 mod_id, std::map<std::string, std::string> metadata_kvp, const std::function<void(const modio::Response &response)> &callback);
API endpoint used: Add Mod KVP Metadata
Adds the metadata key value pairs provided to the corresponding mod.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Id of the corresponding mod. |
metadata_kvp | std::map<std::string, std::string> | Metadata key value pairs to be added |
callback | std::map<std::string, std::string> metadata_kvp, 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::map<std::string, std::string> metadata_kvp;
metadata_kvp["pistol-dmg"] = "800";
modio_instance.addMetadataKVP(mod_id, metadata_kvp, [&](const modio::Response &response) {
if(response.code == 201)
{
//Metadata KVP successfully added
}
});
void Instance::deleteMetadataKVP(u32 mod_id, std::map<std::string, std::string> metadata_kvp, const std::function<void(const modio::Response &response)> &callback);
API endpoint used: Delete Mod KVP Metadata
Deletes metadata key value pairs from to the corresponding mod.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Id of the corresponding mod. |
metadata_kvp | std::map<std::string, std::string> | Metadata key value pairs to be deleted |
callback | std::map<std::string, std::string> metadata_kvp, 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::map<std::string, std::string> metadata_kvp;
metadata_kvp["pistol-dmg"] = "800";
modio_instance.deleteMetadataKVP(mod_id, metadata_kvp, [&](const modio::Response &response) {
if(response.code == 204)
{
//Metadata KVP successfully deleted
}
});
- 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