Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Comments (C compatible)

Ahmed Castro edited this page Mar 6, 2018 · 3 revisions

modioGetAllModComments

void modioGetAllModComments(void* object, u32 mod_id, ModioFilterCreator filter, void (*callback)(void* object, ModioResponse response, ModioComment comments[], u32 comments_size));

Wrapped by: Comments#modiogetallmodcomments

API endpoint used: Get All Mod Comments

et all comments posted in the mods profile, can be filtered using the ModioFilterCreator.

Function parameters

Name Type Description
object void* Context parameter.
mod_id u32 Unique id of the mod.
filter ModioFilterCreator* ModioFilterCreator object to be customized.
callback void (*callback)(void* object, ModioResponse response, ModioComment comments[], u32 comments_size) Function called once the process finished.

Callback parameters

Name Type Description
object void* Context parameter.
response ModioResponse ModioResponse object that contains the mod.io response status.
mods ModioComment* ModioComment array containing the returned comments.
comments_size u32 Comments array size.

Example

void onGetAllModComments(void* object, ModioResponse response, ModioComment comments[], u32 comments_size)
{
  if(response.code == 200)
  {
    //Comments retrieved successfully
  }
}

[...]

ModioFilterCreator filter;
modioInitFilter(&filter);
modioSetFilterLimit(&filter,3);

modioGetAllModComments(NULL, mod_id, filter, &onGetAllModComments);

Contents

Clone this wiki locally