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
Comments
Ahmed Castro edited this page Aug 29, 2018
·
6 revisions
void Instance::getAllModComments(u32 mod_id, modio::FilterCreator &filter, const std::function<void(const modio::Response &response, const std::vector<modio::Comment>& comments)>& callback);
API endpoint used: Get All Mod Comments
Get all comments posted in the mods profile, can be filtered using the modio::FilterCreator.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Unique id of the mod. |
filter_creator | modio::FilterCreator& |
modio::FilterCreator object to be customized. |
callback | const modio::Response &response, const std::vector<modio::Comment>& comments)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
comments | const std::vector<modio::Comment>& |
Vector containing the returned comments. |
modio::FilterCreator filter_creator;
filter_creator.setFilterLimit(3);
modio_instance.getAllModComments(mod_id, filter, [&](const modio::Response& response, const std::vector<modio::Comment> & comments)
{
if(response.code == 200)
{
//Mod comments successfully retrieved
}
});
void getModComment(u32 mod_id, u32 comment_id, const std::function<void(const modio::Response &response, const modio::Comment &comment)> &callback);
API endpoint used: Get Mod Comment
Get a mod comment by providing it's id.
Name | Type | Description |
---|---|---|
mod_id | u32 |
Mod's unique identifier. |
comment_id | u32 |
Comment's unique identifier. |
callback | const std::function<void(const modio::Response& response, const modio::Comment& comment)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
mod | const modio::Mod& |
Returned mod. |
modio_instance.getModComment(mod_id, comment_id, [&](const modio::Response& response, const modio::Comment& comment)
{
if(response.code == 200)
{
//Mod comment successfully retrieved
}
});
void Instance::deleteModComment(u32 mod_id, u32 comment_id, const std::function<void(const modio::Response &response)>& callback);
API endpoint used: Delete Mod Comment
Delete a comment from a mod profile.
Name | Type | Description |
---|---|---|
mid_id | u32 |
Unique id of the mod. |
comment_id | u32 |
Unique id of the comment. |
callback | const std::function<void(const modio::Response &response)>& |
Function called once the process finished. |
Name | Type | Description |
---|---|---|
response | const modio::Response& |
modio::Response object that contains the mod.io response status. |
modio_instance.deleteModComment(mod_id, comment_id, [&](const modio::Response& response)
{
if(response.code == 204)
{
//Mod comment 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