Skip to main content

Core

Modio

TypeDescription
Error
IModioLogHandler
IModioServiceSettings
ModIndex
ModInstallationManagementManages mod downloading, installation, updating & uninstallation.
ModioClient
ModioCommandLineAllows for modio specific command line arguments to be parsed easily
ModioConsoleLog
ModioDebugMenuAttribute
ModioLog
ModioServices
ModioSettings
TermsOfUseThe mod.io Terms of Use links. Each link contains a boolean field for if its required, Users must agree to all linked terms that have a True value for this field. Use Get to get the latest Terms of Use.
TermsOfUseLinkRepresents a url as part of the TOS. The 'required' field can be used to determine whether it is a TOS requirement to be displayed to the end user when viewing the TOS text.
Version

Error

public class Error : IEquatable<Error>
Field

Error None

Error None = new Error(ErrorCode.NONE)

Error Unknown

Error Unknown = new Error(ErrorCode.UNKNOWN)

ErrorCode Code

ErrorCode Code
Property

bool IsSilent

public bool IsSilent

If an error is silent, don't print an error to the console.

Method

GetMessage

public virtual string GetMessage()

ToString

public override string ToString()

Equals

public bool Equals(Error other)

Equals

public override bool Equals(object obj)

GetHashCode

public override int GetHashCode()

IModioLogHandler

public interface IModioLogHandler

IModioServiceSettings

public interface IModioServiceSettings

ModIndex

[System.Serializable]  public class ModIndex
Property

bool IsDirty

[JsonIgnore] public bool IsDirty

get set


ModInstallationManagement

public static class ModInstallationManagement

Manages mod downloading, installation, updating & uninstallation.

Property

bool DownloadAndExtractAsSingleJob

public static bool DownloadAndExtractAsSingleJob

get set

If set to true plugin will attempt to download and extract in one step.

Mod CurrentOperationOnMod

public static Mod CurrentOperationOnMod

Returns the current mod that the current operation is running on.

bool IsInitialized

public static bool IsInitialized

Returns if the mod installation management is initialized.

int PendingModOperationCount

public static int PendingModOperationCount

Returns the number of operations in queue does not include the current operation

Method

Activate

public static void Activate()

Begin downloading and installing mods.

Deactivate

public static void Deactivate(bool cancelCurrentJob)

Stop downloading and installing mods.

Remarks

Uninstallations will also be stopped.

IsModSubscribed

public static bool IsModSubscribed(long modId, long userId)

Returns a boolean indicating if a given mod is subscribed by the given user

Parameters

modId The mod id userId The user id

Returns

True if the mod is subscribed by the given user.

GetAllInstalledMods

public static ICollection<Mod> GetAllInstalledMods()

Returns a collection of all installed mods.

Returns

The collection of mods

GetTotalDiskUsage

public static long GetTotalDiskUsage(bool includeQueued)

Returns the total disk usage in bytes

Parameters

includeQueued Wether to include queued (pending) operation, if true will account for file IO changes to be made by the queued operation

Returns

The total disk usage (bytes)

StartTempModSession

public static async Task<Error> StartTempModSession(List<ModId> tempMods, bool appendCurrentSession

Will start a temporary mod session.

Parameters

tempMods A list of mods to be used for the temp session. appendCurrentSession Whether the new mods should be added to the existing running mod session.

Returns

An asynchronous task that returns Error.Error.None on success.

See Also

EndCurrentTempModSession

EndCurrentTempModSession

public static void EndCurrentTempModSession()

Will end the current temp mod session started by StartTempModSession

AddTemporaryMods

public static async Task<Error> AddTemporaryMods(List<ModId> tempMods, int lifeTimeDaysOverride

Adds the list of mods to mod index

Parameters

tempMods The list of mods to be added lifeTimeDaysOverride The number of days to keep the mods installed

Returns

An asynchronous task that returns Error.Error.None on success.

ClearExpiredTempMods

public static void ClearExpiredTempMods()

RetryInstallingMod

public static async Task<Error> RetryInstallingMod(Mod mod)

Retries installing a given mod.

Parameters

mod The Mod to be installed.

MarkModForUninstallation

public static void MarkModForUninstallation(Mod mod)

Marks a mod for uninstallation.

Parameters

mod The Mod to be uninstalled.

IsThereAvailableSpaceFor

public static async Task<bool> IsThereAvailableSpaceFor(Mod mod)

Returns if there is enough available space to install a Mod, will account for pending jobs.

Parameters

mod The mod check available space for

Returns

An asynchronous task that returns true if there is enough space, false otherwise.

Enum
Download
Install
Update
Uninstall
Validate
Scan
Checking
Started
Completed
Cancelled
Failed

ModioClient

public static class ModioClient
Property

IModioDataStorage DataStorage

public static IModioDataStorage DataStorage

The Data Storage implementation being used by the plugin.

Remarks

Prefer resolving the dependency yourself

See Also

ModioServices

IModioAPIInterface Api

public static IModioAPIInterface Api

The API interface being used by the plugin.

Remarks

Prefer resolving the dependency yourself

See Also

ModioServices

IModioAuthService AuthService

public static IModioAuthService AuthService

The Authentication Service being used by the plugin.

Remarks

Prefer resolving the dependency yourself

See Also

ModioServices

ModioSettings Settings

public static ModioSettings Settings

Returns the ModioSettings from the ModioServices

Remarks

Prefer resolving the dependency yourself

See Also

ModioServices

bool IsInitialized

public static bool IsInitialized

get

Returns true if initialized, false otherwise.

Method

Init

public static Task<Error> Init(ModioSettings settings)

Initializes the ModioClient with the given ModioSettings

Parameters

settings The settings to use

Returns

An asynchronous task that returns Error.Error.None on success.

Init

public static async Task<Error> Init()

Initializes the ModioClient.

Returns

A task that returns Error. If successfully initialized returns Error.Error.None

Shutdown

public static async Task Shutdown()

Shuts down the client. Will invoke the shutdown methods on services.


ModioCommandLine

public static class ModioCommandLine

Allows for modio specific command line arguments to be parsed easily

Method

TryGet

public static bool TryGet(string argument, out string value)

Attempt to get a mod.io command line argument and its encoded value from the environment.

Returns

true if the argument was successfully found.

Remarks

All arguments need to be in the format:-modio-arg=value or -modio-arg value


ModioConsoleLog

public class ModioConsoleLog : IModioLogHandler
Method

LogHandler

public void LogHandler(LogLevel logLevel, object message)

ModioDebugMenuAttribute

public class ModioDebugMenuAttribute : Attribute
Field

bool ShowInSettingsMenu

bool ShowInSettingsMenu = true

bool ShowInBrowserMenu

bool ShowInBrowserMenu = true

ModioLog

public class ModioLog
Field

string LOG_PREFIX_DEFAULT

string LOG_PREFIX_DEFAULT = "[mod.io] "
Property

ModioLog? Error

public static ModioLog? Error

get

ModioLog? Warning

public static ModioLog? Warning

get

ModioLog? Message

public static ModioLog? Message

get

ModioLog? Verbose

public static ModioLog? Verbose

get

Method

Log

public void Log(object message)

GetLogLevel

public static ModioLog? GetLogLevel(LogLevel logLevel)

ModioServices

public static class ModioServices
Method

Bind

[Pure]  public static IBindType<T> Bind<T>()

Bind a service so that it can be accessed by other systems


ModioServices.Bind&lt;IWebBrowserHandler&gt;()
.FromNew&lt;MyCustomWebBrowserHandler&gt;(ModioServicePriority.DeveloperOverride);

BindInstance

public static void BindInstance<T>(T instance, ModioServicePriority priority

Convenience wrapper to bind an instance. The same as writing csharpBind&lt;T&gt;().FromInstance(instance, priority);

BindErrorMessage

public static void BindErrorMessage<T>(string message, ModioServicePriority priority

Resolve

public static T Resolve<T>()

TryResolve

public static bool TryResolve<T>(out T result)

GetBindings

public static IResolveType<T> GetBindings<T>(bool createIfMissing

AddBindingChangedListener

public static void AddBindingChangedListener<T>(Action<T> onNewValue, bool fireImmediatelyIfValueBound

RemoveBindingChangedListener

public static void RemoveBindingChangedListener<T>(Action<T> onNewValue)
Class

Binding

Condition

Priority

Resolve

Interface

IBindType

IResolveType


ModioSettings

[Serializable]  public class ModioSettings
Field

long GameId

long GameId

string APIKey

string APIKey

string ServerURL

string ServerURL

string DefaultLanguage

string DefaultLanguage = "en"

LogLevel LogLevel

LogLevel LogLevel = LogLevel.Warning

IModioServiceSettings PlatformSettings

IModioServiceSettings[] PlatformSettings
Method

GetPlatformSettings

public T GetPlatformSettings<T>() where T : IModioServiceSettings

TryGetPlatformSettings

public bool TryGetPlatformSettings<T>(out T settings) where T : IModioServiceSettings

ShallowClone

public ModioSettings ShallowClone()

TermsOfUse

public class TermsOfUse

The mod.io Terms of Use links. Each link contains a boolean field for if its required, Users must agree to all linked terms that have a True value for this field. Use Get to get the latest Terms of Use.

Property

string TermsText

public string TermsText

get

string AgreeText

public string AgreeText

get

string DisagreeText

public string DisagreeText

get

public TermsOfUseLink[] Links

get

Method

Get

public static async Task<(Error error, TermsOfUse result)> Get()

Gets the latest Terms of Use from the mod.io API, or returns a cached one if it's already been received during the session.

Returns

Error.Error.None if successful. Otherwise, it will return the API error.

public TermsOfUseLink GetLink(LinkType type)

Gets a specific link from the received Terms of Use object.


public struct TermsOfUseLink

Represents a url as part of the TOS. The 'required' field can be used to determine whether it is a TOS requirement to be displayed to the end user when viewing the TOS text.

Field

LinkType type

LinkType type

string text

string text

string url

string url

bool required

bool required

Version

public static class Version
Method

AddEnvironmentDetails

public static void AddEnvironmentDetails(string details)

GetCurrent

public static string GetCurrent()

Enums

LinkType
Website
Terms
Privacy
Manage
Refund

This cannot be gotten from this endpoint! This is here to help band-aid CUI


LogLevel
None
Error
Warning
Message
Verbose

ModioServicePriority

Specify the priority of a dependency, which controls which dependency will be used when multiple bindings exist Higher numbers are higher priority. You can modify these priorities if you want to have an even more specific override e.g. var priority = ModioServicePriority.EngineImplementation + 1;

Fallback = 0

Do not bind things to this that should be used in working situations You can bind error messages at this priority to give more information to users when binding fails ModioServices.BindErrorMessage{T}

Default = 10

Most mod.io basic implementations will use this priority

EngineImplementation = 20

e.g. Unity specific

PlatformProvided = 30

e.g. a particular console or storefront

DeveloperOverride = 40

A custom implementation within your own application

UnitTestOverride = 100

Intended for internal usage to support mod.io's unit testing


Modio.Authentication

TypeDescription
IEmailCodePrompter
IGetActiveUserIdentifier
IModioAuthService
IPotentialModioEmailAuthService
ModioEmailAuthServiceUse for authenticating with email
ModioMultiplatformAuthResolver

IEmailCodePrompter

public interface IEmailCodePrompter

IGetActiveUserIdentifier

public interface IGetActiveUserIdentifier
Method

GetActiveUserIdentifier

public Task<string> GetActiveUserIdentifier();

IModioAuthService

public interface IModioAuthService
Property

ModioAPI.Portal Portal

public ModioAPI.Portal Portal

get

Method

Authenticate

public Task<Error> Authenticate(  bool displayedTerms,  string thirdPartyEmail

Authenticates with the required server

Parameters

displayedTerms The terms that were displayed to the user onComplete Is called when authentication is complete (false on failure) thirdPartyEmail Optional email address used for authentication


IPotentialModioEmailAuthService

public interface IPotentialModioEmailAuthService

ModioEmailAuthService

public class ModioEmailAuthService : IModioAuthService, IGetActiveUserIdentifier, IPotentialModioEmailAuthService

Use for authenticating with email


GameObject codeWindow;
void Awake()
{
ModioServices.Bind&lt;IModioAuthService&gt;()
.FromInstance(new ModioEmailAuthPlatform(), 50);
}
async void Authenticate()
{
Error error = await ModioClient.AuthService.Authenticate(true, "some_email@supercoolemail.com");
if (error)
Debug.LogError($"Error authenticating with email");
else
Debug.Log($"Successfully authenticated");
}
Task&lt;string&gt; ShowCodePrompt()
{
codeWindow.Enable;
// Capture security code here
string code = await SomeCodeInputLogic();
return code;
}

Property

bool IsEmailPlatform

public bool IsEmailPlatform

ModioAPI.Portal Portal

public ModioAPI.Portal Portal
Method

Authenticate

public async Task<Error> Authenticate(  bool displayedTerms,  string thirdPartyEmail

Begins the email authentication process. This will invoke the codePrompter passed either into the constructor of this class or with SetCodePrompter to enter the security code.

Returns

Error.None if the authentication completed successfully.

AuthenticateWithoutEmailRequest

public async Task<Error> AuthenticateWithoutEmailRequest()

Use this to authenticate with a previously acquired, still valid security code.

Returns

Error.None if the authentication completed successfully.

SetCodePrompter

public void SetCodePrompter(IEmailCodePrompter codePrompter)

SetCodePrompter

public void SetCodePrompter(Func<Task<string>> codePrompter)

GetActiveUserIdentifier

public Task<string> GetActiveUserIdentifier()

ModioMultiplatformAuthResolver

public class ModioMultiplatformAuthResolver : IModioAuthService, IGetActiveUserIdentifier, IPotentialModioEmailAuthService
Property

IModioAuthService ServiceOverride

public static IModioAuthService ServiceOverride

get set

IReadOnlyList AuthBindings

public static IReadOnlyList<IModioAuthService> AuthBindings

get

bool IsEmailPlatform

public bool IsEmailPlatform

ModioAPI.Portal Portal

public ModioAPI.Portal Portal
Method

Initialize

public static void Initialize()

Authenticate

public Task<Error> Authenticate(bool displayedTerms, string thirdPartyEmail

GetActiveUserIdentifier

public Task<string> GetActiveUserIdentifier()

Modio.Errors

TypeDescription
ApiError
ArchiveError
ErrorException
ErrorExtensions
FilesystemError
GenericError
HttpError
MetricsError
ModManagementError
ModValidationError
MonetizationError
RateLimitError
SystemError
TempModsError
UserAuthError
UserDataError
ZlibError

ApiError

public class ApiError : Error
Field

ApiError None

ApiError None = new ApiError(ApiErrorCode.NONE)
Property

ApiErrorCode Code

public new ApiErrorCode Code

ArchiveError

public class ArchiveError : Error
Field

ArchiveError None

ArchiveError None = new ArchiveError(ArchiveErrorCode.NONE)
Property

ArchiveErrorCode Code

public new ArchiveErrorCode Code

ErrorException

public class ErrorException : Error
Field

Exception Exception

Exception Exception
Method

GetMessage

public override string GetMessage()

ErrorExtensions

public static partial class ErrorExtensions
Method

GetMessage

public static string GetMessage(this ApiErrorCode errorCode, string append

FilesystemError

public class FilesystemError : Error
Field

FilesystemError None

FilesystemError None = new FilesystemError(FilesystemErrorCode.NONE)
Property

FilesystemErrorCode Code

public new FilesystemErrorCode Code

GenericError

public class GenericError : Error
Field

GenericError None

GenericError None = new GenericError(GenericErrorCode.NONE)
Property

GenericErrorCode Code

public new GenericErrorCode Code

HttpError

public class HttpError : Error
Field

HttpError None

HttpError None = new HttpError(HttpErrorCode.NONE)
Property

HttpErrorCode Code

public new HttpErrorCode Code

MetricsError

public class MetricsError : Error
Field

MetricsError None

MetricsError None = new MetricsError(MetricsErrorCode.NONE)
Property

MetricsErrorCode Code

public new MetricsErrorCode Code

ModManagementError

public class ModManagementError : Error
Field

ModManagementError None

ModManagementError None = new ModManagementError(ModManagementErrorCode.NONE)
Property

ModManagementErrorCode Code

public new ModManagementErrorCode Code

ModValidationError

public class ModValidationError : Error
Field

ModValidationError None

ModValidationError None = new ModValidationError(ModValidationErrorCode.NONE)
Property

ModValidationErrorCode Code

public new ModValidationErrorCode Code

MonetizationError

public class MonetizationError : Error
Field

MonetizationError None

MonetizationError None = new MonetizationError(MonetizationErrorCode.NONE)
Property

MonetizationErrorCode Code

public new MonetizationErrorCode Code

RateLimitError

public class RateLimitError : Error
Field

int RetryAfterSeconds

int RetryAfterSeconds
Remarks

This can be 0 in the event of a rolling rate limit.


SystemError

public class SystemError : Error
Field

SystemError None

SystemError None = new SystemError(SystemErrorCode.NONE)
Property

SystemErrorCode Code

public new SystemErrorCode Code

TempModsError

public class TempModsError : Error
Field

TempModsError None

TempModsError None = new TempModsError(TempModsErrorCode.NONE)
Property

TempModsErrorCode Code

public new TempModsErrorCode Code

UserAuthError

public class UserAuthError : Error
Field

UserAuthError None

UserAuthError None = new UserAuthError(UserAuthErrorCode.NONE)
Property

UserAuthErrorCode Code

public new UserAuthErrorCode Code

UserDataError

public class UserDataError : Error
Field

UserDataError None

UserDataError None = new UserDataError(UserDataErrorCode.NONE)
Property

UserDataErrorCode Code

public new UserDataErrorCode Code

ZlibError

public class ZlibError : Error
Field

ZlibError None

ZlibError None = new ZlibError(ZlibErrorCode.NONE)
Property

ZlibErrorCode Code

public new ZlibErrorCode Code

Enums

ApiErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
MODIO_OUTAGE = ErrorCode.MODIO_OUTAGE
CROSS_ORIGIN_FORBIDDEN = ErrorCode.CROSS_ORIGIN_FORBIDDEN
FAILED_TO_COMPLETE_THE_REQUEST = ErrorCode.FAILED_TO_COMPLETE_THE_REQUEST
INVALID_API_VERSION = ErrorCode.INVALID_API_VERSION
MISSING_APIKEY = ErrorCode.MISSING_APIKEY
MALFORMED_APIKEY = ErrorCode.MALFORMED_APIKEY
INVALID_APIKEY = ErrorCode.INVALID_APIKEY
MISSING_WRITE_PERMISSION = ErrorCode.MISSING_WRITE_PERMISSION
MISSING_READ_PERMISSION = ErrorCode.MISSING_READ_PERMISSION
EXPIRED_OR_REVOKED_ACCESS_TOKEN = ErrorCode.EXPIRED_OR_REVOKED_ACCESS_TOKEN
AUTHENTICATED_ACCOUNT_HAS_BEEN_DELETED = ErrorCode.AUTHENTICATED_ACCOUNT_HAS_BEEN_DELETED
BANNED_USER_ACCOUNT = ErrorCode.BANNED_USER_ACCOUNT
RATELIMITED = ErrorCode.RATELIMITED
RATELIMITED_SAME_ENDPOINT = ErrorCode.RATELIMITED_SAME_ENDPOINT
APIKEY_HAS_NO_GAME = ErrorCode.APIKEY_HAS_NO_GAME
APIKEY_FOR_TEST_ONLY = ErrorCode.APIKEY_FOR_TEST_ONLY
CANNOT_VERIFY_EXTERNAL_CREDENTIALS = ErrorCode.CANNOT_VERIFY_EXTERNAL_CREDENTIALS
USER_NO_ACCEPT_TERMS_OF_USE = ErrorCode.USER_NO_ACCEPT_TERMS_OF_USE
OPEN_IDNOT_CONFIGURED = ErrorCode.OPEN_IDNOT_CONFIGURED
BINARY_FILE_CORRUPTED = ErrorCode.BINARY_FILE_CORRUPTED
BINARY_FILE_UNREADABLE = ErrorCode.BINARY_FILE_UNREADABLE
INVALID_JSON = ErrorCode.INVALID_JSON
MISSING_CONTENT_TYPE_HEADER = ErrorCode.MISSING_CONTENT_TYPE_HEADER
UNSUPPORTED_CONTENT_TYPE_HEADER = ErrorCode.UNSUPPORTED_CONTENT_TYPE_HEADER
REQUESTED_INVALID_RESPONSE_FORMAT = ErrorCode.REQUESTED_INVALID_RESPONSE_FORMAT
VALIDATION_ERRORS = ErrorCode.VALIDATION_ERRORS
REQUESTED_RESOURCE_NOT_FOUND = ErrorCode.REQUESTED_RESOURCE_NOT_FOUND
REQUESTED_GAME_NOT_FOUND = ErrorCode.REQUESTED_GAME_NOT_FOUND
REQUESTED_GAME_DELETED = ErrorCode.REQUESTED_GAME_DELETED
FORBIDDEN_DMCA = ErrorCode.FORBIDDEN_DMCA
FORBIDDEN_HIDDEN = ErrorCode.FORBIDDEN_HIDDEN
ALREADY_UNSUBSCRIBED = ErrorCode.ALREADY_UNSUBSCRIBED
MODFILE_NO_UPLOAD_PERMISSION = ErrorCode.MODFILE_NO_UPLOAD_PERMISSION
REQUESTED_MODFILE_NOT_FOUND = ErrorCode.REQUESTED_MODFILE_NOT_FOUND
FORBIDDEN_TACNOT_ACCEPTED = ErrorCode.FORBIDDEN_TACNOT_ACCEPTED
FORBIDDEN_MISSING_FILE = ErrorCode.FORBIDDEN_MISSING_FILE
INSUFFICIENT_PERMISSION = ErrorCode.INSUFFICIENT_PERMISSION
REQUESTED_MOD_NOT_FOUND = ErrorCode.REQUESTED_MOD_NOT_FOUND
REQUESTED_MOD_DELETED = ErrorCode.REQUESTED_MOD_DELETED
REQUESTED_COMMENT_NOT_FOUND = ErrorCode.REQUESTED_COMMENT_NOT_FOUND
USER_EXISTING_MOD_RATING = ErrorCode.USER_EXISTING_MOD_RATING
SUBMIT_REPORT_RIGHTS_REVOKED = ErrorCode.SUBMIT_REPORT_RIGHTS_REVOKED
REPORTED_ENTITY_UNAVAILABLE = ErrorCode.REPORTED_ENTITY_UNAVAILABLE
MOD_MEDIA_NO_ADD_PERMISSION = ErrorCode.MOD_MEDIA_NO_ADD_PERMISSION
MOD_MEDIA_NO_DELETE_PERMISSION = ErrorCode.MOD_MEDIA_NO_DELETE_PERMISSION
USER_NO_MOD_RATING = ErrorCode.USER_NO_MOD_RATING
MATURE_MODS_NOT_ALLOWED = ErrorCode.MATURE_MODS_NOT_ALLOWED
MUTE_USER_NOT_FOUND = ErrorCode.MUTE_USER_NOT_FOUND
CANNOT_MUTE_YOURSELF = ErrorCode.CANNOT_MUTE_YOURSELF
REQUESTED_USER_NOT_FOUND = ErrorCode.REQUESTED_USER_NOT_FOUND
MONETIZATION_UNEXPECTED_ERROR = ErrorCode.MONETIZATION_UNEXPECTED_ERROR
MONETIZATION_UNABLE_TO_COMMUNICATE = ErrorCode.MONETIZATION_UNABLE_TO_COMMUNICATE
MONETIZATION_AUTHENTICATION = ErrorCode.MONETIZATION_AUTHENTICATION
MONETIZATION_WALLET_FETCH_FAILED = ErrorCode.MONETIZATION_WALLET_FETCH_FAILED
MONETIZATION_IN_MAINTENANCE = ErrorCode.MONETIZATION_IN_MAINTENANCE
MONETIZATION_GAME_MONETIZATION_NOT_ENABLED = ErrorCode.MONETIZATION_GAME_MONETIZATION_NOT_ENABLED
MONETIZATION_PAYMENT_FAILED = ErrorCode.MONETIZATION_PAYMENT_FAILED
MONETIZATION_ITEM_ALREADY_OWNED = ErrorCode.MONETIZATION_ITEM_ALREADY_OWNED
MONETIZATION_INCORRECT_DISPLAY_PRICE = ErrorCode.MONETIZATION_INCORRECT_DISPLAY_PRICE
MONETIZATION_INSUFFICIENT_FUNDS = ErrorCode.MONETIZATION_INSUFFICIENT_FUNDS

ArchiveErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
INVALID_HEADER = ErrorCode.INVALID_HEADER
UNSUPPORTED_COMPRESSION = ErrorCode.UNSUPPORTED_COMPRESSION

ErrorCode
NONE
UNKNOWN = int.MinValue
API_NOT_INITIALIZED
HTTP_EXCEPTION
TERMS_OF_USE_NOT_INITIALIZED
NOT_INITIALIZED
HAS_NOT_ACCEPTED_TERMS_OF_USE
USER_NOT_AUTHENTICATED
USER_ALREADY_AUTHENTICATED
USER_AUTHENTICATION_IN_PROGRESS
NOT_SUBSCRIBED
NO_SEARCH
SEARCH_IN_PROGRESS
PAGE_NOT_SEARCHED
AT_FIRST_PAGE
NO_MORE_PAGES
CANNOT_CAST_NULL_TO_MOD_ID
INVALID_MOD_ID
MOD_TAGS_NOT_INITIALIZED
HTTP_NOT_INITIALIZED

HTTP service not initialized

HTTP_ALREADY_INITIALIZED

HTTP service already initialized

CANNOT_OPEN_CONNECTION

Unable to connect to server

INSUFFICIENT_PERMISSIONS

Insufficient permissions

SECURITY_CONFIGURATION_INVALID

Invalid platform HTTP security configuration

SERVER_UNAVAILABLE

Unable to connect to server

RESOURCE_NOT_AVAILABLE

Invalid endpoint path

EXCESSIVE_REDIRECTS

Exceeded the allowed number of redirects

SERVER_CLOSED_CONNECTION

Server closed connection unexpectedly

DOWNLOAD_NOT_PERMITTED

Trying to download file from outside of mod.io domain

SERVERS_OVERLOADED

The mod.io servers are overloaded. Please wait a bit before trying again

REQUEST_ERROR

An error occurred making a HTTP request

INVALID_RESPONSE

The HTTP response was malformed or not in the expected format

RATE_LIMITED

Too many requests made to the mod.io API within the rate-limiting window. Please wait and try again

UNABLE_TO_CREATE_FOLDER

Could not create folder

UNABLE_TO_CREATE_FILE

Could not create file

NO_PERMISSION

Insufficient permission for filesystem operation

FILE_LOCKED

File locked (already in use?)

FILE_NOT_FOUND

File not found

DIRECTORY_NOT_EMPTY

Directory not empty

READ_ERROR

Error reading file

WRITE_ERROR

Error writing file

DIRECTORY_NOT_FOUND

Directory not found

UNABLE_TO_INIT_STORAGE

Could not initialize user storage

STATUS_AUTH_TOKEN_MISSING

OAuth token was missing

STATUS_AUTH_TOKEN_INVALID

The user's OAuth token was invalid

NO_AUTH_TOKEN

No Auth token available

ALREADY_AUTHENTICATED

User is already authenticated. To use a new user and OAuth token, call ClearUserDataAsync

INVALID_USER

Invalid user

BLOB_MISSING

Some or all of the user data was missing from storage

INVALID_HEADER

File did not have a valid archive header

UNSUPPORTED_COMPRESSION

File uses an unsupported compression method. Please use STORE or DEFLATE

OPERATION_CANCELLED

The asynchronous operation was cancelled before it completed

OPERATION_ERROR

The asynchronous operation produced an error before it completed

COULD_NOT_CREATE_HANDLE

Operating system could not create the requested handle

NO_DATA_AVAILABLE

No data available

END_OF_FILE

End of file

QUEUE_CLOSED

Operation could not be started as the service queue was missing or destroyed

SDKALREADY_INITIALIZED

mod.io SDK was already initialized

SDKNOT_INITIALIZED

mod.io SDK was not initialized

INDEX_OUT_OF_RANGE

Index out of range

BAD_PARAMETER

Bad parameter supplied

SHUTTING_DOWN

mod.io SDK is shutting down, operation is cancelled

MISSING_COMPONENTS

mod.io SDK could not find required components

UNKNOWN_SYSTEM_ERROR

A low-level system error occured, refer to the logs for code and location

NEED_BUFFERS

Need more input data

END_OF_STREAM

End of deflate stream

STREAM_ERROR

Stream error

INVALID_BLOCK_TYPE

Invalid block type

INVALID_STORED_LENGTH

Invalid store block length

TOO_MANY_SYMBOLS

Too many symbols

INVALID_CODE_LENGTHS

Invalid code lengths

INVALID_BIT_LENGTH_REPEAT

Invalid bit length repeat

MISSING_EOB

Missing end-of-block marker

INVALID_LITERAL_LENGTH

Invalid literal length

INVALID_DISTANCE_CODE

Invalid distance code

INVALID_DISTANCE

Invalid distance

OVER_SUBSCRIBED_LENGTH

Over-subscribed length

INCOMPLETE_LENGTH_SET

Incomplete length set

NO_PENDING_WORK

Internal: No mods require processing for this iteration

INSTALL_OR_UPDATE_CANCELLED

The current mod installation or update was cancelled

MOD_MANAGEMENT_DISABLED

Could not perform operation: Mod management is disabled and mod collection is locked

MOD_MANAGEMENT_ALREADY_ENABLED

Mod management was already enabled and the callback remains unchanged.

UPLOAD_CANCELLED

The current modfile upload was cancelled

MOD_BEING_PROCESSED

The specified mod's files are currently being updated by the SDK. Please try again later.

TEMP_MOD_SET_NOT_INITIALIZED

Temporary mod set was not initialized. Please call InitTempModSet.

INCOMPATIBLE_DEPENDENCIES

The dependencies for this mod are incompatible with your version of the game. Please contact the mod creator for support.

NO_FILES_FOUND_FOR_MOD

Mod directory does not contain any files

MOD_DIRECTORY_NOT_FOUND

Mod directory does not exist

MD5DOES_NOT_MATCH

Mod MD5 does not match

DISPLAY_PRICE_INCORRECT

The display price for the mod was out-of-date or incorrect. Please retry with the correct display price.

MONETIZATION_AUTHENTICATION_FAILED

A failure has occured when trying to authenticate with the monetization system.

WALLET_FETCH_FAILED

Unable to fetch the account's wallet. Please confirm the account has one

GAME_MONETIZATION_NOT_ENABLED

The game does not have active monetization.

PAYMENT_FAILED

The payment transaction failed. Please try again later.

INCORRECT_DISPLAY_PRICE

The given display price does not match the price of the mod.

ITEM_ALREADY_OWNED

The account already owns this item.

INSUFFICIENT_FUNDS

The account has insufficent funds to make this purchase.

RETRY_ENTITLEMENTS

Some entitlements could not be verified. Please try again.

INVALID_METRICS_SECRET

The configured Metrics Secret Key is invalid.

CANT_INSTALL_TAINTED_MOD

A mod installation has previously failed, can't install all needed mods for this temporary mod session.

MODIO_OUTAGE = 10000

mod.io is currently experiencing an outage. (rare)

CROSS_ORIGIN_FORBIDDEN = 10001

Cross-origin request forbidden.

FAILED_TO_COMPLETE_THE_REQUEST = 10002

mod.io failed to complete the request, please try again. (rare)

INVALID_API_VERSION = 10003

API version supplied is invalid.

MISSING_APIKEY = 11000

api_key is missing from your request.

MALFORMED_APIKEY = 11001

api_key supplied is malformed.

INVALID_APIKEY = 11002

api_key supplied is invalid.

MISSING_WRITE_PERMISSION = 11003

Access token is missing the write scope to perform the request.

MISSING_READ_PERMISSION = 11004

Access token is missing the read scope to perform the request.

EXPIRED_OR_REVOKED_ACCESS_TOKEN = 11005

Access token is expired, or has been revoked.

AUTHENTICATED_ACCOUNT_HAS_BEEN_DELETED = 11006

Authenticated user account has been deleted.

BANNED_USER_ACCOUNT = 11007

Authenticated user account has been banned by mod.io admins.

RATELIMITED = 11008

You have been ratelimited for making too many requests. See Rate Limiting.

RATELIMITED_SAME_ENDPOINT = 11009

You have been ratelimited from calling this endpoint again, for making too many requests. See Rate Limiting.

EMAIL_LOGIN_CODE_EXPIRED = 11012

Email login code has expired, please request a new one.

EMAIL_LOGIN_CODE_INVALID = 11014

Email login code is invalid

APIKEY_HAS_NO_GAME = 11016

The api_key supplied in the request must be associated with a game.

APIKEY_FOR_TEST_ONLY = 11017

The api_key supplied in the request is for test environment purposes only and cannot be used for this functionality.

STEAM_APP_TICKET_INVALID = 11018
CANNOT_VERIFY_EXTERNAL_CREDENTIALS = 11032

mod.io was unable to verify the credentials against the external service provider.

USER_NO_ACCEPT_TERMS_OF_USE = 11074

The user has not agreed to the mod.io Terms of Use. Please see terms_agreed parameter description and the Terms endpoint for more information.

OPEN_IDNOT_CONFIGURED = 11086

You must configure your OpenID config for your game in your game authentication settings before being able to authenticate users.

BINARY_FILE_CORRUPTED = 13001

The submitted binary file is corrupted.

BINARY_FILE_UNREADABLE = 13002

The submitted binary file is unreadable.

INVALID_JSON = 13004

You have used the input_json parameter with semantically incorrect JSON.

MISSING_CONTENT_TYPE_HEADER = 13005

The Content-Type header is missing from your request.

UNSUPPORTED_CONTENT_TYPE_HEADER = 13006

The Content-Type header is not supported for this endpoint.

REQUESTED_INVALID_RESPONSE_FORMAT = 13007

You have requested a response format that is not supported (JSON only).

VALIDATION_ERRORS = 13009

The request contains validation errors for the data supplied. See the attached errors field within the Error Object to determine which input failed.

REQUESTED_RESOURCE_NOT_FOUND = 14000

The requested resource does not exist.

REQUESTED_GAME_NOT_FOUND = 14001

The requested game could not be found.

REQUESTED_GAME_DELETED = 14006

The requested game has been deleted.

FORBIDDEN_DMCA = 15000

This mod is currently under DMCA and the user cannot be subscribed to it.

FORBIDDEN_HIDDEN = 15001

This mod is hidden and the user cannot be subscribed to it.

ALREADY_SUBSCRIBED = 15004

The user is already subscribed to the specified mod

ALREADY_UNSUBSCRIBED = 15005

The authenticated user is not subscribed to the mod.

MODFILE_NO_UPLOAD_PERMISSION = 15006

The authenticated user does not have permission to upload modfiles for the specified mod. Ensure the user is a team manager or administrator.

REQUESTED_MODFILE_NOT_FOUND = 15010

The requested modfile could not be found.

FORBIDDEN_TACNOT_ACCEPTED = 15011

The item has not been accepted and can not be purchased at this time.

INSUFFICIENT_PERMISSION = 15019

The authenticated user does not have permission to delete this mod. This action is restricted to team managers and administrators only.

FORBIDDEN_MISSING_FILE = 15020

This mod is missing a file and cannot be subscribed to.

REQUESTED_MOD_NOT_FOUND = 15022

The requested mod could not be found.

REQUESTED_MOD_DELETED = 15023

The requested mod has been deleted.

REQUESTED_COMMENT_NOT_FOUND = 15026

The requested comment could not be found.

USER_EXISTING_MOD_RATING = 15028

The authenticated user has already submitted a rating for this mod.

SUBMIT_REPORT_RIGHTS_REVOKED = 15029

The authenticated user does not have permission to submit reports on mod.io due to their access being revoked.

REPORTED_ENTITY_UNAVAILABLE = 15030

The specified resource is not able to be reported at this time, this is potentially due to the resource in question being removed.

MOD_DEPENDENCIES_NO_ADD_PERMISSION = 15031

The authenticated user does not have permission to modify this resource.

MOD_DEPENDENCIES_NO_DELETE_PERMISSION = 15032

The authenticated user does not have permission to modify this resource.

USER_NO_MOD_RATING = 15043

The authenticated user cannot clear the mod rating as none exists.

MOD_MEDIA_NO_ADD_PERMISSION = 15035

The authenticated user does not have permission to modify this resource.

MOD_MEDIA_NO_DELETE_PERMISSION = 15036

The authenticated user does not have permission to modify this resource.

MATURE_MODS_NOT_ALLOWED = 15054

This game does not allow mature mods.

MUTE_USER_NOT_FOUND = 17000

The user with the supplied UserID could not be found.

CANNOT_MUTE_YOURSELF = 17039

You cannot mute yourself.

INSUFFICIENT_SPACE = 20442

Insufficient space for file

REQUESTED_USER_NOT_FOUND = 21000

The requested user could not be found.

MONETIZATION_UNEXPECTED_ERROR = 900000

An un expected error during a purchase transaction has occured. Please try again later.

MONETIZATION_UNABLE_TO_COMMUNICATE = 900001

Unable to communicate with the monetization system. Please try again later.

MONETIZATION_AUTHENTICATION = 900002

A failure has occured when trying to authenticate with the monetization system.

USER_MONETIZATION_NOT_CONFIGURED = 900007

The account has not been created with monetization.

MONETIZATION_WALLET_FETCH_FAILED = 900008

Unable to fetch the accounts' wallet. Please confirm the account has one

MONETIZATION_IN_MAINTENANCE = 900012

The monetization is currently in maintance mode. Please try again later.

USER_MONETIZATION_DISABLED = 900015

The account does not have monetization enabled.

MONETIZATION_GAME_MONETIZATION_NOT_ENABLED = 900022

The game does not have active monetization.

MONETIZATION_PAYMENT_FAILED = 900030

The payment transaction failed. Please try again later.

MONETIZATION_ITEM_ALREADY_OWNED = 900034

The account already owns this item.

MONETIZATION_INCORRECT_DISPLAY_PRICE = 900035

The given display price does not match the price of the mod.

MONETIZATION_INSUFFICIENT_FUNDS = 900049

The account has insufficent funds to make this purchase.


FilesystemErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
UNABLE_TO_CREATE_FOLDER = ErrorCode.UNABLE_TO_CREATE_FOLDER
UNABLE_TO_CREATE_FILE = ErrorCode.UNABLE_TO_CREATE_FILE
INSUFFICIENT_SPACE = ErrorCode.INSUFFICIENT_SPACE
NO_PERMISSION = ErrorCode.NO_PERMISSION
FILE_LOCKED = ErrorCode.FILE_LOCKED
FILE_NOT_FOUND = ErrorCode.FILE_NOT_FOUND
DIRECTORY_NOT_EMPTY = ErrorCode.DIRECTORY_NOT_EMPTY
READ_ERROR = ErrorCode.READ_ERROR
WRITE_ERROR = ErrorCode.WRITE_ERROR
DIRECTORY_NOT_FOUND = ErrorCode.DIRECTORY_NOT_FOUND

GenericErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
OPERATION_CANCELLED = ErrorCode.OPERATION_CANCELLED
OPERATION_ERROR = ErrorCode.OPERATION_ERROR
COULD_NOT_CREATE_HANDLE = ErrorCode.COULD_NOT_CREATE_HANDLE
NO_DATA_AVAILABLE = ErrorCode.NO_DATA_AVAILABLE
END_OF_FILE = ErrorCode.END_OF_FILE
QUEUE_CLOSED = ErrorCode.QUEUE_CLOSED
SDKALREADY_INITIALIZED = ErrorCode.SDKALREADY_INITIALIZED
SDKNOT_INITIALIZED = ErrorCode.SDKNOT_INITIALIZED
INDEX_OUT_OF_RANGE = ErrorCode.INDEX_OUT_OF_RANGE
BAD_PARAMETER = ErrorCode.BAD_PARAMETER
SHUTTING_DOWN = ErrorCode.SHUTTING_DOWN
MISSING_COMPONENTS = ErrorCode.MISSING_COMPONENTS

HttpErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
HTTP_NOT_INITIALIZED = ErrorCode.HTTP_NOT_INITIALIZED
HTTP_ALREADY_INITIALIZED = ErrorCode.HTTP_ALREADY_INITIALIZED
CANNOT_OPEN_CONNECTION = ErrorCode.CANNOT_OPEN_CONNECTION
INSUFFICIENT_PERMISSIONS = ErrorCode.INSUFFICIENT_PERMISSIONS
SECURITY_CONFIGURATION_INVALID = ErrorCode.SECURITY_CONFIGURATION_INVALID
SERVER_UNAVAILABLE = ErrorCode.SERVER_UNAVAILABLE
RESOURCE_NOT_AVAILABLE = ErrorCode.RESOURCE_NOT_AVAILABLE
EXCESSIVE_REDIRECTS = ErrorCode.EXCESSIVE_REDIRECTS
SERVER_CLOSED_CONNECTION = ErrorCode.SERVER_CLOSED_CONNECTION
DOWNLOAD_NOT_PERMITTED = ErrorCode.DOWNLOAD_NOT_PERMITTED
SERVERS_OVERLOADED = ErrorCode.SERVERS_OVERLOADED
REQUEST_ERROR = ErrorCode.REQUEST_ERROR
INVALID_RESPONSE = ErrorCode.INVALID_RESPONSE
RATE_LIMITED = ErrorCode.RATE_LIMITED

MetricsErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
INVALID_METRICS_SECRET = ErrorCode.INVALID_METRICS_SECRET

ModManagementErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
ALREADY_SUBSCRIBED = ErrorCode.ALREADY_SUBSCRIBED
NO_PENDING_WORK = ErrorCode.NO_PENDING_WORK
INSTALL_OR_UPDATE_CANCELLED = ErrorCode.INSTALL_OR_UPDATE_CANCELLED
MOD_MANAGEMENT_DISABLED = ErrorCode.MOD_MANAGEMENT_DISABLED
MOD_MANAGEMENT_ALREADY_ENABLED = ErrorCode.MOD_MANAGEMENT_ALREADY_ENABLED
UPLOAD_CANCELLED = ErrorCode.UPLOAD_CANCELLED
MOD_BEING_PROCESSED = ErrorCode.MOD_BEING_PROCESSED
TEMP_MOD_SET_NOT_INITIALIZED = ErrorCode.TEMP_MOD_SET_NOT_INITIALIZED
INCOMPATIBLE_DEPENDENCIES = ErrorCode.INCOMPATIBLE_DEPENDENCIES

ModValidationErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
NO_FILES_FOUND_FOR_MOD = ErrorCode.NO_FILES_FOUND_FOR_MOD
MOD_DIRECTORY_NOT_FOUND = ErrorCode.MOD_DIRECTORY_NOT_FOUND
MD5DOES_NOT_MATCH = ErrorCode.MD5DOES_NOT_MATCH

MonetizationErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
DISPLAY_PRICE_INCORRECT = ErrorCode.DISPLAY_PRICE_INCORRECT
MONETIZATION_AUTHENTICATION_FAILED = ErrorCode.MONETIZATION_AUTHENTICATION_FAILED
WALLET_FETCH_FAILED = ErrorCode.WALLET_FETCH_FAILED
USER_MONETIZATION_NOT_CONFIGURED = ErrorCode.USER_MONETIZATION_NOT_CONFIGURED
USER_MONETIZATION_DISABLED = ErrorCode.USER_MONETIZATION_DISABLED
GAME_MONETIZATION_NOT_ENABLED = ErrorCode.GAME_MONETIZATION_NOT_ENABLED
PAYMENT_FAILED = ErrorCode.PAYMENT_FAILED
INCORRECT_DISPLAY_PRICE = ErrorCode.INCORRECT_DISPLAY_PRICE
ITEM_ALREADY_OWNED = ErrorCode.ITEM_ALREADY_OWNED
INSUFFICIENT_FUNDS = ErrorCode.INSUFFICIENT_FUNDS
RETRY_ENTITLEMENTS = ErrorCode.RETRY_ENTITLEMENTS

RateLimitErrorCode
RATELIMITED = ErrorCode.RATELIMITED
RATELIMITED_SAME_ENDPOINT = 11009

SystemErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
UNKNOWN_SYSTEM_ERROR = ErrorCode.UNKNOWN_SYSTEM_ERROR

TempModsErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
CANT_INSTALL_TAINTED_MOD = ErrorCode.CANT_INSTALL_TAINTED_MOD

UserAuthErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
UNABLE_TO_INIT_STORAGE = ErrorCode.UNABLE_TO_INIT_STORAGE
STATUS_AUTH_TOKEN_MISSING = ErrorCode.STATUS_AUTH_TOKEN_MISSING
STATUS_AUTH_TOKEN_INVALID = ErrorCode.STATUS_AUTH_TOKEN_INVALID
NO_AUTH_TOKEN = ErrorCode.NO_AUTH_TOKEN
ALREADY_AUTHENTICATED = ErrorCode.ALREADY_AUTHENTICATED
EMAIL_LOGIN_CODE_EXPIRED = ErrorCode.EMAIL_LOGIN_CODE_EXPIRED
EMAIL_LOGIN_CODE_INVALID = ErrorCode.EMAIL_LOGIN_CODE_INVALID

UserDataErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
INVALID_USER = ErrorCode.INVALID_USER
BLOB_MISSING = ErrorCode.BLOB_MISSING

ZlibErrorCode
NONE = ErrorCode.NONE
UNKNOWN = ErrorCode.UNKNOWN
NEED_BUFFERS = ErrorCode.NEED_BUFFERS
END_OF_STREAM = ErrorCode.END_OF_STREAM
STREAM_ERROR = ErrorCode.STREAM_ERROR
INVALID_BLOCK_TYPE = ErrorCode.INVALID_BLOCK_TYPE
INVALID_STORED_LENGTH = ErrorCode.INVALID_STORED_LENGTH
TOO_MANY_SYMBOLS = ErrorCode.TOO_MANY_SYMBOLS
INVALID_CODE_LENGTHS = ErrorCode.INVALID_CODE_LENGTHS
INVALID_BIT_LENGTH_REPEAT = ErrorCode.INVALID_BIT_LENGTH_REPEAT
MISSING_EOB = ErrorCode.MISSING_EOB
INVALID_LITERAL_LENGTH = ErrorCode.INVALID_LITERAL_LENGTH
INVALID_DISTANCE_CODE = ErrorCode.INVALID_DISTANCE_CODE
INVALID_DISTANCE = ErrorCode.INVALID_DISTANCE
OVER_SUBSCRIBED_LENGTH = ErrorCode.OVER_SUBSCRIBED_LENGTH
INCOMPLETE_LENGTH_SET = ErrorCode.INCOMPLETE_LENGTH_SET

Modio.Extensions

TypeDescription
DateTimeExtensions
TaskExtensions

DateTimeExtensions

public static class DateTimeExtensions
Method

GetUtcDateTime

public static DateTime GetUtcDateTime(this long timeStamp)

TaskExtensions

public static class TaskExtensions
Method

ForgetTaskSafely

public static async void ForgetTaskSafely(this Task task)

Modio.FileIO

TypeDescription
BaseDataStorageSystemIO Implementation of IModioDataStorage
DefaultRootPathProvider
IModioDataStorageInterface for the platform file IO services
IModioRootPathProvider
LinuxDataStorage
MD5ComputingStreamWrapper
MacDataStorage
ModioDiskTestSettings
WindowsRootPathProviderProvides a root path for windows

BaseDataStorage

public class BaseDataStorage : IModioDataStorage

SystemIO Implementation of IModioDataStorage

Method

Init

public virtual Task<Error> Init()

Shutdown

public virtual async Task Shutdown()

DebugDeleteAllGameData

[ModioDebugMenu]  public static void DebugDeleteAllGameData()

DeleteAllGameData

public Task<Error> DeleteAllGameData()

ReadGameData

public virtual Task<(Error error, GameData result)> ReadGameData()

WriteGameData

public virtual Task<Error> WriteGameData(GameData gameData)

DeleteGameData

public virtual Task<Error> DeleteGameData()

ReadIndexData

public virtual Task<(Error error, ModIndex index)> ReadIndexData()

WriteIndexData

public virtual Task<Error> WriteIndexData(ModIndex index)

DeleteIndexData

public virtual Task<Error> DeleteIndexData()

ReadUserData

public virtual Task<(Error error, UserSaveObject result)> ReadUserData(string localUserId)

WriteUserData

public virtual Task<Error> WriteUserData(UserSaveObject userObject)

DeleteUserData

public virtual Task<Error> DeleteUserData(string localUserId)

ReadAllSavedUserData

public virtual async Task<(Error error, UserSaveObject[] results)> ReadAllSavedUserData()

DownloadModFileFromStream

public virtual async Task<Error> DownloadModFileFromStream(  long modId,  long modfileId,  Stream downloadStream,  string md5Hash,  CancellationToken token  )

CalculateMd5Hash

public static async Task<byte[]> CalculateMd5Hash(string filePath, byte[] buffer)

Calculate a MD5 Hash

Parameters

filePath buffer

Returns

DeleteModfile

public virtual Task<Error> DeleteModfile(long modId, long modfileId)

ScanForModfiles

public virtual Task<(Error error, List<(long modId, long modfileId)> results)> ScanForModfiles()

InstallMod

public virtual async Task<Error> InstallMod(Mod mod, long modfileId, CancellationToken token)

InstallModFromStream

public virtual async Task<Error> InstallModFromStream(  Mod mod,  long modfileId,  Stream stream,  string md5Hash,  CancellationToken token  )

DeleteInstalledMod

public virtual Task<Error> DeleteInstalledMod(Mod mod, long modfileId)

ScanForInstalledMods

public virtual Task<(Error error, List<(long modId, long modfileId)> results)> ScanForInstalledMods()

ReadCachedImage

public virtual async Task<(Error error, byte[] result)> ReadCachedImage(Uri serverPath)

WriteCachedImage

public virtual async Task<Error> WriteCachedImage(Uri serverPath, byte[] data)

DeleteCachedImage

public virtual Task<Error> DeleteCachedImage(Uri serverPath)

IsThereAvailableFreeSpaceFor

public virtual Task<bool> IsThereAvailableFreeSpaceFor(long tempBytes, long persistentBytes)

IsThereAvailableFreeSpaceForModfile

public virtual Task<bool> IsThereAvailableFreeSpaceForModfile(long bytes)

GetAvailableFreeSpaceForModfile

public virtual Task<long> GetAvailableFreeSpaceForModfile()

IsThereAvailableFreeSpaceForModInstall

public virtual Task<bool> IsThereAvailableFreeSpaceForModInstall(long bytes)

GetAvailableFreeSpaceForModInstall

public virtual Task<long> GetAvailableFreeSpaceForModInstall()

GetModfilePath

public virtual string GetModfilePath(long modId, long modfileId)

GetInstallPath

public virtual string GetInstallPath(long modId, long modfileId)  // Match V2 install path. Note that initial V3 versions put mods in an "Installed" directory; see MigrateLegacyModInstalls

DoesModfileExist

public virtual bool DoesModfileExist(long modId, long modfileId)

DoesInstallExist

public virtual bool DoesInstallExist(long modId, long modfileId)

CompressToZip

public virtual async Task<Error> CompressToZip(string filePath, Stream outputTo)

DefaultRootPathProvider

public class DefaultRootPathProvider : IModioRootPathProvider
Property

string Path

public virtual string Path

string UserPath

public string UserPath

IModioDataStorage

public interface IModioDataStorage

Interface for the platform file IO services


IModioRootPathProvider

public interface IModioRootPathProvider
Property

string Path

public string Path

get

Path of Mod Installs


LinuxDataStorage

public class LinuxDataStorage : BaseDataStorage

MD5ComputingStreamWrapper

public class MD5ComputingStreamWrapper : Stream
Property

int TotalBytesRead

public int TotalBytesRead

get

bool CanRead

public override bool CanRead

bool CanSeek

public override bool CanSeek

bool CanWrite

public override bool CanWrite

long Length

public override long Length

long Position

public override long Position

get set

Method

Flush

public override void Flush()

GetMD5HashAsync

public async Task<string> GetMD5HashAsync()

ReadAsync

public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)

Read

public override int Read(byte[] buffer, int offset, int count)

Seek

public override long Seek(long offset, SeekOrigin origin)

SetLength

public override void SetLength(long value)

Write

public override void Write(byte[] buffer, int offset, int count)

MacDataStorage

public class MacDataStorage : BaseDataStorage

ModioDiskTestSettings

public class ModioDiskTestSettings : IModioServiceSettings
Field

bool OverrideDiskSpaceRemaining

bool OverrideDiskSpaceRemaining

int BytesRemaining

int BytesRemaining

WindowsRootPathProvider

public class WindowsRootPathProvider : IModioRootPathProvider

Provides a root path for windows

Property

string Path

public string Path

Path to the shared public folder;

Typically returns "C:\Users\Public"

string UserPath

public string UserPath

Path to the local user app data folder;

Typically returns "C:\Users&lt;UserName>\AppData\Roaming"

Method

IsPublicEnvironmentVariableSet

public static bool IsPublicEnvironmentVariableSet()

Is the required environment variable set.

True if the environment variable "public" is set, false otherwise.


Modio.Images

TypeDescription
BaseImageCache
BaseImageCache
ImageCacheBytes
ImageReferenceDownloadReference that contains the URL to download an image with. (DownloadReference is serializable with Unity's JsonUtility)
LazyImage
ModioImageSource

BaseImageCache

public abstract class BaseImageCache
Method

CacheToDisk

public static void CacheToDisk(ImageReference image, bool shouldCache)

BaseImageCache

public abstract class BaseImageCache<T> : BaseImageCache where T : class
Method

GetCachedImage

public T GetCachedImage(ImageReference uri)

DownloadImage

public Task<(Error errror, T image)> DownloadImage(ImageReference uri)

GetFirstCachedImage

public T GetFirstCachedImage(IEnumerable<ImageReference> imageReferences)

ImageCacheBytes

public class ImageCacheBytes : BaseImageCache<byte[]>
Field

ImageCacheBytes Instance

ImageCacheBytes Instance = new ImageCacheBytes()

ImageReference

[System.Serializable]  public struct ImageReference : IEquatable<ImageReference>

DownloadReference that contains the URL to download an image with. (DownloadReference is serializable with Unity's JsonUtility)

Property

bool IsValid

public bool IsValid

Check if there is a valid url for this image. You may want to check this before using

Returns

true if the url isn't null

string Url

public string Url

get

Method

Equals

public bool Equals(ImageReference other)

Equals

public override bool Equals(object obj)

GetHashCode

public override int GetHashCode()

LazyImage

public class LazyImage<TImage> where TImage : class
Method

SetImage

public async void SetImage<T>(ModioImageSource<T> source, T resolution) where T : Enum

ModioImageSource

public class ModioImageSource<TResolution> where TResolution:Enum
Property

string FileName

public string FileName

get

Method

GetUri

public ImageReference GetUri(TResolution resolution)

GetAllReferences

public IEnumerable<ImageReference> GetAllReferences()

CacheLowestResolutionOnDisk

public void CacheLowestResolutionOnDisk(bool shouldCache)

Modio.Mods

TypeDescription
GameData
GameTagCategory
ModA mod.io mod. This is a mutable class that will be maintained and updated as more data arrives. See OnModUpdated & AddChangeListener for listening to these changes and updating UI elements accordingly.
ModDependencies
ModId
ModSearchFilter
ModStats
ModTag
Modfile
ModfileDownloadReference
ModioPage

GameData

public class GameData
Field

GameTagCategory Categories

GameTagCategory[] Categories

GameTagCategory

public class GameTagCategory
Field

string Name

string Name

bool MultiSelect

bool MultiSelect

ModTag Tags

ModTag[] Tags

bool Hidden

bool Hidden

bool Locked

bool Locked
Method

GetGameTagOptions

public static async Task<(Error, GameTagCategory[])> GetGameTagOptions()

Mod

public class Mod

A mod.io mod. This is a mutable class that will be maintained and updated as more data arrives. See OnModUpdated & AddChangeListener for listening to these changes and updating UI elements accordingly.

Property

ModId Id

public ModId Id

get

string Name

public string Name

get

string Summary

public string Summary

string Description

public string Description

get

DateTime DateLive

public DateTime DateLive

get

DateTime DateUpdated

public DateTime DateUpdated

get

ModTag Tags

public ModTag[] Tags

get

string MetadataBlob

public string MetadataBlob

get

Dictionary MetadataKvps

public Dictionary<string,string> MetadataKvps

get

ModCommunityOptions CommunityOptions

public ModCommunityOptions CommunityOptions

get

ModMaturityOptions MaturityOptions

public ModMaturityOptions MaturityOptions

get

Modfile File

public Modfile File

get

ModStats Stats

public ModStats Stats

get

long Price

public long Price

get

bool IsMonetized

public bool IsMonetized

get

public ModioImageSource<LogoResolution> Logo

get

public ModioImageSource<GalleryResolution>[] Gallery

get

UserProfile Creator

public UserProfile Creator

get

ModDependencies Dependencies

public ModDependencies Dependencies

get

ModRating CurrentUserRating

public ModRating CurrentUserRating

get

bool IsSubscribed

public bool IsSubscribed

get

bool IsPurchased

public bool IsPurchased

get

bool IsEnabled

public bool IsEnabled

get set

Method

AddChangeListener

public static void AddChangeListener(ModChangeType subscribedChange, Action<Mod, ModChangeType> listener)

Adds an event handler to listen for whenever the ModChangeType of a mod is changed.

Remarks

ModChangeType is a bit flag, multiple changes can be listened for with one handler.

RemoveChangeListener

public static void RemoveChangeListener(ModChangeType subscribedChange, Action<Mod, ModChangeType> listener)

Create

public static ModBuilder Create()

Constructs a ModBuilder to use to create a new mod.

Remarks

Requires a ChangeFlags.Name, a ChangeFlags.Summary and a ChangeFlags.Logo to publish a new mod.

Edit

public ModBuilder Edit()

Constructs a ModBuilder to use to edit this mod.

Get

public static Mod Get(long id)

Subscribe

public Task<Error> Subscribe(bool includeDependencies

Unsubscribe

public Task<Error> Unsubscribe()

SetIsEnabled

public void SetIsEnabled(bool isEnabled)

GetMods

public static Task<(Error error, ModioPage<Mod> page)> GetMods(ModSearchFilter filter)

Gets all mods that qualify the provided ModSearchFilter parameters.

Remarks

This will cache searches and results. If a search exists in the cache, this method will return those results.

GetMods

public static async Task<(Error error, ModioPage<Mod> page)> GetMods(ModioAPI.Mods.GetModsFilter filter)

Gets all mods that qualify the provided ModioAPI.Mods.GetModsFilter parameters.

Remarks

This will cache searches and results. If a search exists in the cache, this method will return those results. The ModioAPI.Mods.GetModsFilter is more advanced than the ModSearchFilter and will allow more granularity.

GetModDetailsFromServer

public async Task<(Error error, Mod result)> GetModDetailsFromServer()

Gets this mod's details from the mod.io server and applies those details to this mod.

Returns

An Error with an Error Code if there was one.

GetMod

public static async Task<(Error error, Mod result)> GetMod(ModId modId)

Gets a Mod from the mod.io server. Will check the cache if a concrete object has already been cached. If one has been cached, it will apply the details to the found concrete mod.

GetMods

public static async Task<(Error error, ICollection<Mod>)> GetMods(ICollection<long> neededModIds)

Gets all mods from a collection of IDs. Will intelligently check the cache for any present mods and only get the mods that're missing from the cache.

Parameters

neededModIds A collection of ModIds or longs to get.

Remarks

This can be considered a method to guarantee that the mods are in the cache by completion of this task. Use this whenever you don't know if you'll have the mod data ready but need to be certain it's available.

Returns

A collection of Mods.

RateMod

public async Task<Error> RateMod(ModRating rating)

Rate this mod as either a single positive, negative or no rating.

Report

public async Task<Error> Report(  ReportType reportType,  ModNotWorkingReason reportReason,  string contact,  string summary  )

Reports this mod to mod.io. ReportType & ModNotWorkingReason for report reasons.

Purchase

public async Task<Error> Purchase(bool subscribeOnPurchase)

UninstallOtherUserMod

public void UninstallOtherUserMod()

Will enqueue this mod for uninstallation with ModInstallationManagement.

Remarks

If the mod is subscribed to, this operation will cancel and output a warning.

ToString

public override string ToString()
Enum
X320_Y180
X640_Y360
X1280_Y720
Original
X320_Y180
X1280_Y720
Original

ModDependencies

public class ModDependencies
Property

int Count

public int Count

get

bool HasDependencies

public bool HasDependencies

get

bool IsMapped

public bool IsMapped
Method

GetAllDependencies

public async Task<(Error error, IReadOnlyList<Mod> results)> GetAllDependencies()

Gets all dependencies of the dependent.

Returns

An asynchronous task that returns a tuple (Error error, IReadOnlyList{Mod} results), where: error is the error encountered during the task (if any) result is a readonly list of Mod dependencies.


ModId

public readonly struct ModId
Method

IsValid

public bool IsValid()

Equals

public override bool Equals(object obj)

GetHashCode

public override int GetHashCode()

ToString

public override string ToString()

ModSearchFilter

[Serializable]  public class ModSearchFilter
Property

int PageIndex

public int PageIndex

get set

int PageSize

public int PageSize

get set

bool ShowMatureContent

public bool ShowMatureContent

get set

SearchFilterPlatformStatus PlatformStatus

public SearchFilterPlatformStatus PlatformStatus

get set

SortModsBy SortBy

public SortModsBy SortBy

get set

bool IsSortAscending

public bool IsSortAscending

get set

RevenueType RevenueType

public RevenueType RevenueType

get set

Method

AddSearchPhrase

public void AddSearchPhrase(string phrase, Filtering filtering

Adds a phrase into the filter to be used when filtering mods in a request.

Parameters

phrase the string to be added to the filter filtering (Optional) type of filter to be used with the text, defaults to Full text search

AddSearchPhrases

public void AddSearchPhrases(ICollection<string> phrase, Filtering filtering

ClearSearchPhrases

public void ClearSearchPhrases()

ClearSearchPhrases

public void ClearSearchPhrases(Filtering filtering)

GetSearchPhrase

public IList<string> GetSearchPhrase(Filtering filtering)

AddTag

public void AddTag(string tag)

Adds a tag to be used in filtering mods for a request.

Parameters

tag the tag to be added to the filter

See Also

ModTag GameTagCategory

AddTags

public void AddTags(IEnumerable<string> tags)

Adds multiple tags used in filtering mods for a request.

Parameters

tags the tags to be added to the filter

See Also

ModTag GameTagCategory

ClearTags

public void ClearTags()

GetTags

public IReadOnlyList<string> GetTags()

AddUser

public void AddUser(UserProfile user)

Adds a specific user to the filter, so that mods that were not created by the user (or other users added to the filter) will not be returned.

See Also

UserProfile

GetUsers

public IReadOnlyList<UserProfile> GetUsers()

GetModsFilter

public ModioAPI.Mods.GetModsFilter GetModsFilter()

ModStats

public class ModStats
Property

long Subscribers

public long Subscribers

get

long Downloads

public long Downloads

get

long RatingsPositive

public long RatingsPositive

get

long RatingsNegative

public long RatingsNegative

get

long RatingsPercent

public long RatingsPercent

get


ModTag

public class ModTag
Field

string ApiName

string ApiName
Property

string NameLocalized

public string NameLocalized

get

bool IsVisible

public bool IsVisible

get

int Count

public int Count

get set

Method

SetLocalizations

public void SetLocalizations(Dictionary<string,string> translations)

Modfile

public class Modfile
Property

long ModId

public long ModId

get

long Id

public long Id

get

long FileSize

public long FileSize

get

long ArchiveFileSize

public long ArchiveFileSize

get

string InstallLocation

public string InstallLocation

get set

string Version

public string Version

get

string MetadataBlob

public string MetadataBlob

get

ModFileState State

public ModFileState State

get set

Error FileStateErrorCause

public Error FileStateErrorCause

get set

float FileStateProgress

public float FileStateProgress

get set

long DownloadingBytesPerSecond

public long DownloadingBytesPerSecond

get set

ModfileDownloadReference Download

public ModfileDownloadReference Download

get

string Md5Hash

public string Md5Hash

get


ModfileDownloadReference

public struct ModfileDownloadReference
Field

string BinaryUrl

string BinaryUrl

DateTime ExpiresAfter

DateTime ExpiresAfter

ModioPage

public class ModioPage<T>
Field

T Data

T[] Data

int PageSize

int PageSize

long PageIndex

long PageIndex

long TotalSearchResults

long TotalSearchResults
Method

HasMoreResults

public bool HasMoreResults()

Enums

ModChangeType
Modfile           = 1 << 0
IsEnabled         = 1 << 1
IsSubscribed      = 1 << 2
ModObject         = 1 << 3
DownloadProgress  = 1 << 4
FileState         = 1 << 5
Rating            = 1 << 6
IsPurchased         = 1 << 7
Generic           = 1 << 8
Dependencies      = 1 << 9
Everything        = ~0

ModCommunityOptions
None              = 0
EnableComments    = 1
EnablePreviews    = 64
EnablePreviewUrls = 128
AllowDependencies = 1024

ModFileState
None

Mod has not been downloaded.

Queued

Mod has been queued for download & install.

Downloading

Mod is being downloaded for the first time.

Downloaded

Mod has been downloaded and is awaiting install.

Installing

Mod is downloaded and being installed.

Installed

Mod is installed.

Updating

Mod is installed and an update is being downloaded.

Uninstalling

Mod is being uninstalled.

FileOperationFailed

An operation failure has occured when installing/uninstalling this mod.


ModMaturityOptions
None     = 0
Alcohol  = 1
Drugs    = 2
Violence = 4
Explicit = 8

ModMonetizationOption
None = 0
Enabled = 1
Live = 2
EnablePartnerProgram = 4
EnableScarcity = 8

ModRating
Positive = 1
Negative = -1
None = 0

RevenueType
Free = 0
Paid = 1
FreeAndPaid = 2

SearchFilterPlatformStatus
None = 0
PendingOnly = 1
LiveAndPending = 2

SortModsBy

Category to be used in the ModSearchFilter for determining how mods should be filtered in a request.

Name
Price
Rating
Popular
Downloads
Subscribers
DateSubmitted

Modio.Monetization

TypeDescription
IModioEntitlementService
IModioStorefrontService
IModioVirtualCurrencyProviderServiceUse this interface if the target platform supports purchasing Virtual Currency but requires it to display in UI in-game.
MonetizationSettings
PortalSku

IModioEntitlementService

public interface IModioEntitlementService
Method

SyncEntitlements

public Task<Error> SyncEntitlements();

IModioStorefrontService

public interface IModioStorefrontService
Method

OpenPlatformPurchaseFlow

public Task<Error> OpenPlatformPurchaseFlow();

IModioVirtualCurrencyProviderService

public interface IModioVirtualCurrencyProviderService

Use this interface if the target platform supports purchasing Virtual Currency but requires it to display in UI in-game.

Method

GetCurrencyPackSkus

public Task<(Error error, PortalSku[] skus)> GetCurrencyPackSkus();

Retrieve a list of UserPortal specific SKUs that can be purchased.

OpenCheckoutFlow

public Task<Error> OpenCheckoutFlow(PortalSku sku);

Opens the target platform's checkout flow. This will open a separate UI window outside the game.

Parameters

sku The SKU being purchased.


MonetizationSettings

public class MonetizationSettings : IModioServiceSettings

PortalSku

public struct PortalSku
Field

ModioAPI.Portal Portal

ModioAPI.Portal Portal

string Sku

string Sku

string Name

string Name

string FormattedPrice

string FormattedPrice

int Value

int Value

Modio.Reports

TypeDescription
ReportResourceTypes

ReportResourceTypes

public static class ReportResourceTypes
Field

string GAMES

string GAMES = "games"

string MODS

string MODS = "mods"

string USERS

string USERS = "users"

Enums

ModNotWorkingReason
None = 0
CrashesGame = 1
DoesNotLoad = 2
ConflictsWithOtherMods = 3
MissingDependencies = 4
InstallationIssues = 5
BuggyBehaviour = 6
IncompatibleWithGameVersion = 7
FileCorruption = 8

ReportType
Generic = 0
DMCA = 1
NotWorking = 2
RudeContent = 3
IllegalContent = 4
StolenContent = 5
FalseInformation = 6
Other = 7

Modio.Settings

TypeDescription
ModInstallationManagementSettings
PortainerSettingsSupports mod.io's internal tests
TempModInstallationSettings

ModInstallationManagementSettings

[Serializable]  public class ModInstallationManagementSettings : IModioServiceSettings
Field

bool AutoActivate

bool AutoActivate = true

PortainerSettings

public class PortainerSettings : IModioServiceSettings

Supports mod.io's internal tests

Field

string Stack

string Stack

LogLevel LogLevel

LogLevel LogLevel = LogLevel.Warning

TempModInstallationSettings

[Serializable]  public class TempModInstallationSettings : IModioServiceSettings
Field

int LifeTimeDays

int LifeTimeDays = 0

Modio.Users

TypeDescription
ModRepository
User
UserProfileRepresents a particular mod.io user with their username, DownloadReferences for getting their avatar, as well as their language and timezone.
UserSaveObject
Wallet

ModRepository

public class ModRepository : IDisposable
Property

bool HasGotSubscriptions

public bool HasGotSubscriptions

get set

Method

GetCreatedMods

public IEnumerable<Mod> GetCreatedMods()

Returns a new array containing the Mods this user added or is a team member of. Use GetCreatedMods(List{Modio.Mods.Mod},out Modio.Error) to avoid the array creation. Note: mods may not be initialized, use Mod.Mod.IsInitialized to test for initialization.

GetSubscribed

public IEnumerable<Mod> GetSubscribed()

GetPurchased

public IEnumerable<Mod> GetPurchased()

GetDisabled

public IEnumerable<Mod> GetDisabled()

IsSubscribed

public bool IsSubscribed(ModId modId)

IsDisabled

public bool IsDisabled(ModId modId)

IsPurchased

public bool IsPurchased(ModId modId)

Dispose

public void Dispose()

User

public class User
Property

User Current

public static User Current

get

string LocalUserId

public string LocalUserId

get

long UserId

public long UserId

bool IsInitialized

public bool IsInitialized

get

bool HasAcceptedTermsOfUse

public bool HasAcceptedTermsOfUse

get

bool IsAuthenticated

public bool IsAuthenticated

get

bool IsUpdating

public bool IsUpdating

get

UserProfile Profile

public UserProfile Profile

get

Wallet Wallet

public Wallet Wallet

get

ModRepository ModRepository

public ModRepository ModRepository

get

Method

InitializeNewUser

public static async Task InitializeNewUser()

OnAuthenticated

public void OnAuthenticated(string oAuthToken)

Sync

public async Task<Error> Sync()

Syncs the user profile, subscriptions, purchases, wallet, ratings and entitlements with changes made from the Web Interface.

Returns

An asynchronous task that returns Error.Error.None on success.

SyncProfile

public async Task<Error> SyncProfile()

Syncs the user profile with changes made on the WebInterface

Returns

An asynchronous task that returns Error.Error.None on success.

SyncSubscriptions

public async Task<Error> SyncSubscriptions()

Syncs the user subscriptions with changes made on the WebInterface

Returns

An asynchronous task that returns Error.Error.None on success.

SyncPurchases

public async Task<Error> SyncPurchases()

Syncs the user purchases with changes made on the WebInterface

Returns

An asynchronous task that returns Error.Error.None on success.

SyncEntitlements

public async Task<Error> SyncEntitlements()

Syncs the user entitlements with changes made on the WebInterface

Returns

An asynchronous task that returns Error.Error.None on success.

SyncWallet

public async Task<Error> SyncWallet()

Syncs the user wallet with changes made on the WebInterface

Returns

An asynchronous task that returns Error.Error.None on success.

SyncRatings

public async Task<Error> SyncRatings()

Syncs the user ratings with changes made on the WebInterface

Returns

An asynchronous task that returns Error.Error.None on success.

GetMutedUsers

public async Task<(Error error, IReadOnlyList<UserProfile> results)> GetMutedUsers()

Gets all users muted by the currently authenticated User from the API.

Returns

An asynchronous task that returns a tuple (Error error, IReadOnlyList{UserProfile} results), where: error is the error encountered during the task (if any) result is a readonly list of muted users UserProfile.

Remarks

All API requests and Mod requests will already filter out any entries by muted users. This will not cache any data. Please use sparingly.

GetUserCreations

public async Task<(Error error, IReadOnlyList<Mod> mods)> GetUserCreations(bool filterForGame

Gets all mod creations by the User from the API.

Parameters

filterForGame Optionally filter to only receive mods made for the current GameId

Returns

An asynchronous task that returns a tuple (Error error, IReadOnlyList{Mod} results), where: error is the error encountered during the task (if any) result is a readonly list of Mods created by this user.

Remarks

This will crawl through all creations but not cache any data. Please use sparingly.

DeleteUserData

[ModioDebugMenu(ShowInBrowserMenu

Removes the User and associated authentication and caches from this device.

LogOut

public static void LogOut()

Logs out the current User without deleting any associated data stored on this device.


UserProfile

[System.Serializable]  public class UserProfile : IEquatable<UserProfile>

Represents a particular mod.io user with their username, DownloadReferences for getting their avatar, as well as their language and timezone.

Property

string Username

public string Username

get set

The display name of the user's mod.io account

long UserId

public long UserId

get set

This is the unique Id of the user.

string PortalUsername

public string PortalUsername

get

The display name of the user's account they authenticated with. Eg if they authenticated with Steam it would be their Steam username.

ModioImageSource Avatar

public ModioImageSource<AvatarResolution> Avatar

get

string Timezone

public string Timezone

get

string Language

public string Language

get

Method

GetHashCode

public override int GetHashCode()

GetWallet

public Wallet GetWallet()

Equals

public bool Equals(UserProfile other)

Equals

public override bool Equals(object obj)

Mute

public async Task<Error> Mute()

UnMute

public async Task<Error> UnMute()

Report

public async Task<Error> Report(ReportType reportType, string contact, string summary)
Enum
X50_Y50
X100_Y100
Original

UserSaveObject

[Serializable]  public class UserSaveObject
Field

string LocalUserId

string LocalUserId

string Username

string Username

long UserId

long UserId

string AuthToken

string AuthToken

long AuthExpiration

long AuthExpiration

List SubscribedMods

List<long> SubscribedMods

List DisabledMods

List<long> DisabledMods

List PurchasedMods

List<long> PurchasedMods

Wallet

public class Wallet
Property

string Type

public string Type

get

string Currency

public string Currency

get

long Balance

public long Balance

get