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 (C compatible)
Ahmed Castro edited this page Aug 24, 2018
·
6 revisions
void modioGetModTags(void* object, u32 mod_id, void (*callback)(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size));
Wrapped by: Tags#getmodtags
API endpoint used: Get Mod Tags
Returns all the tags corresponding a mod.
Name | Type | Description |
---|---|---|
object | void* |
Context paramter. |
mod_id | u32 |
Mod's unique identifier. |
callback | void (*callback)(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context paramter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
mod_id | u32 |
Mod's unique identifier. |
tags_array | ModioTag* |
Array containing the ModioTag objects returned. |
tags_array_size | u32 |
Tags array size. |
void onGetModTags(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size)
{
if(response.code == 200)
{
//Tags retrieved successfully
}
}
[...]
modioGetModTags(NULL, mod.id, &onGetModTags);
void modioAddModTags(void* object, u32 mod_id, char** tags_array, u32 tags_array_size, void (*callback)(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size));
Wrapped by: Tags#addmodtags
API endpoint used: Add Mod Tag
Adds one or more tags to a mod. Tags are supplied as a char* array.
Name | Type | Description |
---|---|---|
object | void* |
Context paramter. |
mod_id | u32 |
Mod's unique identifier. |
tags_array | char** |
Array containing the tags to be added. |
tags_array_size | u32 |
Tags array size. |
callback | void (*callback)(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context paramter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
mod_id | u32 |
Mod's unique identifier. |
tags_array | ModioTag* |
Array containing the resulting ModioTag objects. |
tags_array_size | u32 |
Tags array size. |
void onAddModTags(void* object, ModioResponse response, u32 mod_id)
{
if(response.code == 201)
{
//Tags added successfully
}
}
[...]
char** tags_array = (char**) malloc(1);
tags_array[0] = (char*) malloc(50);
strcpy(tags_array[0], "Hard\0");
modioAddModTags(NULL, mod.id, (char**)tags_array, 1, &onAddModTags);
void modioDeleteModTags(void* object, u32 mod_id, char** tags_array, u32 tags_array_size, void (*callback)(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size));
Wrapped by: Tags#deletemodtags
API endpoint used: Delete Mod Tag
Deletes one or more tags to a mod. Tags are supplied as a char* array.
Name | Type | Description |
---|---|---|
object | void* |
Context paramter. |
mod_id | u32 |
Mod's unique identifier. |
tags_array | char** |
Array containing the tags to be deleted. |
tags_array_size | u32 |
Tags array size. |
callback | void (*callback)(void* object, ModioResponse response, u32 mod_id, ModioTag* tags_array, u32 tags_array_size) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context paramter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
mod_id | u32 |
Mod's unique identifier. |
tags_array | ModioTag* |
Array containing the resulting ModioTag objects. |
tags_array_size | u32 |
Tags array size. |
void onDeleteModTags(void* object, ModioResponse response, u32 mod_id)
{
if(response.code == 201)
{
//Tags deleted successfully
}
}
[...]
char** tags_array = (char**) malloc(1);
tags_array[0] = (char*) malloc(50);
strcpy(tags_array[0], "Hard\0");
modioDeleteModTags(NULL, mod.id, (char**)tags_array, 1, &onDeleteModTags);
- 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