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
Subscriptions (C compatible)
Ahmed Castro edited this page Jan 30, 2018
·
11 revisions
void modioSubscribeMod(void* object, u32 mod_id, void (*callback)(void* object, ModioResponse response, ModioMod mod));
Wrapped by: Subscriptions#subscribemod
API endpoint used: Subscribe to Mod
Subscribe the authenticated user to a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
callback | void (*callback)(void* object, ModioResponse response, ModioMod mod) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
mod | ModioMod |
ModioMod object the user just subscribed to. |
void onModSubscribed(void* object, ModioResponse response, ModioMod mod)
{
if(response.code == 201)
{
//Subscribed to mod successfully
}
}
[...]
modioSubscribeMod(NULL, mod_id, &onModSubscribed);
void modioUnsubscribeMod(void* object, u32 mod_id, void (*callback)(void* object, ModioResponse response));
Wrapped by: Subscriptions#subscribemod
API endpoint used: Subscribe from Mod
Unsubscribe the authenticated user from the corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
ModioResponse* response, ModioMod* mods, u32 mods_size)
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onModUnsubscribed(void* object, ModioResponse response)
{
if(response.code == 204)
{
//Unsubscribed from mod successfully
}
}
[...]
modioUnsubscribeMod(NULL, mod_id, &onModUnsubscribed);
- 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