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
Tags
Ahmed Castro edited this page Aug 29, 2018
·
21 revisions
void Instance::getModTags(u32 mod_id, const std::function<void(const modio::Response& response, std::vector<modio::Tag> tags)>& callback)
API endpoint used: Get Mod Tags
Returns all the tags corresponding a mod.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod's unique identifier. |
callback | const std::function<void(const modio::Response& response, std::vector<modio::Tag> tags)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
tags_array | std::vector<modio::Tag> |
Vector containing the modio::Tag objects returned. |
modio_instance.getTags(requested_mod.id, [&](const modio::Response& response, std::vector<modio::Tag> tags)
{
if(response.code == 200)
{
//The tags can be browsed on the tags_array
}
});
void Instance::addModTags(u32 mod_id, std::vector<std::string> tags, const std::function<void(const modio::Response& response)>& callback)
API endpoint used: Add Mod Tag
Adds one or more tags to a mod. Tags are supplied as a char* array.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod's unique identifier. |
tags | std::vector<std::string> |
Vector containing the tags to be added. |
callback | const std::function<void(const modio::Response& response, u32 mod_id)>& |
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<std::string> tags;
tags.push_back("Easy");
modio_instance.addModTags(requested_mod.id, tags, [&](const modio::Response& response)
{
if(response.code == 204)
{
//Tags successfully added
}
});
void Instance::deleteModTags(u32 mod_id, std::vector<std::string> tags, const std::function<void(const modio::Response& response)>& callback)
API endpoint used: Delete Mod Tag
Deletes one or more tags to a mod. Tags are supplied as a char* array.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod's unique identifier. |
tags | std::vector<std::string> |
Vector containing the tags to be deleted. |
callback | const std::function<void(const modio::Response& response, u32 mod_id)>& |
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<std::string> tags;
tags.push_back("Easy");
modio_instance.deleteModTags(requested_mod.id, tags, [&](const modio::Response& response)
{
if(response.code == 204)
{
//Tags 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