Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Subscriptions

Ahmed Castro edited this page Jul 13, 2020 · 7 revisions

SubscribeToMod

Subscribe the authenticated user to a corresponding mod. This will automatically download the mod locally.

Parameters

Name Type Description
ModId int32 Mod's unique identifier.
Delegate FModioModDelegate ModioModDelegate containing the ModioMod the user just subscribed. This is called when the process finished.

C++ example

Modio->SubscribeToMod(mod_id, FModioModDelegate::CreateUObject(ModioManager, &UModioManager::OnSubscribeToMod));

// ...

void UMyModioManager::OnSubscribeToMod(FModioResponse Response, FModioMod Mod)
{
  // Response.code should be 200 if you subscribed to the mod successfully
}

See also: API endpoint, SDK function

UnsubscribeFromMod

Unsubscribe the authenticated user from the corresponding mod. This will automatically uninstall the mod locally.

Parameters

Name Type Description
ModId int32 Mod's unique identifier.
Delegate FModioGenericDelegate ModioGenericDelegate called when the process finished.

C++ example

Modio->UnsubscribeFromMod(mod_id, FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnUnsubscribeFromMod));

// ...

void UMyModioManager::OnUnsubscribeFromMod(FModioResponse Response)
{
  // Response.code should be 200 if you unsubscribed from the mod successfully
}

See also: API endpoint, SDK function