-
Notifications
You must be signed in to change notification settings - Fork 27
Media (C compatible)
void modioAddModLogo(void* object, u32 mod_id, char* logo_path, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modioaddmodlogo
API endpoint used: Add Mod Media
Adds a new logo image to a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
logo_path | char* |
Image's local path to be uploaded. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onAddModLogo(void* object, ModioResponse response)
{
if(response.code == 201)
{
//Logo added successfully
}
}
[...]
modioAddModLogo(NULL, mod_id, (char*)"ModExample/logo.png", &onAddModLogo);
void modioAddModImages(void* object, u32 mod_id, char** image_paths_array, u32 image_paths_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modioaddmodimages
API endpoint used: Add Mod Media
Adds a new logo image to a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
image_paths_array | char** |
Array containing the images paths to be added. |
image_paths_array_size | u32 |
Images array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onAddModImages(void* object, ModioResponse response)
{
if(response.code == 201)
{
//Images added successfully
}
}
[...]
char **images_array = (char **)malloc(1);
images_array[0] = (char *)malloc(100);
strcpy(images_array[0], "../ModExample/logo.png\0");
modioAddModImages(NULL, mod_id, images_array, 1, &onAddModImages);
void modioAddModYoutubeLinks(void* object, u32 mod_id, char** youtube_links_array, u32 youtube_links_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modioaddmodyoutubelinks
API endpoint used: Add Mod Media
Adds a list of youtube links to a corresponding mod's gallery.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
youtube_links_array | char** |
Array containing the youtube links to be added. |
youtube_links_array_size | u32 |
Youtube links array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onAddModYoutubeLinks(void* object, ModioResponse response)
{
if(response.code == 201)
{
//Youtube links added successfully
}
}
[...]
char **youtube_links_array = (char **)malloc(1);
youtube_links_array[0] = (char *)malloc(100);
strcpy(youtube_links_array[0], "https://www.youtube.com/watch?v=dQw4w9WgXcQ\0");
modioAddModYoutubeLinks(NULL, mod_id, youtube_links_array, 1, &onAddModYoutubeLinks);
void modioAddModSketchfabLinks(void* object, u32 mod_id, char** sketchfab_links_array, u32 sketchfab_links_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modioaddmodsketchfablinks
API endpoint used: Add Mod Media
Adds a list of sketchfab links to a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
youtube_links_array | char** |
Array containing the youtube links to be added. |
youtube_links_array_size | u32 |
Youtube links array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onAddModSketchfabLinks(void* object, ModioResponse response)
{
if(response.code == 201)
{
//Sketchfab links added successfully
}
}
[...]
char **sketchfab_links_array = (char **)malloc(1);
sketchfab_links_array[0] = (char *)malloc(100);
strcpy(sketchfab_links_array[0], "https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74\0");
modioAddModSketchfabLinks(NULL, mod_id, sketchfab_links_array, 1, &onAddModSketchfabLinks);
void modioDeleteModImages(void* object, u32 mod_id, char** image_paths_array, u32 image_paths_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modiodeletemodimages
API endpoint used: Add Mod Media
Adds a list of sketchfab links to a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
image_paths_array | char** |
Array containing the images paths to be added. |
image_paths_array_size | u32 |
Images array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onDeleteModImages(void* object, ModioResponse response)
{
if(response.code == 204)
{
//Images deleted successfully
}
}
[...]# modioDeleteModImages
```c++
void modioDeleteModImages(void* object, u32 mod_id, char** image_paths_array, u32 image_paths_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modiodeletemodimages
API endpoint used: Add Mod Media
Deletes a list of images from a corresponding mod's gallery.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
image_paths_array | char** |
Array containing the images paths to be added. |
image_paths_array_size | u32 |
Images array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onDeleteModImages(void* object, ModioResponse response)
{
if(response.code == 204)
{
//Images deleted successfully
}
}
[...]
char **images_array = (char **)malloc(1);
images_array[0] = (char *)malloc(100);
strcpy(images_array[0], "Screenshot1.png\0");
modioDeleteModImages(NULL, mod_id, images_array, 1, &onDeleteModImages);
char **images_array = (char **)malloc(1); images_array[0] = (char *)malloc(100); strcpy(images_array[0], "Screenshot1.png\0");
modioDeleteModImages(NULL, mod_id, images_array, 1, &onDeleteModImages);
# modioDeleteModYoutubeLinks
```c++
void modioDeleteModYoutubeLinks(void* object, u32 mod_id, char** youtube_links_array, u32 youtube_links_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modiodeletemodyoutubelinks
API endpoint used: Add Mod Media
Deletes a list of youtube links from a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
youtube_links_array | char** |
Array containing the images paths to be added. |
youtube_links_array_size | u32 |
Images array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onDeleteModYoutubeLinks(void* object, ModioResponse response)
{
if(response.code == 204)
{
//Images deleted successfully
}
}
[...]
char **youtube_links_array = (char **)malloc(1);
youtube_links_array[0] = (char *)malloc(100);
strcpy(youtube_links_array[0], "https://www.youtube.com/watch?v=dQw4w9WgXcQ\0");
modioDeleteModYoutubeLinks(NULL, mod_id, youtube_links_array, 1, &onDeleteModYoutubeLinks);
void modioDeleteModSketchfabLinks(void* object, u32 mod_id, char** sketchfab_links_array, u32 sketchfab_links_array_size, void (*callback)(void* object, ModioResponse response));
Wrapped by: Media#modiodeletemodsketchfablinks
API endpoint used: Add Mod Media
Deletes a list of sketchfab links from a corresponding mod.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
mod_id | u32 |
Mod's unique identifier. |
sketchfab_links_array | char** |
Array containing the images paths to be added. |
sketchfab_links_array_size | u32 |
Images array size. |
callback | void (*callback)(void* object, ModioResponse response) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
void onDeleteModSketchfabLinks(void* object, ModioResponse response)
{
if(response.code == 204)
{
//Sketchfab links deleted successfully
}
}
[...]
char **sketchrab_links_array = (char **)malloc(1);
sketchrab_links_array[0] = (char *)malloc(100);
strcpy(sketchrab_links_array[0], "https://sketchfab.com/models/7793b895f27841f4930e6b71f75a8d74\0");
modioDeleteModSketchfabLinks(NULL, mod_id, sketchrab_links_array, 1, &onDeleteModSketchfabLinks);
void MODIO_DLL modioDownloadImage(void* object, char* image_url, char* path, void (*callback)(void* object, ModioResponse response, char* path));
Wrapped by: Media#modiodownloadimage
Downloads an image to a desired path given the image url.
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
image_url | char* |
Image url. |
path | char* |
Path where the image will be downloaded. |
callback | void (*callback)(void* object, ModioResponse response, char* path) |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
object | void* |
Context parameter. |
response | ModioResponse |
ModioResponse object that contains the mod.io response status. |
path | char* |
Path where the image was downloaded. |
void onImageDownloaded(void* object, ModioResponse response)
{
if(response.code == 200)
{
//Image downloaded successfully
}
}
[...]
modioDownloadImage(NULL, mod.logo.original, (char*)"mods_dir/full.png", &onImageDownloaded);
- 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