Nakama .NET Client SDK 3.8.0
Nakama .NET Client SDK
Loading...
Searching...
No Matches
Nakama.Client Class Reference

More...

Inheritance diagram for Nakama.Client:
Nakama.IClient

Public Member Functions

 Client (string serverKey)
 
 Client (string serverKey, IHttpAdapter adapter)
 
 Client (string scheme, string host, int port, string serverKey)
 
 Client (string scheme, string host, int port, string serverKey, IHttpAdapter adapter, bool autoRefreshSession=true)
 
 Client (Uri uri, string serverKey)
 
 Client (Uri uri, string serverKey, IHttpAdapter adapter, bool autoRefreshSession=true)
 
async Task AddFriendsAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task AddGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task< ISessionAuthenticateAppleAsync (string token, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task< ISessionAuthenticateCustomAsync (string id, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task< ISessionAuthenticateDeviceAsync (string id, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task< ISessionAuthenticateEmailAsync (string email, string password, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task< ISessionAuthenticateFacebookAsync (string token, string username=null, bool create=true, bool import=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async 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, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task< ISessionAuthenticateGoogleAsync (string token, string username=null, bool create=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task< ISessionAuthenticateSteamAsync (string token, string username=null, bool create=true, bool import=true, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

 
async Task BanGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Ban a set of users from a group.
Parameters
sessionThe session of the user.
groupIdThe group to ban the users from.
idsThe ids of the users to ban.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task BlockFriendsAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task< IApiGroupCreateGroupAsync (ISession session, string name, string description="", string avatarUrl=null, string langTag=null, bool open=true, int maxCount=100, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new group object.

 
async Task DeleteAccountAsync (ISession session, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Delete the current user's account. Note that this will invalidate your session, requiring you to reauthenticate.
Parameters
sessionThe session of the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DeleteFriendsAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DeleteGroupAsync (ISession session, string groupId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Delete a group by id.
Parameters
sessionThe session of the user.
groupIdThe group id to to remove.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DeleteLeaderboardRecordAsync (ISession session, string leaderboardId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DeleteNotificationsAsync (ISession session, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Delete one or more notifications by id.
Parameters
sessionThe session of the user.
idsThe notification ids to remove.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DeleteStorageObjectsAsync (ISession session, StorageObjectId[] ids=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DeleteTournamentRecordAsync (ISession session, string tournamentId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Delete the user's tournament record.
Parameters
sessionThe session of the user.
idsThe id of the tournament to delete from.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task DemoteGroupUsersAsync (ISession session, string groupId, IEnumerable< string > usernames, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Members who are already at the lowest rank will be skipped.
 
async Task EventAsync (ISession session, string name, Dictionary< string, string > properties, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task< IApiAccountGetAccountAsync (ISession session, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Fetch the user account owned by the session.
Parameters
sessionThe session of the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the account object.

 
async Task< IApiValidatedSubscriptionGetSubscriptionAsync (ISession session, string productId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Get the subscription represented by the provided product id.
Parameters
sessionThe session of the user.
productIdThe product id.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the subscription.

 
async Task< IApiUsersGetUsersAsync (ISession session, IEnumerable< string > ids, IEnumerable< string > usernames=null, IEnumerable< string > facebookIds=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a collection of user objects.

 
async Task ImportFacebookFriendsAsync (ISession session, string token, bool? reset=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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.
 
async Task ImportSteamFriendsAsync (ISession session, string token, bool? reset=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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.
 
async Task JoinGroupAsync (ISession session, string groupId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task JoinTournamentAsync (ISession session, string tournamentId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Join a tournament by ID.
Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament to join.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task KickGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LeaveGroupAsync (ISession session, string groupId, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Leave a group by ID.
Parameters
sessionThe session of the user.
groupIdThe ID of the group to leave.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkAppleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkCustomAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkDeviceAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkEmailAsync (ISession session, string email, string password, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkFacebookAsync (ISession session, string token, bool? import=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkGameCenterAsync (ISession session, string bundleId, string playerId, string publicKeyUrl, string salt, string signature, string timestamp, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task LinkGoogleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Link a Google profile to a user account.
Parameters
sessionThe session of the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken 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.

 
async Task LinkSteamAsync (ISession session, string token, bool sync, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
Task< IApiChannelMessageListListChannelMessagesAsync (ISession session, IChannel channel, int limit=1, bool forward=true, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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, CancellationToken canceller = default).
cursorA cursor for the current position in the messages history to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the channel message list object.

 
async Task< IApiChannelMessageListListChannelMessagesAsync (ISession session, string channelId, int limit=1, bool forward=true, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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, CancellationToken canceller = default).
cursorA cursor for the current position in the messages history to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the channel message list object.

 
async Task< IApiFriendListListFriendsAsync (ISession session, int? state, int limit, string cursor, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the friend objects.

 
async Task< IApiGroupUserListListGroupUsersAsync (ISession session, string groupId, int? state, int limit, string cursor, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task< IApiGroupListListGroupsAsync (ISession session, string name=null, int limit=1, string cursor=null, string langTag=null, int? members=null, bool? open=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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.
langTagThe language tag filter to apply to the group list.
membersThe number of group members filter to apply to the group list.
openThe open/closed filter to apply to the group list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task to resolve group objects.

 
async Task< IApiLeaderboardRecordListListLeaderboardRecordsAsync (ISession session, string leaderboardId, IEnumerable< string > ownerIds=null, long? expiry=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task< IApiLeaderboardRecordListListLeaderboardRecordsAroundOwnerAsync (ISession session, string leaderboardId, string ownerId, long? expiry=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task< IApiMatchListListMatchesAsync (ISession session, int min, int max, int limit, bool authoritative, string label, string query, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the match list object.

 
async Task< IApiNotificationListListNotificationsAsync (ISession session, int limit=1, string cacheableCursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
Task< IApiStorageObjectListListStorageObjects (ISession session, string collection, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task< IApiStorageObjectListListStorageObjectsAsync (ISession session, string collection, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage object list.

 
async Task< IApiSubscriptionListListSubscriptionsAsync (ISession session, int limit, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 List the user's subscriptions.
Parameters
sessionThe session of the user.
limitThe number of subscriptions to list.
cursorAn optional cursor for the next page of subscriptions.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the subscription list.

 
async Task< IApiTournamentRecordListListTournamentRecordsAroundOwnerAsync (ISession session, string tournamentId, string ownerId, long? expiry=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task< IApiTournamentRecordListListTournamentRecordsAsync (ISession session, string tournamentId, IEnumerable< string > ownerIds=null, long? expiry=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task< IApiTournamentListListTournamentsAsync (ISession session, int categoryStart, int categoryEnd, int? startTime=null, int? endTime=null, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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, CancellationToken canceller = default). If null, tournaments will not be filtered by start time.
endTimeThe end time of the tournaments. (UNIX timestamp, RetryConfiguration retryConfiguration = null, CancellationToken canceller = default). 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the list of tournament objects.

 
Task< IApiUserGroupListListUserGroupsAsync (ISession session, int? state, int limit, string cursor, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group list object.

 
async Task< IApiUserGroupListListUserGroupsAsync (ISession session, string userId, int? state, int limit, string cursor, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group list object.

 
async Task< IApiStorageObjectListListUsersStorageObjectsAsync (ISession session, string collection, string userId, int limit=1, string cursor=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage object list.

 
async Task PromoteGroupUsersAsync (ISession session, string groupId, IEnumerable< string > ids, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task< IApiStorageObjectsReadStorageObjectsAsync (ISession session, IApiReadStorageObjectId[] ids=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage batch object.

 
async Task< IApiRpcRpcAsync (ISession session, string id, string payload, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the RPC response.

 
async Task< IApiRpcRpcAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the RPC response.

 
Task< IApiRpcRpcAsync (string httpkey, string id, string payload, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Execute a function on the server without a session.This function is usually used with server side code. DO NOT USE client side.
 
Task< IApiRpcRpcAsync (string httpkey, string id, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Execute a function on the server without a session.This function is usually used with server side code. DO NOT USE client side.
 
Task SessionLogoutAsync (ISession session, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Log out a session which invalidates the authorization and refresh token.
Parameters
sessionThe session to logout.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
Task SessionLogoutAsync (string authToken, string refreshToken, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task< ISessionSessionRefreshAsync (ISession session, Dictionary< string, string > vars=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new session object.

 
override string ToString ()
 
async Task UnlinkAppleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new session object.

 
async Task UnlinkCustomAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UnlinkDeviceAsync (ISession session, string id, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UnlinkEmailAsync (ISession session, string email, string password, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UnlinkFacebookAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UnlinkGameCenterAsync (ISession session, string bundleId, string playerId, string publicKeyUrl, string salt, string signature, string timestamp, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UnlinkGoogleAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UnlinkSteamAsync (ISession session, string token, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

 
async Task UpdateAccountAsync (ISession session, string username, string displayName=null, string avatarUrl=null, string langTag=null, string location=null, string timezone=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 
async Task UpdateGroupAsync (ISession session, string groupId, string name, bool open, string description=null, string avatarUrl=null, string langTag=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Update a group.The user must have the correct access permissions for the group.
 
async Task< IApiValidatePurchaseResponseValidatePurchaseAppleAsync (ISession session, string receipt, bool persist=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Validate a purchase receipt against the Apple App Store.
Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

 
async Task< IApiValidatePurchaseResponseValidatePurchaseFacebookInstantAsync (ISession session, string signedRequest, bool persist=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Validate a purchase receipt against Facebook Instant Games.
Parameters
sessionThe session of the user.
signedRequestBase64 encoded Facebook Instant receipt data payload.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

 
async Task< IApiValidatePurchaseResponseValidatePurchaseGoogleAsync (ISession session, string receipt, bool persist=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Validate a purchase receipt against the Google Play Store.
Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

 
async Task< IApiValidatePurchaseResponseValidatePurchaseHuaweiAsync (ISession session, string receipt, string signature, bool persist=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

 
async Task< IApiValidateSubscriptionResponseValidateSubscriptionAppleAsync (ISession session, string receipt, bool persist=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Validate an Apple subscription receipt.
 
async Task< IApiValidateSubscriptionResponseValidateSubscriptionGoogleAsync (ISession session, string receipt, bool persist=true, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Validate a Google subscription receipt.
 
async Task< IApiLeaderboardRecordWriteLeaderboardRecordAsync (ISession session, string leaderboardId, long score, long subScore=0, string metadata=null, ApiOperator apiOperator=ApiOperator.NO_OVERRIDE, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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.
operatorThe operator for the record that can be used to override the one set in the leaderboard.
Parameters
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record object written.

 
async Task< IApiStorageObjectAcksWriteStorageObjectsAsync (ISession session, IApiWriteStorageObject[] objects=null, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 Write objects to the storage engine.
Parameters
sessionThe session of the user.
objectsThe objects to write.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage write acknowledgements.

 
async Task< IApiLeaderboardRecordWriteTournamentRecordAsync (ISession session, string tournamentId, long score, long subScore=0, string metadata=null, ApiOperator apiOperator=ApiOperator.NO_OVERRIDE, RetryConfiguration retryConfiguration=null, CancellationToken canceller=default)
 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.
operatorThe operator for the record that can be used to override the one set in the tournament.
Parameters
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the tournament record object written.

 

Static Public Attributes

const string DefaultHost = "127.0.0.1"
 The default host address of the server.
 
const string DefaultScheme = "http"
 The default protocol scheme for the socket connection.
 
const int DefaultPort = 7350
 The default port number of the server.
 
static TimeSpan DefaultExpiredTimeSpan = TimeSpan.FromMinutes(5)
 The default expired timespan used to check session lifetime.
 

Properties

bool AutoRefreshSession [get]
 True if the session should be refreshed with an active refresh token.
 
RetryConfiguration GlobalRetryConfiguration [get, set]
 The global retry configuration. See RetryConfiguration.
 
string Host [get]
 The host address of the server. Defaults to "127.0.0.1".
 
ILogger Logger [get, set]
 The logger to use with the client.
 
int Port [get]
 The port number of the server. Defaults to 7350.
 
string Scheme [get]
 The protocol scheme used to connect with the server. Must be either "http" or "https".
 
string ServerKey [get]
 The key used to authenticate with the server without a session. Defaults to "defaultkey".
 
int Timeout [get, set]
 Set the timeout in seconds on requests sent to the server.
 
- Properties inherited from Nakama.IClient

Detailed Description

Constructor & Destructor Documentation

◆ Client() [1/6]

Nakama.Client.Client ( string  serverKey)
inline

There is a bug in Unity's WebGL implementation that prevents the proper invocation of constructors with more than four parameters. For this reason, avoid defining constructors that do this.

◆ Client() [2/6]

Nakama.Client.Client ( string  serverKey,
IHttpAdapter  adapter 
)
inline

◆ Client() [3/6]

Nakama.Client.Client ( string  scheme,
string  host,
int  port,
string  serverKey 
)
inline

◆ Client() [4/6]

Nakama.Client.Client ( string  scheme,
string  host,
int  port,
string  serverKey,
IHttpAdapter  adapter,
bool  autoRefreshSession = true 
)
inline

◆ Client() [5/6]

Nakama.Client.Client ( Uri  uri,
string  serverKey 
)
inline

◆ Client() [6/6]

Nakama.Client.Client ( Uri  uri,
string  serverKey,
IHttpAdapter  adapter,
bool  autoRefreshSession = true 
)
inline

Member Function Documentation

◆ AddFriendsAsync()

async Task Nakama.Client.AddFriendsAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ AddGroupUsersAsync()

async Task Nakama.Client.AddGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ AuthenticateAppleAsync()

async Task< ISession > Nakama.Client.AuthenticateAppleAsync ( string  token,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateCustomAsync()

async Task< ISession > Nakama.Client.AuthenticateCustomAsync ( string  id,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateDeviceAsync()

async Task< ISession > Nakama.Client.AuthenticateDeviceAsync ( string  id,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateEmailAsync()

async Task< ISession > Nakama.Client.AuthenticateEmailAsync ( string  email,
string  password,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateFacebookAsync()

async Task< ISession > Nakama.Client.AuthenticateFacebookAsync ( string  token,
string  username = null,
bool  create = true,
bool  import = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateGameCenterAsync()

async Task< ISession > Nakama.Client.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,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateGoogleAsync()

async Task< ISession > Nakama.Client.AuthenticateGoogleAsync ( string  token,
string  username = null,
bool  create = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ AuthenticateSteamAsync()

async Task< ISession > Nakama.Client.AuthenticateSteamAsync ( string  token,
string  username = null,
bool  create = true,
bool  import = true,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a session object.

Implements Nakama.IClient.

◆ BanGroupUsersAsync()

async Task Nakama.Client.BanGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Ban a set of users from a group.

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

Implements Nakama.IClient.

◆ BlockFriendsAsync()

async Task Nakama.Client.BlockFriendsAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ CreateGroupAsync()

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

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new group object.

Implements Nakama.IClient.

◆ DeleteAccountAsync()

async Task Nakama.Client.DeleteAccountAsync ( ISession  session,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Delete the current user's account. Note that this will invalidate your session, requiring you to reauthenticate.

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

Implements Nakama.IClient.

◆ DeleteFriendsAsync()

async Task Nakama.Client.DeleteFriendsAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ DeleteGroupAsync()

async Task Nakama.Client.DeleteGroupAsync ( ISession  session,
string  groupId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Delete a group by id.

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

Implements Nakama.IClient.

◆ DeleteLeaderboardRecordAsync()

async Task Nakama.Client.DeleteLeaderboardRecordAsync ( ISession  session,
string  leaderboardId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ DeleteNotificationsAsync()

async Task Nakama.Client.DeleteNotificationsAsync ( ISession  session,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Delete one or more notifications by id.

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

Implements Nakama.IClient.

◆ DeleteStorageObjectsAsync()

async Task Nakama.Client.DeleteStorageObjectsAsync ( ISession  session,
StorageObjectId[]  ids = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ DeleteTournamentRecordAsync()

async Task Nakama.Client.DeleteTournamentRecordAsync ( ISession  session,
string  tournamentId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Delete the user's tournament record.

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

Implements Nakama.IClient.

◆ DemoteGroupUsersAsync()

async Task Nakama.Client.DemoteGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  usernames,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Members who are already at the lowest rank will be skipped.

Implements Nakama.IClient.

◆ EventAsync()

async Task Nakama.Client.EventAsync ( ISession  session,
string  name,
Dictionary< string, string >  properties,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ GetAccountAsync()

async Task< IApiAccount > Nakama.Client.GetAccountAsync ( ISession  session,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Fetch the user account owned by the session.

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

Implements Nakama.IClient.

◆ GetSubscriptionAsync()

async Task< IApiValidatedSubscription > Nakama.Client.GetSubscriptionAsync ( ISession  session,
string  productId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Get the subscription represented by the provided product id.

Parameters
sessionThe session of the user.
productIdThe product id.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the subscription.

Implements Nakama.IClient.

◆ GetUsersAsync()

async Task< IApiUsers > Nakama.Client.GetUsersAsync ( ISession  session,
IEnumerable< string >  ids,
IEnumerable< string >  usernames = null,
IEnumerable< string >  facebookIds = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a collection of user objects.

Implements Nakama.IClient.

◆ ImportFacebookFriendsAsync()

async Task Nakama.Client.ImportFacebookFriendsAsync ( ISession  session,
string  token,
bool?  reset = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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.

Implements Nakama.IClient.

◆ ImportSteamFriendsAsync()

async Task Nakama.Client.ImportSteamFriendsAsync ( ISession  session,
string  token,
bool?  reset = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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.

Implements Nakama.IClient.

◆ JoinGroupAsync()

async Task Nakama.Client.JoinGroupAsync ( ISession  session,
string  groupId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ JoinTournamentAsync()

async Task Nakama.Client.JoinTournamentAsync ( ISession  session,
string  tournamentId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Join a tournament by ID.

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

Implements Nakama.IClient.

◆ KickGroupUsersAsync()

async Task Nakama.Client.KickGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LeaveGroupAsync()

async Task Nakama.Client.LeaveGroupAsync ( ISession  session,
string  groupId,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Leave a group by ID.

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

Implements Nakama.IClient.

◆ LinkAppleAsync()

async Task Nakama.Client.LinkAppleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LinkCustomAsync()

async Task Nakama.Client.LinkCustomAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LinkDeviceAsync()

async Task Nakama.Client.LinkDeviceAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LinkEmailAsync()

async Task Nakama.Client.LinkEmailAsync ( ISession  session,
string  email,
string  password,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LinkFacebookAsync()

async Task Nakama.Client.LinkFacebookAsync ( ISession  session,
string  token,
bool?  import = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LinkGameCenterAsync()

async Task Nakama.Client.LinkGameCenterAsync ( ISession  session,
string  bundleId,
string  playerId,
string  publicKeyUrl,
string  salt,
string  signature,
string  timestamp,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ LinkGoogleAsync()

async Task Nakama.Client.LinkGoogleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Link a Google profile to a user account.

Parameters
sessionThe session of the user.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken 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.

Implements Nakama.IClient.

◆ LinkSteamAsync()

async Task Nakama.Client.LinkSteamAsync ( ISession  session,
string  token,
bool  sync,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ ListChannelMessagesAsync() [1/2]

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

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, CancellationToken canceller = default).
cursorA cursor for the current position in the messages history to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the channel message list object.

Implements Nakama.IClient.

◆ ListChannelMessagesAsync() [2/2]

async Task< IApiChannelMessageList > Nakama.Client.ListChannelMessagesAsync ( ISession  session,
string  channelId,
int  limit = 1,
bool  forward = true,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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, CancellationToken canceller = default).
cursorA cursor for the current position in the messages history to list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the channel message list object.

Implements Nakama.IClient.

◆ ListFriendsAsync()

async Task< IApiFriendList > Nakama.Client.ListFriendsAsync ( ISession  session,
int?  state,
int  limit,
string  cursor,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the friend objects.

Implements Nakama.IClient.

◆ ListGroupsAsync()

async Task< IApiGroupList > Nakama.Client.ListGroupsAsync ( ISession  session,
string  name = null,
int  limit = 1,
string  cursor = null,
string  langTag = null,
int?  members = null,
bool?  open = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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.
langTagThe language tag filter to apply to the group list.
membersThe number of group members filter to apply to the group list.
openThe open/closed filter to apply to the group list.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task to resolve group objects.

Implements Nakama.IClient.

◆ ListGroupUsersAsync()

async Task< IApiGroupUserList > Nakama.Client.ListGroupUsersAsync ( ISession  session,
string  groupId,
int?  state,
int  limit,
string  cursor,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group user objects.

The returned IApiGroupUserList is automatically updated to reflect username changes for the current user.

Implements Nakama.IClient.

◆ ListLeaderboardRecordsAroundOwnerAsync()

async Task< IApiLeaderboardRecordList > Nakama.Client.ListLeaderboardRecordsAroundOwnerAsync ( ISession  session,
string  leaderboardId,
string  ownerId,
long?  expiry = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record objects.

The returned IApiLeaderboardRecordList is automatically updated to reflect username changes for the current user.

Implements Nakama.IClient.

◆ ListLeaderboardRecordsAsync()

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

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record objects.

The returned IApiLeaderboardRecordList is automatically updated to reflect username changes for the current user.

Implements Nakama.IClient.

◆ ListMatchesAsync()

async Task< IApiMatchList > Nakama.Client.ListMatchesAsync ( ISession  session,
int  min,
int  max,
int  limit,
bool  authoritative,
string  label,
string  query,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the match list object.

Implements Nakama.IClient.

◆ ListNotificationsAsync()

async Task< IApiNotificationList > Nakama.Client.ListNotificationsAsync ( ISession  session,
int  limit = 1,
string  cacheableCursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task to resolve notifications objects.

The returned IApiNotificationList is automatically updated to reflect username changes for the current user.

Implements Nakama.IClient.

◆ ListStorageObjects()

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

Implements Nakama.IClient.

◆ ListStorageObjectsAsync()

async Task< IApiStorageObjectList > Nakama.Client.ListStorageObjectsAsync ( ISession  session,
string  collection,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage object list.

Implements Nakama.IClient.

◆ ListSubscriptionsAsync()

async Task< IApiSubscriptionList > Nakama.Client.ListSubscriptionsAsync ( ISession  session,
int  limit,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

List the user's subscriptions.

Parameters
sessionThe session of the user.
limitThe number of subscriptions to list.
cursorAn optional cursor for the next page of subscriptions.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the subscription list.

Implements Nakama.IClient.

◆ ListTournamentRecordsAroundOwnerAsync()

async Task< IApiTournamentRecordList > Nakama.Client.ListTournamentRecordsAroundOwnerAsync ( ISession  session,
string  tournamentId,
string  ownerId,
long?  expiry = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the tournament record list object.

The returned IApiTournamentRecordList is automatically updated to reflect username changes for the current user.

Implements Nakama.IClient.

◆ ListTournamentRecordsAsync()

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

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the list of tournament records.

The returned IApiTournamentRecordList is automatically updated to reflect username changes for the current user.

Implements Nakama.IClient.

◆ ListTournamentsAsync()

async Task< IApiTournamentList > Nakama.Client.ListTournamentsAsync ( ISession  session,
int  categoryStart,
int  categoryEnd,
int?  startTime = null,
int?  endTime = null,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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, CancellationToken canceller = default). If null, tournaments will not be filtered by start time.
endTimeThe end time of the tournaments. (UNIX timestamp, RetryConfiguration retryConfiguration = null, CancellationToken canceller = default). 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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the list of tournament objects.

Implements Nakama.IClient.

◆ ListUserGroupsAsync() [1/2]

Task< IApiUserGroupList > Nakama.Client.ListUserGroupsAsync ( ISession  session,
int?  state,
int  limit,
string  cursor,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group list object.

Implements Nakama.IClient.

◆ ListUserGroupsAsync() [2/2]

async Task< IApiUserGroupList > Nakama.Client.ListUserGroupsAsync ( ISession  session,
string  userId,
int?  state,
int  limit,
string  cursor,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the group list object.

Implements Nakama.IClient.

◆ ListUsersStorageObjectsAsync()

async Task< IApiStorageObjectList > Nakama.Client.ListUsersStorageObjectsAsync ( ISession  session,
string  collection,
string  userId,
int  limit = 1,
string  cursor = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage object list.

Implements Nakama.IClient.

◆ PromoteGroupUsersAsync()

async Task Nakama.Client.PromoteGroupUsersAsync ( ISession  session,
string  groupId,
IEnumerable< string >  ids,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ ReadStorageObjectsAsync()

async Task< IApiStorageObjects > Nakama.Client.ReadStorageObjectsAsync ( ISession  session,
IApiReadStorageObjectId[]  ids = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the storage batch object.

Implements Nakama.IClient.

◆ RpcAsync() [1/4]

async Task< IApiRpc > Nakama.Client.RpcAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the RPC response.

Implements Nakama.IClient.

◆ RpcAsync() [2/4]

async Task< IApiRpc > Nakama.Client.RpcAsync ( ISession  session,
string  id,
string  payload,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the RPC response.

Implements Nakama.IClient.

◆ RpcAsync() [3/4]

Task< IApiRpc > Nakama.Client.RpcAsync ( string  httpkey,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)

Execute a function on the server without a session.This function is usually used with server side code. DO NOT USE client side.

Implements Nakama.IClient.

◆ RpcAsync() [4/4]

Task< IApiRpc > Nakama.Client.RpcAsync ( string  httpkey,
string  id,
string  payload,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)

Execute a function on the server without a session.This function is usually used with server side code. DO NOT USE client side.

Implements Nakama.IClient.

◆ SessionLogoutAsync() [1/2]

Task Nakama.Client.SessionLogoutAsync ( ISession  session,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)

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

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

Implements Nakama.IClient.

◆ SessionLogoutAsync() [2/2]

Task Nakama.Client.SessionLogoutAsync ( string  authToken,
string  refreshToken,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ SessionRefreshAsync()

async Task< ISession > Nakama.Client.SessionRefreshAsync ( ISession  session,
Dictionary< string, string >  vars = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new session object.

Implements Nakama.IClient.

◆ ToString()

override string Nakama.Client.ToString ( )
inline

◆ UnlinkAppleAsync()

async Task Nakama.Client.UnlinkAppleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a new session object.

Implements Nakama.IClient.

◆ UnlinkCustomAsync()

async Task Nakama.Client.UnlinkCustomAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UnlinkDeviceAsync()

async Task Nakama.Client.UnlinkDeviceAsync ( ISession  session,
string  id,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UnlinkEmailAsync()

async Task Nakama.Client.UnlinkEmailAsync ( ISession  session,
string  email,
string  password,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UnlinkFacebookAsync()

async Task Nakama.Client.UnlinkFacebookAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UnlinkGameCenterAsync()

async Task Nakama.Client.UnlinkGameCenterAsync ( ISession  session,
string  bundleId,
string  playerId,
string  publicKeyUrl,
string  salt,
string  signature,
string  timestamp,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UnlinkGoogleAsync()

async Task Nakama.Client.UnlinkGoogleAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UnlinkSteamAsync()

async Task Nakama.Client.UnlinkSteamAsync ( ISession  session,
string  token,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implements Nakama.IClient.

◆ UpdateAccountAsync()

async Task Nakama.Client.UpdateAccountAsync ( ISession  session,
string  username,
string  displayName = null,
string  avatarUrl = null,
string  langTag = null,
string  location = null,
string  timezone = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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 CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

The current user's username will be automatically refreshed in their authorized ISession if the username field is updated to become different.

Implements Nakama.IClient.

◆ UpdateGroupAsync()

async Task Nakama.Client.UpdateGroupAsync ( ISession  session,
string  groupId,
string  name,
bool  open,
string  description = null,
string  avatarUrl = null,
string  langTag = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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

Implements Nakama.IClient.

◆ ValidatePurchaseAppleAsync()

async Task< IApiValidatePurchaseResponse > Nakama.Client.ValidatePurchaseAppleAsync ( ISession  session,
string  receipt,
bool  persist = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Validate a purchase receipt against the Apple App Store.

Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implements Nakama.IClient.

◆ ValidatePurchaseFacebookInstantAsync()

async Task< IApiValidatePurchaseResponse > Nakama.Client.ValidatePurchaseFacebookInstantAsync ( ISession  session,
string  signedRequest,
bool  persist = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Validate a purchase receipt against Facebook Instant Games.

Parameters
sessionThe session of the user.
signedRequestBase64 encoded Facebook Instant receipt data payload.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implements Nakama.IClient.

◆ ValidatePurchaseGoogleAsync()

async Task< IApiValidatePurchaseResponse > Nakama.Client.ValidatePurchaseGoogleAsync ( ISession  session,
string  receipt,
bool  persist = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Validate a purchase receipt against the Google Play Store.

Parameters
sessionThe session of the user.
receiptThe purchase receipt to be validated.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implements Nakama.IClient.

◆ ValidatePurchaseHuaweiAsync()

async Task< IApiValidatePurchaseResponse > Nakama.Client.ValidatePurchaseHuaweiAsync ( ISession  session,
string  receipt,
string  signature,
bool  persist = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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.
persistWhether or not to track the receipt in the Nakama database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the validated list of purchase receipts.

Implements Nakama.IClient.

◆ ValidateSubscriptionAppleAsync()

async Task< IApiValidateSubscriptionResponse > Nakama.Client.ValidateSubscriptionAppleAsync ( ISession  session,
string  receipt,
bool  persist = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Validate an Apple subscription receipt.

Parameters
sessionThe session of the user.
receiptThe receipt to validate.
persistWhether or not to persist the receipt to Nakama's database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the subscription validation response.

Implements Nakama.IClient.

◆ ValidateSubscriptionGoogleAsync()

async Task< IApiValidateSubscriptionResponse > Nakama.Client.ValidateSubscriptionGoogleAsync ( ISession  session,
string  receipt,
bool  persist = true,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Validate a Google subscription receipt.

Parameters
sessionThe session of the user.
receiptThe receipt to validate.
persistWhether or not to persist the receipt to Nakama's database.
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the subscription validation response.

Implements Nakama.IClient.

◆ WriteLeaderboardRecordAsync()

async Task< IApiLeaderboardRecord > Nakama.Client.WriteLeaderboardRecordAsync ( ISession  session,
string  leaderboardId,
long  score,
long  subScore = 0,
string  metadata = null,
ApiOperator  apiOperator = ApiOperator::NO_OVERRIDE,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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.
operatorThe operator for the record that can be used to override the one set in the leaderboard.
Parameters
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the leaderboard record object written.

Implements Nakama.IClient.

◆ WriteStorageObjectsAsync()

async Task< IApiStorageObjectAcks > Nakama.Client.WriteStorageObjectsAsync ( ISession  session,
IApiWriteStorageObject[]  objects = null,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

Write objects to the storage engine.

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

Implements Nakama.IClient.

◆ WriteTournamentRecordAsync()

async Task< IApiLeaderboardRecord > Nakama.Client.WriteTournamentRecordAsync ( ISession  session,
string  tournamentId,
long  score,
long  subScore = 0,
string  metadata = null,
ApiOperator  apiOperator = ApiOperator::NO_OVERRIDE,
RetryConfiguration  retryConfiguration = null,
CancellationToken  canceller = default 
)
inline

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.
operatorThe operator for the record that can be used to override the one set in the tournament.
Parameters
retryConfigurationThe retry configuration. See RetryConfiguration
cancellerThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the tournament record object written.

Implements Nakama.IClient.

Member Data Documentation

◆ DefaultExpiredTimeSpan

TimeSpan Nakama.Client.DefaultExpiredTimeSpan = TimeSpan.FromMinutes(5)
static

The default expired timespan used to check session lifetime.

◆ DefaultHost

const string Nakama.Client.DefaultHost = "127.0.0.1"
static

The default host address of the server.

◆ DefaultPort

const int Nakama.Client.DefaultPort = 7350
static

The default port number of the server.

◆ DefaultScheme

const string Nakama.Client.DefaultScheme = "http"
static

The default protocol scheme for the socket connection.

Property Documentation

◆ AutoRefreshSession

bool Nakama.Client.AutoRefreshSession
get

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

Implements Nakama.IClient.

◆ GlobalRetryConfiguration

RetryConfiguration Nakama.Client.GlobalRetryConfiguration
getset
Initial value:
= new RetryConfiguration(
baseDelayMs: 500,
jitter: RetryJitter.FullJitter,
listener: null,
maxRetries: 4)

The global retry configuration. See RetryConfiguration.

Implements Nakama.IClient.

◆ Host

string Nakama.Client.Host
get

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

Implements Nakama.IClient.

◆ Logger

ILogger Nakama.Client.Logger
getset

The logger to use with the client.

Implements Nakama.IClient.

◆ Port

int Nakama.Client.Port
get

The port number of the server. Defaults to 7350.

Implements Nakama.IClient.

◆ Scheme

string Nakama.Client.Scheme
get

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

Implements Nakama.IClient.

◆ ServerKey

string Nakama.Client.ServerKey
get

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

Implements Nakama.IClient.

◆ Timeout

int Nakama.Client.Timeout
getset

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

Implements Nakama.IClient.


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