-
Notifications
You must be signed in to change notification settings - Fork 0
media
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
mod.io Endpoint: Add Game Media
This function uploads new media to a game. A successful request will return a Message struct.
ℹ️ NOTE
You can also add media to your games profile on the mod.io website. This is the recommended approach.
Syntax:
modio_media_game_add(_optionals, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_optionals | Struct | - logo (String) Image file which will represent your game's logo. Must be gif, jpg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 640x360 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this logo to create three thumbnails with the dimensions of 320x180, 640x360 and 1280x720. - icon (String) Image file which will represent your games icon. Must be gif, jpg or png format and cannot exceed 1MB in filesize. Dimensions must be at least 64x64 and a transparent png that works on a colorful background is recommended. mod.io will use this icon to create three thumbnails with the dimensions of 64x64, 128x128 and 256x256. - header (String) Image file which will represent your games header. Must be gif, jpg or png format and cannot exceed 256KB in filesize. Dimensions of 400x100 and a light transparent png that works on a dark background is recommended. |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
mod.io Endpoint: Add Mod Media
This function adds any images posted to the mods gallery regardless of their body name providing they are a valid image. A successful request will return a Message struct.
ℹ️ NOTE
You can also add media to your mods profile on the mod.io website. This is the easiest way.
Syntax:
modio_media_mod_add(_mod_id, _optionals_files, _optionals_strings, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | Unique id of the mod. |
_optionals_files | Struct | - logo (String) Image file which will represent your game's logo. Must be gif, jpg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 640x360 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this logo to create three thumbnails with the dimensions of 320x180, 640x360 and 1280x720. - images (String) Zip archive of images to add to the mods gallery. Only valid gif, jpg and png images in the zip file will be processed. The filename must be images.zip, all other zips will be ignored. Alternatively you can POST one or more images to this endpoint and they will be detected and added to the mods gallery. |
_optionals_strings | Struct | - youtube (String) Full Youtube link(s) you want to add. Every Youtube link to add requires a separate field with youtube[] as the key (eg. youtube[]=https://www.youtube.com/watch?v=IGVZOLV9SPo, youtube[]=https://www.youtube.com/watch?v=5nY6fjZ3EUc) - sketchfab (String) Full Sketchfab link(s) you want to add. Every Sketchfab link to add requires a separate field with sketchfab[] as the key (eg. sketchfab[]=https://sketchfab.com/models/71f04e390ff54e5f8d9a51b4e1caab7e, sketchfab[]=https://sketchfab.com/models/5c85e649dd854cb58c2b9af081ebb0ff) |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
mod.io Endpoint: Delete Mod Media
Delete images, sketchfab or youtube links from a mod profile.
ℹ️ NOTE
You can also delete media from your mods profile on the mod.io website. This is the easiest way.
Syntax:
modio_media_mod_delete(_mod_id, _optionals, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | Unique id of the mod. |
_optionals | Struct | - youtube (String) Full Youtube link(s) you want to add. Every Youtube link to add requires a separate field with youtube[] as the key (eg. youtube[]=https://www.youtube.com/watch?v=IGVZOLV9SPo, youtube[]=https://www.youtube.com/watch?v=5nY6fjZ3EUc) - sketchfab (String) Full Sketchfab link(s) you want to add. Every Sketchfab link to add requires a separate field with sketchfab[] as the key (eg. sketchfab[]=https://sketchfab.com/models/71f04e390ff54e5f8d9a51b4e1caab7e, sketchfab[]=https://sketchfab.com/models/5c85e649dd854cb58c2b9af081ebb0ff) |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
N/A
mod.io Endpoint: Reorder Mod Media
Reorder images, Sketchfab or YouTube links from a mod profile.
ℹ️ NOTE
You can only reorder existing media, any differences in the media arrays will result in a failed request.
Syntax:
modio_media_mod_reorder(_mod_id, _optionals, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | Unique id of the mod. |
_optionals | Struct | - images (String) Filename of the image(s) you want to reorder. Every image to delete requires a separate field with images[] as the key (eg. images[]=filename1.jpg, images[]=filename2.jpg) - youtube (String) Full Youtube link(s) you want to reorder. Every Youtube link to delete requires a separate field with youtube[] as the key (eg. youtube[]=https://www.youtube.com/watch?v=IGVZOLV9SPo, youtube[]=https://www.youtube.com/watch?v=5nY6fjZ3EUc) - sketchfab (String) Full Sketchfab link(s) you want to reorder. Every Sketchfab link to delete requires a separate field with sketchfab[] as the key (eg. sketchfab[]=https://sketchfab.com/models/71f04e390ff54e5f8d9a51b4e1caab7e, sketchfab[]=https://sketchfab.com/models/5c85e649dd854cb58c2b9af081ebb0ff) |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
N/A
GameMaker 2023