Nakama .NET 3.1.1
.NET client for Nakama server written in C
Nakama.IClient Interface Reference

A client for the API in Nakama server. More...

Inheritance diagram for Nakama.IClient:
Nakama.Client

Public Member Functions

Task AddFriendsAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Add one or more friends by id or username. More...
 
Task AddGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Add one or more users to the group. More...
 
Task< ISessionAuthenticateAppleAsync (string token, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with an Apple ID against the server. More...
 
Task< ISessionAuthenticateCustomAsync (string id, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with a custom id. More...
 
Task< ISessionAuthenticateDeviceAsync (string id, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with a device id. More...
 
Task< ISessionAuthenticateEmailAsync (string email, string password, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with an email and password. More...
 
Task< ISessionAuthenticateFacebookAsync (string token, string username=null, bool create=true, bool import=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with a Facebook auth token. More...
 
Task< ISessionAuthenticateGameCenterAsync (string bundleId, string playerId, string publicKeyUrl, string salt, string signature, string timestamp, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with Apple Game Center. More...
 
Task< ISessionAuthenticateGoogleAsync (string token, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with a Google auth token. More...
 
Task< ISessionAuthenticateSteamAsync (string token, string username=null, bool create=true, bool import=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Authenticate a user with a Steam auth token. More...
 
Task BanGroupUsersAsync (ISession session, string groupId, IEnumerable< string > usernames, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Ban a set of users from a group. More...
 
Task BlockFriendsAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Block one or more friends by id or username. More...
 
Task< IApiGroupCreateGroupAsync (ISession session, string name, string description="", string avatarUrl=null, string langTag=null, bool open=true, int maxCount=100, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Create a group. More...
 
Task DeleteFriendsAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Delete one more or users by id or username from friends. More...
 
Task DeleteGroupAsync (ISession session, string groupId, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Delete a group by id. More...
 
Task DeleteLeaderboardRecordAsync (ISession session, string leaderboardId, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Delete a leaderboard record. More...
 
Task DeleteNotificationsAsync (ISession session, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Delete one or more notifications by id. More...
 
Task DeleteStorageObjectsAsync (ISession session, StorageObjectId[] ids, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Delete one or more storage objects. More...
 
Task DemoteGroupUsersAsync (ISession session, string groupId, IEnumerable< string > userIds, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Demote a set of users in a group to the next role down.

Parameters
groupIdThe group to demote users in.
userIdsThe users to demote.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
More...
 
Task EventAsync (ISession session, string name, Dictionary< string, string > properties, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Submit an event for processing in the server's registered runtime custom events handler. More...
 
Task< IApiAccountGetAccountAsync (ISession session, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Fetch the user account owned by the session. More...
 
Task< IApiUsersGetUsersAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, IEnumerable< string > facebookIds=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Fetch one or more users by id, usernames, and Facebook ids. More...
 
Task ImportFacebookFriendsAsync (ISession session, string token, bool? reset=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Import Facebook friends and add them to the user's account. More...
 
Task ImportSteamFriendsAsync (ISession session, string token, bool? reset=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Import Steam friends and add them to the user's account. More...
 
Task JoinGroupAsync (ISession session, string groupId, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Join a group if it has open membership or request to join it. More...
 
Task JoinTournamentAsync (ISession session, string tournamentId, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Join a tournament by ID. More...
 
Task KickGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Kick one or more users from the group. More...
 
Task LeaveGroupAsync (ISession session, string groupId, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Leave a group by ID. More...
 
Task LinkAppleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link an Apple ID to the social profiles on the current user's account. More...
 
Task LinkCustomAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link a custom ID to the user account owned by the session. More...
 
Task LinkDeviceAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link a device ID to the user account owned by the session. More...
 
Task LinkEmailAsync (ISession session, string email, string password, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link an email with password to the user account owned by the session. More...
 
Task LinkFacebookAsync (ISession session, string token, bool? import=true, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link a Facebook profile to a user account. More...
 
Task LinkGameCenterAsync (ISession session, string bundleId, string playerId, string publicKeyUrl, string salt, string signature, string timestamp, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link a Game Center profile to a user account. More...
 
Task LinkGoogleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link a Google profile to a user account. More...
 
Task LinkSteamAsync (ISession session, string token, bool import, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Link a Steam profile to a user account. More...
 
Task< IApiChannelMessageListListChannelMessagesAsync (ISession session, IChannel channel, int limit=1, bool forward=true, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List messages from a chat channel. More...
 
Task< IApiChannelMessageListListChannelMessagesAsync (ISession session, string channelId, int limit=1, bool forward=true, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List messages from a chat channel. More...
 
Task< IApiFriendListListFriendsAsync (ISession session, int? state=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List of friends of the current user. More...
 
Task< IApiGroupUserListListGroupUsersAsync (ISession session, string groupId, int? state=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List all users part of the group. More...
 
Task< IApiGroupListListGroupsAsync (ISession session, string name=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List groups on the server. More...
 
Task< IApiLeaderboardRecordListListLeaderboardRecordsAsync (ISession session, string leaderboardId, IEnumerable< string > ownerIds=null, long? expiry=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List records from a leaderboard. More...
 
Task< IApiLeaderboardRecordListListLeaderboardRecordsAroundOwnerAsync (ISession session, string leaderboardId, string ownerId, long? expiry=null, int limit=1, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List leaderboard records that belong to a user. More...
 
Task< IApiMatchListListMatchesAsync (ISession session, int min, int max, int limit, bool authoritative, string label, string query, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Fetch a list of matches active on the server. More...
 
Task< IApiNotificationListListNotificationsAsync (ISession session, int limit=1, string cacheableCursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List notifications for the user with an optional cursor. More...
 
Task< IApiStorageObjectListListStorageObjects (ISession session, string collection, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 
Task< IApiStorageObjectListListStorageObjectsAsync (ISession session, string collection, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List storage objects in a collection which have public read access. More...
 
Task< IApiTournamentRecordListListTournamentRecordsAroundOwnerAsync (ISession session, string tournamentId, string ownerId, long? expiry=null, int limit=1, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List tournament records around the owner. More...
 
Task< IApiTournamentRecordListListTournamentRecordsAsync (ISession session, string tournamentId, IEnumerable< string > ownerIds=null, long? expiry=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List records from a tournament. More...
 
Task< IApiTournamentListListTournamentsAsync (ISession session, int categoryStart, int categoryEnd, int? startTime=null, int? endTime=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List current or upcoming tournaments. More...
 
Task< IApiUserGroupListListUserGroupsAsync (ISession session, int? state=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List of groups the current user is a member of. More...
 
Task< IApiUserGroupListListUserGroupsAsync (ISession session, string userId, int? state=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List groups a user is a member of. More...
 
Task< IApiStorageObjectListListUsersStorageObjectsAsync (ISession session, string collection, string userId, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 List storage objects in a collection which belong to a specific user and have public read access. More...
 
Task PromoteGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Promote one or more users in the group. More...
 
Task< IApiStorageObjectsReadStorageObjectsAsync (ISession session, IApiReadStorageObjectId[] ids, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Read one or more objects from the storage engine. More...
 
Task< IApiRpcRpcAsync (ISession session, string id, string payload, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Execute a function with an input payload on the server. More...
 
Task< IApiRpcRpcAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Execute a function on the server. More...
 
Task< IApiRpcRpcAsync (string httpKey, string id, string payload=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Execute a function on the server without a session. More...
 
Task SessionLogoutAsync (ISession session, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Log out a session which invalidates the authorization and refresh token. More...
 
Task SessionLogoutAsync (string authToken, string refreshToken, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Log out a session which optionally invalidates the authorization and/or refresh tokens. More...
 
Task< ISessionSessionRefreshAsync (ISession session, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Refresh the session unless the current refresh token has expired. If vars are specified they will replace what is currently stored inside the session token. More...
 
Task UnlinkAppleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Remove the Apple ID from the social profiles on the current user's account. More...
 
Task UnlinkCustomAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink a custom ID from the user account owned by the session. More...
 
Task UnlinkDeviceAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink a device ID from the user account owned by the session. More...
 
Task UnlinkEmailAsync (ISession session, string email, string password, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink an email with password from the user account owned by the session. More...
 
Task UnlinkFacebookAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink a Facebook profile from the user account owned by the session. More...
 
Task UnlinkGameCenterAsync (ISession session, string bundleId, string playerId, string publicKeyUrl, string salt, string signature, string timestamp, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink a Game Center profile from the user account owned by the session. More...
 
Task UnlinkGoogleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink a Google profile from the user account owned by the session. More...
 
Task UnlinkSteamAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Unlink a Steam profile from the user account owned by the session. More...
 
Task UpdateAccountAsync (ISession session, string username, string displayName=null, string avatarUrl=null, string langTag=null, string location=null, string timezone=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Update the current user's account on the server. More...
 
Task UpdateGroupAsync (ISession session, string groupId, string name, bool open, string description=null, string avatarUrl=null, string langTag=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Update a group. More...
 
Task< IApiValidatePurchaseResponseValidatePurchaseAppleAsync (ISession session, string receipt, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Validate a purchase receipt against the Apple App Store. More...
 
Task< IApiValidatePurchaseResponseValidatePurchaseGoogleAsync (ISession session, string receipt, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Validate a purchase receipt against the Google Play Store. More...
 
Task< IApiValidatePurchaseResponseValidatePurchaseHuaweiAsync (ISession session, string receipt, string signature, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Validate a purchase receipt against the Huawei AppGallery. More...
 
Task< IApiLeaderboardRecordWriteLeaderboardRecordAsync (ISession session, string leaderboardId, long score, long subScore=0L, string metadata=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Write a record to a leaderboard. More...
 
Task< IApiStorageObjectAcksWriteStorageObjectsAsync (ISession session, IApiWriteStorageObject[] objects, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Write objects to the storage engine. More...
 
Task< IApiLeaderboardRecordWriteTournamentRecordAsync (ISession session, string tournamentId, long score, long subScore=0L, string metadata=null, RetryConfiguration retryConfiguration=null, CancellationTokenSource canceller=null)
 Write a record to a tournament. More...
 

Properties

bool AutoRefreshSession [get]
 True if the session should be refreshed with an active refresh token. More...
 
RetryConfiguration GlobalRetryConfiguration [getset]
 The global retry configuration. See RetryConfiguration. More...
 
string Host [get]
 The host address of the server. Defaults to "127.0.0.1". More...
 
int Port [get]
 The port number of the server. Defaults to 7350. More...
 
int RetryJitterSeed [get]
 Used to seed random values generated during request retries. More...
 
string Scheme [get]
 The protocol scheme used to connect with the server. Must be either "http" or "https". More...
 
string ServerKey [get]
 The key used to authenticate with the server without a session. Defaults to "defaultkey". More...
 
int Timeout [getset]
 Set the timeout in seconds on requests sent to the server. More...
 

Detailed Description

A client for the API in Nakama server.

Member Function Documentation

◆ AddFriendsAsync()

Task Nakama.IClient.AddFriendsAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Add one or more friends by id or username.

Parameters
sessionThe session of the user.
idsThe ids of the users to add or invite as friends.
usernamesThe usernames of the users to add as friends.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ AddGroupUsersAsync()

Task Nakama.IClient.AddGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Add one or more users to the group.

Parameters
sessionThe session of the user.
groupIdThe id of the group to add users into.
idsThe ids of the users to add or invite to the group.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ AuthenticateAppleAsync()

Task< ISession > Nakama.IClient.AuthenticateAppleAsync ( string  token,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with an Apple ID against the server.

Parameters
usernameA username used to create the user.
tokenThe ID token received from Apple to validate.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateCustomAsync()

Task< ISession > Nakama.IClient.AuthenticateCustomAsync ( string  id,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with a custom id.

Parameters
idA custom identifier usually obtained from an external authentication service.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateDeviceAsync()

Task< ISession > Nakama.IClient.AuthenticateDeviceAsync ( string  id,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with a device id.

Parameters
idA device identifier usually obtained from a platform API.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateEmailAsync()

Task< ISession > Nakama.IClient.AuthenticateEmailAsync ( string  email,
string  password,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with an email and password.

Parameters
emailThe email address of the user.
passwordThe password for the user.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateFacebookAsync()

Task< ISession > Nakama.IClient.AuthenticateFacebookAsync ( string  token,
string  username = null,
bool  create = true,
bool  import = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with a Facebook auth token.

Parameters
tokenAn OAuth access token from the Facebook SDK.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
importIf the Facebook friends should be imported.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateGameCenterAsync()

Task< ISession > Nakama.IClient.AuthenticateGameCenterAsync ( string  bundleId,
string  playerId,
string  publicKeyUrl,
string  salt,
string  signature,
string  timestamp,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with Apple Game Center.

Parameters
bundleIdThe bundle id of the Game Center application.
playerIdThe player id of the user in Game Center.
publicKeyUrlThe URL for the public encryption key.
saltA random NSString used to compute the hash and keep it randomized.
signatureThe verification signature data generated.
timestampThe date and time that the signature was created.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateGoogleAsync()

Task< ISession > Nakama.IClient.AuthenticateGoogleAsync ( string  token,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with a Google auth token.

Parameters
tokenAn OAuth access token from the Google SDK.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
varsExtra information that will be bundled in the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ AuthenticateSteamAsync()

Task< ISession > Nakama.IClient.AuthenticateSteamAsync ( string  token,
string  username = null,
bool  create = true,
bool  import = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Authenticate a user with a Steam auth token.

Parameters
tokenAn authentication token from the Steam network.
usernameA username used to create the user. May be null.
createIf the user should be created when authenticated.
varsExtra information that will be bundled in the session token.
importIf the Steam friends should be imported.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implemented in Nakama.Client.

◆ BanGroupUsersAsync()

Task Nakama.IClient.BanGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  usernames,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Ban a set of users from a group.

Parameters
sessionThe session of the user.
groupIdThe group to ban the users from.
usernamesThe usernames of the users to ban.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ BlockFriendsAsync()

Task Nakama.IClient.BlockFriendsAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Block one or more friends by id or username.

Parameters
sessionThe session of the user.
idsThe ids of the users to block.
usernamesThe usernames of the users to block.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ CreateGroupAsync()

Task< IApiGroup > Nakama.IClient.CreateGroupAsync ( ISession  session,
string  name,
string  description = "",
string  avatarUrl = null,
string  langTag = null,
bool  open = true,
int  maxCount = 100,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Create a group.

Parameters
sessionThe session of the user.
nameThe name for the group.
descriptionA description for the group.
avatarUrlAn avatar url for the group.
langTagA language tag in BCP-47 format for the group.
openIf the group should have open membership.
maxCountThe maximum number of members allowed.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new group object.

Implemented in Nakama.Client.

◆ DeleteFriendsAsync()

Task Nakama.IClient.DeleteFriendsAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Delete one more or users by id or username from friends.

Parameters
sessionThe session of the user.
idsThe user ids to remove as friends.
usernamesThe usernames to remove as friends.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ DeleteGroupAsync()

Task Nakama.IClient.DeleteGroupAsync ( ISession  session,
string  groupId,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Delete a group by id.

Parameters
sessionThe session of the user.
groupIdThe group id to to remove.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ DeleteLeaderboardRecordAsync()

Task Nakama.IClient.DeleteLeaderboardRecordAsync ( ISession  session,
string  leaderboardId,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Delete a leaderboard record.

Parameters
sessionThe session of the user.
leaderboardIdThe id of the leaderboard with the record to be deleted.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ DeleteNotificationsAsync()

Task Nakama.IClient.DeleteNotificationsAsync ( ISession  session,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Delete one or more notifications by id.

Parameters
sessionThe session of the user.
idsThe notification ids to remove.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ DeleteStorageObjectsAsync()

Task Nakama.IClient.DeleteStorageObjectsAsync ( ISession  session,
StorageObjectId[]  ids,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Delete one or more storage objects.

Parameters
sessionThe session of the user.
idsThe ids of the objects to delete.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ DemoteGroupUsersAsync()

Task Nakama.IClient.DemoteGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  userIds,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Demote a set of users in a group to the next role down.

Parameters
groupIdThe group to demote users in.
userIdsThe users to demote.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.

Members who are already at the lowest rank will be skipped.

Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ EventAsync()

Task Nakama.IClient.EventAsync ( ISession  session,
string  name,
Dictionary< string, string >  properties,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Submit an event for processing in the server's registered runtime custom events handler.

Parameters
sessionThe session of the user.
nameThe name of the event.
propertiesThe properties of the event.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ GetAccountAsync()

Task< IApiAccount > Nakama.IClient.GetAccountAsync ( ISession  session,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Fetch the user account owned by the session.

Parameters
sessionThe session of the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the account object.

Implemented in Nakama.Client.

◆ GetUsersAsync()

Task< IApiUsers > Nakama.IClient.GetUsersAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
IEnumerable< string >  facebookIds = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Fetch one or more users by id, usernames, and Facebook ids.

Parameters
sessionThe session of the user.
idsThe IDs of the users to retrieve.
usernamesThe usernames of the users to retrieve.
facebookIdsThe facebook IDs of the users to retrieve.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a collection of user objects.

Implemented in Nakama.Client.

◆ ImportFacebookFriendsAsync()

Task Nakama.IClient.ImportFacebookFriendsAsync ( ISession  session,
string  token,
bool?  reset = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Import Facebook friends and add them to the user's account.

The server will import friends when the user authenticates with Facebook. This function can be used to be explicit with the import operation.

Parameters
sessionThe session of the user.
tokenAn OAuth access token from the Facebook SDK.
resetIf the Facebook friend import for the user should be reset.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ ImportSteamFriendsAsync()

Task Nakama.IClient.ImportSteamFriendsAsync ( ISession  session,
string  token,
bool?  reset = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Import Steam friends and add them to the user's account.

The server will import friends when the user authenticates with Steam. This function can be used to be explicit with the import operation.

Parameters
sessionThe session of the user.
tokenAn access token from Steam.
resetIf the Steam friend import for the user should be reset.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ JoinGroupAsync()

Task Nakama.IClient.JoinGroupAsync ( ISession  session,
string  groupId,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Join a group if it has open membership or request to join it.

Parameters
sessionThe session of the user.
groupIdThe ID of the group to join.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ JoinTournamentAsync()

Task Nakama.IClient.JoinTournamentAsync ( ISession  session,
string  tournamentId,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Join a tournament by ID.

Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament to join.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ KickGroupUsersAsync()

Task Nakama.IClient.KickGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Kick one or more users from the group.

Parameters
sessionThe session of the user.
groupIdThe ID of the group.
idsThe IDs of the users to kick.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LeaveGroupAsync()

Task Nakama.IClient.LeaveGroupAsync ( ISession  session,
string  groupId,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Leave a group by ID.

Parameters
sessionThe session of the user.
groupIdThe ID of the group to leave.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkAppleAsync()

Task Nakama.IClient.LinkAppleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link an Apple ID to the social profiles on the current user's account.

Parameters
sessionThe session of the user.
tokenThe ID token received from Apple to validate.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkCustomAsync()

Task Nakama.IClient.LinkCustomAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link a custom ID to the user account owned by the session.

Parameters
sessionThe session of the user.
idA custom identifier usually obtained from an external authentication service.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkDeviceAsync()

Task Nakama.IClient.LinkDeviceAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link a device ID to the user account owned by the session.

Parameters
sessionThe session of the user.
idA device identifier usually obtained from a platform API.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkEmailAsync()

Task Nakama.IClient.LinkEmailAsync ( ISession  session,
string  email,
string  password,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link an email with password to the user account owned by the session.

Parameters
sessionThe session of the user.
emailThe email address of the user.
passwordThe password for the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkFacebookAsync()

Task Nakama.IClient.LinkFacebookAsync ( ISession  session,
string  token,
bool?  import = true,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link a Facebook profile to a user account.

Parameters
sessionThe session of the user.
tokenAn OAuth access token from the Facebook SDK.
importIf the Facebook friends should be imported.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkGameCenterAsync()

Task Nakama.IClient.LinkGameCenterAsync ( ISession  session,
string  bundleId,
string  playerId,
string  publicKeyUrl,
string  salt,
string  signature,
string  timestamp,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link a Game Center profile to a user account.

Parameters
sessionThe session of the user.
bundleIdThe bundle ID of the Game Center application.
playerIdThe player ID of the user in Game Center.
publicKeyUrlThe URL for the public encryption key.
saltA random NSString used to compute the hash and keep it randomized.
signatureThe verification signature data generated.
timestampThe date and time that the signature was created.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkGoogleAsync()

Task Nakama.IClient.LinkGoogleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link a Google profile to a user account.

Parameters
sessionThe session of the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
tokenAn OAuth access token from the Google SDK.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ LinkSteamAsync()

Task Nakama.IClient.LinkSteamAsync ( ISession  session,
string  token,
bool  import,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Link a Steam profile to a user account.

Parameters
sessionThe session of the user.
tokenAn authentication token from the Steam network.
importIf the Steam friends should be imported.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ ListChannelMessagesAsync() [1/2]

Task< IApiChannelMessageList > Nakama.IClient.ListChannelMessagesAsync ( ISession  session,
IChannel  channel,
int  limit = 1,
bool  forward = true,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List messages from a chat channel.

Parameters
sessionThe session of the user.
channelThe chat channel object.
limitThe number of chat messages to list.
forwardFetch messages forward from the current cursor (or the start, RetryConfiguration retryConfiguration = null, CancellationTokenSource canceller = null).
cursorA cursor for the current position in the messages history to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the channel message list object.

Implemented in Nakama.Client.

◆ ListChannelMessagesAsync() [2/2]

Task< IApiChannelMessageList > Nakama.IClient.ListChannelMessagesAsync ( ISession  session,
string  channelId,
int  limit = 1,
bool  forward = true,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List messages from a chat channel.

Parameters
sessionThe session of the user.
channelIdA channel identifier.
limitThe number of chat messages to list.
forwardFetch messages forward from the current cursor (or the start, RetryConfiguration retryConfiguration = null, CancellationTokenSource canceller = null).
cursorA cursor for the current position in the messages history to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the channel message list object.

Implemented in Nakama.Client.

◆ ListFriendsAsync()

Task< IApiFriendList > Nakama.IClient.ListFriendsAsync ( ISession  session,
int?  state = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List of friends of the current user.

Parameters
sessionThe session of the user.
stateFilter by friendship state.
limitThe number of friends to list.
cursorA cursor for the current position in the friends list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the friend objects.

Implemented in Nakama.Client.

◆ ListGroupsAsync()

Task< IApiGroupList > Nakama.IClient.ListGroupsAsync ( ISession  session,
string  name = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List groups on the server.

Parameters
sessionThe session of the user.
nameThe name filter to apply to the group list.
limitThe number of groups to list.
cursorA cursor for the current position in the groups to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task to resolve group objects.

Implemented in Nakama.Client.

◆ ListGroupUsersAsync()

Task< IApiGroupUserList > Nakama.IClient.ListGroupUsersAsync ( ISession  session,
string  groupId,
int?  state = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List all users part of the group.

Parameters
sessionThe session of the user.
groupIdThe ID of the group.
stateFilter by group membership state.
limitThe number of groups to list.
cursorA cursor for the current position in the group listing.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group user objects.

Implemented in Nakama.Client.

◆ ListLeaderboardRecordsAroundOwnerAsync()

Task< IApiLeaderboardRecordList > Nakama.IClient.ListLeaderboardRecordsAroundOwnerAsync ( ISession  session,
string  leaderboardId,
string  ownerId,
long?  expiry = null,
int  limit = 1,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List leaderboard records that belong to a user.

Parameters
sessionThe session for the user.
leaderboardIdThe ID of the leaderboard to list.
ownerIdThe ID of the user to list around.
expiryExpiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
limitThe limit of the listings.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record objects.

Implemented in Nakama.Client.

◆ ListLeaderboardRecordsAsync()

Task< IApiLeaderboardRecordList > Nakama.IClient.ListLeaderboardRecordsAsync ( ISession  session,
string  leaderboardId,
IEnumerable< string >  ownerIds = null,
long?  expiry = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List records from a leaderboard.

Parameters
sessionThe session of the user.
leaderboardIdThe ID of the leaderboard to list.
ownerIdsRecord owners to fetch with the list of records.
expiryExpiry in seconds (since epoch) to begin fetching records from. Optional. 0 means from current time.
limitThe number of records to list.
cursorA cursor for the current position in the leaderboard records to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record objects.

Implemented in Nakama.Client.

◆ ListMatchesAsync()

Task< IApiMatchList > Nakama.IClient.ListMatchesAsync ( ISession  session,
int  min,
int  max,
int  limit,
bool  authoritative,
string  label,
string  query,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Fetch a list of matches active on the server.

Parameters
sessionThe session of the user.
minThe minimum number of match participants.
maxThe maximum number of match participants.
limitThe number of matches to list.
authoritativeIf authoritative matches should be included.
labelThe label to filter the match list on.
queryA query for the matches to filter.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the match list object.

Implemented in Nakama.Client.

◆ ListNotificationsAsync()

Task< IApiNotificationList > Nakama.IClient.ListNotificationsAsync ( ISession  session,
int  limit = 1,
string  cacheableCursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List notifications for the user with an optional cursor.

Parameters
sessionThe session of the user.
limitThe number of notifications to list.
cacheableCursorA cursor for the current position in notifications to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task to resolve notifications objects.

Implemented in Nakama.Client.

◆ ListStorageObjects()

Task< IApiStorageObjectList > Nakama.IClient.ListStorageObjects ( ISession  session,
string  collection,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Implemented in Nakama.Client.

◆ ListStorageObjectsAsync()

Task< IApiStorageObjectList > Nakama.IClient.ListStorageObjectsAsync ( ISession  session,
string  collection,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List storage objects in a collection which have public read access.

Parameters
sessionThe session of the user.
collectionThe collection to list over.
limitThe number of objects to list. Maximum 100.
cursorA cursor to paginate over the collection. May be null.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage object list.

Implemented in Nakama.Client.

◆ ListTournamentRecordsAroundOwnerAsync()

Task< IApiTournamentRecordList > Nakama.IClient.ListTournamentRecordsAroundOwnerAsync ( ISession  session,
string  tournamentId,
string  ownerId,
long?  expiry = null,
int  limit = 1,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List tournament records around the owner.

Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament.
ownerIdThe ID of the owner to pivot around.
expiryExpiry in seconds (since epoch) to begin fetching records from.
limitThe number of records to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the tournament record list object.

Implemented in Nakama.Client.

◆ ListTournamentRecordsAsync()

Task< IApiTournamentRecordList > Nakama.IClient.ListTournamentRecordsAsync ( ISession  session,
string  tournamentId,
IEnumerable< string >  ownerIds = null,
long?  expiry = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List records from a tournament.

Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament.
ownerIdsThe IDs of the record owners to return in the result.
expiryExpiry in seconds (since epoch) to begin fetching records from.
limitThe number of records to list.
cursorAn optional cursor for the next page of tournament records.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the list of tournament records.

Implemented in Nakama.Client.

◆ ListTournamentsAsync()

Task< IApiTournamentList > Nakama.IClient.ListTournamentsAsync ( ISession  session,
int  categoryStart,
int  categoryEnd,
int?  startTime = null,
int?  endTime = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List current or upcoming tournaments.

Parameters
sessionThe session of the user.
categoryStartThe start of the category of tournaments to include.
categoryEndThe end of the category of tournaments to include.
startTimeThe start time of the tournaments. (UNIX timestamp, RetryConfiguration retryConfiguration = null, CancellationTokenSource canceller = null). If null, tournaments will not be filtered by start time.
endTimeThe end time of the tournaments. (UNIX timestamp, RetryConfiguration retryConfiguration = null, CancellationTokenSource canceller = null). If null, tournaments will not be filtered by end time.
limitThe number of tournaments to list.
cursorAn optional cursor for the next page of tournaments.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the list of tournament objects.

Implemented in Nakama.Client.

◆ ListUserGroupsAsync() [1/2]

Task< IApiUserGroupList > Nakama.IClient.ListUserGroupsAsync ( ISession  session,
int?  state = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List of groups the current user is a member of.

Parameters
sessionThe session of the user.
stateFilter by group membership state.
limitThe number of records to list.
cursorA cursor for the current position in the listing.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group list object.

Implemented in Nakama.Client.

◆ ListUserGroupsAsync() [2/2]

Task< IApiUserGroupList > Nakama.IClient.ListUserGroupsAsync ( ISession  session,
string  userId,
int?  state = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List groups a user is a member of.

Parameters
sessionThe session of the user.
userIdThe ID of the user whose groups to list.
stateFilter by group membership state.
limitThe number of records to list.
cursorA cursor for the current position in the listing.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group list object.

Implemented in Nakama.Client.

◆ ListUsersStorageObjectsAsync()

Task< IApiStorageObjectList > Nakama.IClient.ListUsersStorageObjectsAsync ( ISession  session,
string  collection,
string  userId,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

List storage objects in a collection which belong to a specific user and have public read access.

Parameters
sessionThe session of the user.
collectionThe collection to list over.
userIdThe user ID of the user to list objects for.
limitThe number of objects to list.
cursorA cursor to paginate over the collection.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage object list.

Implemented in Nakama.Client.

◆ PromoteGroupUsersAsync()

Task Nakama.IClient.PromoteGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Promote one or more users in the group.

Parameters
sessionThe session of the user.
groupIdThe ID of the group to promote users into.
idsThe IDs of the users to promote.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ ReadStorageObjectsAsync()

Task< IApiStorageObjects > Nakama.IClient.ReadStorageObjectsAsync ( ISession  session,
IApiReadStorageObjectId[]  ids,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Read one or more objects from the storage engine.

Parameters
sessionThe session of the user.
idsThe objects to read.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage batch object.

Implemented in Nakama.Client.

◆ RpcAsync() [1/3]

Task< IApiRpc > Nakama.IClient.RpcAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Execute a function on the server.

Parameters
sessionThe session of the user.
idThe ID of the function to execute on the server.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the RPC response.

Implemented in Nakama.Client.

◆ RpcAsync() [2/3]

Task< IApiRpc > Nakama.IClient.RpcAsync ( ISession  session,
string  id,
string  payload,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Execute a function with an input payload on the server.

Parameters
sessionThe session of the user.
idThe ID of the function to execute on the server.
payloadThe payload to send with the function call.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the RPC response.

Implemented in Nakama.Client.

◆ RpcAsync() [3/3]

Task< IApiRpc > Nakama.IClient.RpcAsync ( string  httpKey,
string  id,
string  payload = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Execute a function on the server without a session.

This function is usually used with server side code. DO NOT USE client side.

Parameters
httpKeyThe secure HTTP key used to authenticate.
idThe id of the function to execute on the server.
payloadA payload to send with the function call.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task to resolve an RPC response.

Implemented in Nakama.Client.

◆ SessionLogoutAsync() [1/2]

Task Nakama.IClient.SessionLogoutAsync ( ISession  session,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Log out a session which invalidates the authorization and refresh token.

Parameters
sessionThe session to logout.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ SessionLogoutAsync() [2/2]

Task Nakama.IClient.SessionLogoutAsync ( string  authToken,
string  refreshToken,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Log out a session which optionally invalidates the authorization and/or refresh tokens.

Parameters
authTokenThe authorization token to invalidate, may be null.
refreshTokenThe refresh token to invalidate, may be null.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ SessionRefreshAsync()

Task< ISession > Nakama.IClient.SessionRefreshAsync ( ISession  session,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Refresh the session unless the current refresh token has expired. If vars are specified they will replace what is currently stored inside the session token.

Parameters
sessionThe session of the user.
varsExtra information which should be bundled inside the session token.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new session object.

Implemented in Nakama.Client.

◆ UnlinkAppleAsync()

Task Nakama.IClient.UnlinkAppleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Remove the Apple ID from the social profiles on the current user's account.

Parameters
sessionThe session of the user.
tokenThe ID token received from Apple.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new session object.

Implemented in Nakama.Client.

◆ UnlinkCustomAsync()

Task Nakama.IClient.UnlinkCustomAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink a custom ID from the user account owned by the session.

Parameters
sessionThe session of the user.
idA custom identifier usually obtained from an external authentication service.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UnlinkDeviceAsync()

Task Nakama.IClient.UnlinkDeviceAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink a device ID from the user account owned by the session.

Parameters
sessionThe session of the user.
idA device identifier usually obtained from a platform API.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UnlinkEmailAsync()

Task Nakama.IClient.UnlinkEmailAsync ( ISession  session,
string  email,
string  password,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink an email with password from the user account owned by the session.

Parameters
sessionThe session of the user.
emailThe email address of the user.
passwordThe password for the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UnlinkFacebookAsync()

Task Nakama.IClient.UnlinkFacebookAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink a Facebook profile from the user account owned by the session.

Parameters
sessionThe session of the user.
tokenAn OAuth access token from the Facebook SDK.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UnlinkGameCenterAsync()

Task Nakama.IClient.UnlinkGameCenterAsync ( ISession  session,
string  bundleId,
string  playerId,
string  publicKeyUrl,
string  salt,
string  signature,
string  timestamp,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink a Game Center profile from the user account owned by the session.

Parameters
sessionThe session of the user.
bundleIdThe bundle ID of the Game Center application.
playerIdThe player ID of the user in Game Center.
publicKeyUrlThe URL for the public encryption key.
saltA random NSString used to compute the hash and keep it randomized.
signatureThe verification signature data generated.
timestampThe date and time that the signature was created.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UnlinkGoogleAsync()

Task Nakama.IClient.UnlinkGoogleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink a Google profile from the user account owned by the session.

Parameters
sessionThe session of the user.
tokenAn OAuth access token from the Google SDK.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UnlinkSteamAsync()

Task Nakama.IClient.UnlinkSteamAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Unlink a Steam profile from the user account owned by the session.

Parameters
sessionThe session of the user.
tokenAn authentication token from the Steam network.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UpdateAccountAsync()

Task Nakama.IClient.UpdateAccountAsync ( ISession  session,
string  username,
string  displayName = null,
string  avatarUrl = null,
string  langTag = null,
string  location = null,
string  timezone = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Update the current user's account on the server.

Parameters
sessionThe session for the user.
usernameThe new username for the user.
displayNameA new display name for the user.
avatarUrlA new avatar url for the user.
langTagA new language tag in BCP-47 format for the user.
locationA new location for the user.
timezoneNew timezone information for the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ UpdateGroupAsync()

Task Nakama.IClient.UpdateGroupAsync ( ISession  session,
string  groupId,
string  name,
bool  open,
string  description = null,
string  avatarUrl = null,
string  langTag = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Update a group.

The user must have the correct access permissions for the group.

Parameters
sessionThe session of the user.
groupIdThe ID of the group to update.
nameA new name for the group.
openIf the group should have open membership.
descriptionA new description for the group.
avatarUrlA new avatar url for the group.
langTagA new language tag in BCP-47 format for the group.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Nakama.Client.

◆ ValidatePurchaseAppleAsync()

Task< IApiValidatePurchaseResponse > Nakama.IClient.ValidatePurchaseAppleAsync ( ISession  session,
string  receipt,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Validate a purchase receipt against the Apple App Store.

Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implemented in Nakama.Client.

◆ ValidatePurchaseGoogleAsync()

Task< IApiValidatePurchaseResponse > Nakama.IClient.ValidatePurchaseGoogleAsync ( ISession  session,
string  receipt,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Validate a purchase receipt against the Google Play Store.

Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implemented in Nakama.Client.

◆ ValidatePurchaseHuaweiAsync()

Task< IApiValidatePurchaseResponse > Nakama.IClient.ValidatePurchaseHuaweiAsync ( ISession  session,
string  receipt,
string  signature,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Validate a purchase receipt against the Huawei AppGallery.

Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
signatureThe signature of the purchase receipt.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implemented in Nakama.Client.

◆ WriteLeaderboardRecordAsync()

Task< IApiLeaderboardRecord > Nakama.IClient.WriteLeaderboardRecordAsync ( ISession  session,
string  leaderboardId,
long  score,
long  subScore = 0L,
string  metadata = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Write a record to a leaderboard.

Parameters
sessionThe session for the user.
leaderboardIdThe ID of the leaderboard to write.
scoreThe score for the leaderboard record.
subScoreThe sub score for the leaderboard record.
metadataThe metadata for the leaderboard record.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record object written.

Implemented in Nakama.Client.

◆ WriteStorageObjectsAsync()

Task< IApiStorageObjectAcks > Nakama.IClient.WriteStorageObjectsAsync ( ISession  session,
IApiWriteStorageObject[]  objects,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Write objects to the storage engine.

Parameters
sessionThe session of the user.
objectsThe objects to write.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage write acknowledgements.

Implemented in Nakama.Client.

◆ WriteTournamentRecordAsync()

Task< IApiLeaderboardRecord > Nakama.IClient.WriteTournamentRecordAsync ( ISession  session,
string  tournamentId,
long  score,
long  subScore = 0L,
string  metadata = null,
RetryConfiguration  retryConfiguration = null,
CancellationTokenSource  canceller = null 
)

Write a record to a tournament.

Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament to write.
scoreThe score of the tournament record.
subScoreThe sub score for the tournament record.
metadataThe metadata for the tournament record.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationTokenSource that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the tournament record object written.

Implemented in Nakama.Client.

Property Documentation

◆ AutoRefreshSession

bool Nakama.IClient.AutoRefreshSession
get

True if the session should be refreshed with an active refresh token.

◆ GlobalRetryConfiguration

RetryConfiguration Nakama.IClient.GlobalRetryConfiguration
getset

The global retry configuration. See RetryConfiguration.

◆ Host

string Nakama.IClient.Host
get

The host address of the server. Defaults to "127.0.0.1".

◆ Port

int Nakama.IClient.Port
get

The port number of the server. Defaults to 7350.

◆ RetryJitterSeed

int Nakama.IClient.RetryJitterSeed
get

Used to seed random values generated during request retries.

◆ Scheme

string Nakama.IClient.Scheme
get

The protocol scheme used to connect with the server. Must be either "http" or "https".

◆ ServerKey

string Nakama.IClient.ServerKey
get

The key used to authenticate with the server without a session. Defaults to "defaultkey".

◆ Timeout

int Nakama.IClient.Timeout
getset

Set the timeout in seconds on requests sent to the server.


The documentation for this interface was generated from the following file: