Nakama C++ Client SDK 2.5.1
Client for Nakama Server
NClientInterface Class Referenceabstract

#include <NClientInterface.h>

Public Member Functions

virtual ~NClientInterface ()
 
virtual void setErrorCallback (ErrorCallback errorCallback)=0
 
virtual void setUserData (void *userData)=0
 
virtual void * getUserData () const =0
 
virtual void disconnect ()=0
 
virtual void tick ()=0
 
virtual NRtClientPtr createRtClient (int32_t port=DEFAULT_PORT, NRtTransportPtr transport=nullptr)=0
 
virtual NRtClientPtr createRtClient (const RtClientParameters &parameters, NRtTransportPtr transport=nullptr)=0
 
virtual void authenticateDevice (const std::string &id, const opt::optional< std::string > &username=opt::nullopt, const opt::optional< bool > &create=opt::nullopt, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateEmail (const std::string &email, const std::string &password, const std::string &username=std::string(), bool create=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateFacebook (const std::string &accessToken, const std::string &username=std::string(), bool create=false, bool importFriends=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateGoogle (const std::string &accessToken, const std::string &username=std::string(), bool create=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateGameCenter (const std::string &playerId, const std::string &bundleId, NTimestamp timestampSeconds, const std::string &salt, const std::string &signature, const std::string &publicKeyUrl, const std::string &username=std::string(), bool create=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateApple (const std::string &token, const std::string &username=std::string(), bool create=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateCustom (const std::string &id, const std::string &username=std::string(), bool create=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void authenticateSteam (const std::string &token, const std::string &username=std::string(), bool create=false, const NStringMap &vars={}, std::function< void(NSessionPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkFacebook (NSessionPtr session, const std::string &accessToken, const opt::optional< bool > &importFriends=opt::nullopt, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkEmail (NSessionPtr session, const std::string &email, const std::string &password, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkDevice (NSessionPtr session, const std::string &id, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkGoogle (NSessionPtr session, const std::string &accessToken, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkGameCenter (NSessionPtr session, const std::string &playerId, const std::string &bundleId, NTimestamp timestampSeconds, const std::string &salt, const std::string &signature, const std::string &publicKeyUrl, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkApple (NSessionPtr session, const std::string &token, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkSteam (NSessionPtr session, const std::string &token, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void linkCustom (NSessionPtr session, const std::string &id, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkFacebook (NSessionPtr session, const std::string &accessToken, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkEmail (NSessionPtr session, const std::string &email, const std::string &password, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkGoogle (NSessionPtr session, const std::string &accessToken, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkGameCenter (NSessionPtr session, const std::string &playerId, const std::string &bundleId, NTimestamp timestampSeconds, const std::string &salt, const std::string &signature, const std::string &publicKeyUrl, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkApple (NSessionPtr session, const std::string &token, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkSteam (NSessionPtr session, const std::string &token, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkDevice (NSessionPtr session, const std::string &id, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void unlinkCustom (NSessionPtr session, const std::string &id, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void importFacebookFriends (NSessionPtr session, const std::string &token, const opt::optional< bool > &reset=opt::nullopt, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void getAccount (NSessionPtr session, std::function< void(const NAccount &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void updateAccount (NSessionPtr session, const opt::optional< std::string > &username=opt::nullopt, const opt::optional< std::string > &displayName=opt::nullopt, const opt::optional< std::string > &avatarUrl=opt::nullopt, const opt::optional< std::string > &langTag=opt::nullopt, const opt::optional< std::string > &location=opt::nullopt, const opt::optional< std::string > &timezone=opt::nullopt, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void getUsers (NSessionPtr session, const std::vector< std::string > &ids, const std::vector< std::string > &usernames={}, const std::vector< std::string > &facebookIds={}, std::function< void(const NUsers &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void addFriends (NSessionPtr session, const std::vector< std::string > &ids, const std::vector< std::string > &usernames={}, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void deleteFriends (NSessionPtr session, const std::vector< std::string > &ids, const std::vector< std::string > &usernames={}, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void blockFriends (NSessionPtr session, const std::vector< std::string > &ids, const std::vector< std::string > &usernames={}, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listFriends (NSessionPtr session, const opt::optional< int32_t > &limit, const opt::optional< NFriend::State > &state, const std::string &cursor="", std::function< void(NFriendListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void createGroup (NSessionPtr session, const std::string &name, const std::string &description="", const std::string &avatarUrl="", const std::string &langTag="", bool open=false, const opt::optional< int32_t > &maxCount={}, std::function< void(const NGroup &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void deleteGroup (NSessionPtr session, const std::string &groupId, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void addGroupUsers (NSessionPtr session, const std::string &groupId, const std::vector< std::string > &ids, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listGroupUsers (NSessionPtr session, const std::string &groupId, const opt::optional< int32_t > &limit, const opt::optional< NFriend::State > &state, const std::string &cursor="", std::function< void(NGroupUserListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void kickGroupUsers (NSessionPtr session, const std::string &groupId, const std::vector< std::string > &ids, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void joinGroup (NSessionPtr session, const std::string &groupId, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void leaveGroup (NSessionPtr session, const std::string &groupId, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listGroups (NSessionPtr session, const std::string &name, int32_t limit=0, const std::string &cursor="", std::function< void(NGroupListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listUserGroups (NSessionPtr session, const opt::optional< int32_t > &limit, const opt::optional< NFriend::State > &state, const std::string &cursor="", std::function< void(NUserGroupListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listUserGroups (NSessionPtr session, const std::string &userId, const opt::optional< int32_t > &limit, const opt::optional< NFriend::State > &state, const std::string &cursor="", std::function< void(NUserGroupListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void promoteGroupUsers (NSessionPtr session, const std::string &groupId, const std::vector< std::string > &ids, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void demoteGroupUsers (NSessionPtr session, const std::string &groupId, const std::vector< std::string > &ids, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void updateGroup (NSessionPtr session, const std::string &groupId, const opt::optional< std::string > &name=opt::nullopt, const opt::optional< std::string > &description=opt::nullopt, const opt::optional< std::string > &avatarUrl=opt::nullopt, const opt::optional< std::string > &langTag=opt::nullopt, const opt::optional< bool > &open=opt::nullopt, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listLeaderboardRecords (NSessionPtr session, const std::string &leaderboardId, const std::vector< std::string > &ownerIds={}, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cursor=opt::nullopt, std::function< void(NLeaderboardRecordListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listLeaderboardRecordsAroundOwner (NSessionPtr session, const std::string &leaderboardId, const std::string &ownerId, const opt::optional< int32_t > &limit=opt::nullopt, std::function< void(NLeaderboardRecordListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void writeLeaderboardRecord (NSessionPtr session, const std::string &leaderboardId, int64_t score, const opt::optional< int64_t > &subscore=opt::nullopt, const opt::optional< std::string > &metadata=opt::nullopt, std::function< void(NLeaderboardRecord)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void writeTournamentRecord (NSessionPtr session, const std::string &tournamentId, int64_t score, const opt::optional< int64_t > &subscore=opt::nullopt, const opt::optional< std::string > &metadata=opt::nullopt, std::function< void(NLeaderboardRecord)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void deleteLeaderboardRecord (NSessionPtr session, const std::string &leaderboardId, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listMatches (NSessionPtr session, const opt::optional< int32_t > &min_size=opt::nullopt, const opt::optional< int32_t > &max_size=opt::nullopt, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &label=opt::nullopt, const opt::optional< bool > &authoritative=opt::nullopt, std::function< void(NMatchListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listNotifications (NSessionPtr session, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cacheableCursor=opt::nullopt, std::function< void(NNotificationListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void deleteNotifications (NSessionPtr session, const std::vector< std::string > &notificationIds, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listChannelMessages (NSessionPtr session, const std::string &channelId, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cursor=opt::nullopt, const opt::optional< bool > &forward=opt::nullopt, std::function< void(NChannelMessageListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listTournaments (NSessionPtr session, const opt::optional< uint32_t > &categoryStart=opt::nullopt, const opt::optional< uint32_t > &categoryEnd=opt::nullopt, const opt::optional< uint32_t > &startTime=opt::nullopt, const opt::optional< uint32_t > &endTime=opt::nullopt, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cursor=opt::nullopt, std::function< void(NTournamentListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listTournamentRecords (NSessionPtr session, const std::string &tournamentId, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cursor=opt::nullopt, const std::vector< std::string > &ownerIds={}, std::function< void(NTournamentRecordListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listTournamentRecordsAroundOwner (NSessionPtr session, const std::string &tournamentId, const std::string &ownerId, const opt::optional< int32_t > &limit=opt::nullopt, std::function< void(NTournamentRecordListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void joinTournament (NSessionPtr session, const std::string &tournamentId, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listStorageObjects (NSessionPtr session, const std::string &collection, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cursor=opt::nullopt, std::function< void(NStorageObjectListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void listUsersStorageObjects (NSessionPtr session, const std::string &collection, const std::string &userId, const opt::optional< int32_t > &limit=opt::nullopt, const opt::optional< std::string > &cursor=opt::nullopt, std::function< void(NStorageObjectListPtr)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void writeStorageObjects (NSessionPtr session, const std::vector< NStorageObjectWrite > &objects, std::function< void(const NStorageObjectAcks &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void readStorageObjects (NSessionPtr session, const std::vector< NReadStorageObjectId > &objectIds, std::function< void(const NStorageObjects &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void deleteStorageObjects (NSessionPtr session, const std::vector< NDeleteStorageObjectId > &objectIds, std::function< void()> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void rpc (NSessionPtr session, const std::string &id, const opt::optional< std::string > &payload=opt::nullopt, std::function< void(const NRpc &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 
virtual void rpc (const std::string &http_key, const std::string &id, const opt::optional< std::string > &payload=opt::nullopt, std::function< void(const NRpc &)> successCallback=nullptr, ErrorCallback errorCallback=nullptr)=0
 

Detailed Description

A client interface to interact with Nakama server.

Constructor & Destructor Documentation

◆ ~NClientInterface()

virtual NClientInterface::~NClientInterface ( )
inlinevirtual

Member Function Documentation

◆ addFriends()

virtual void NClientInterface::addFriends ( NSessionPtr  session,
const std::vector< std::string > &  ids,
const std::vector< std::string > &  usernames = {},
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Add one or more friends by id.

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.

◆ addGroupUsers()

virtual void NClientInterface::addGroupUsers ( NSessionPtr  session,
const std::string &  groupId,
const std::vector< std::string > &  ids,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ authenticateApple()

virtual void NClientInterface::authenticateApple ( const std::string &  token,
const std::string &  username = std::string(),
bool  create = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Authenticate a user with Apple Sign In.

Parameters
tokenThe ID token received from Apple to validate.
usernameA username used to create the user.
createTrue if the user should be created when authenticated.
varsExtra information that will be bundled in the session token.

◆ authenticateCustom()

virtual void NClientInterface::authenticateCustom ( const std::string &  id,
const std::string &  username = std::string(),
bool  create = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.
createTrue if the user should be created when authenticated.
varsExtra information that will be bundled in the session token.

◆ authenticateDevice()

virtual void NClientInterface::authenticateDevice ( const std::string &  id,
const opt::optional< std::string > &  username = opt::nullopt,
const opt::optional< bool > &  create = opt::nullopt,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Authenticate a user with a device id.

Parameters
idA device identifier usually obtained from a platform API.
usernameA username used to create the user. Defaults to empty string.
createTrue if the user should be created when authenticated. Defaults to false.
varsExtra information that will be bundled in the session token.

◆ authenticateEmail()

virtual void NClientInterface::authenticateEmail ( const std::string &  email,
const std::string &  password,
const std::string &  username = std::string(),
bool  create = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.
createTrue if the user should be created when authenticated.
varsExtra information that will be bundled in the session token.

◆ authenticateFacebook()

virtual void NClientInterface::authenticateFacebook ( const std::string &  accessToken,
const std::string &  username = std::string(),
bool  create = false,
bool  importFriends = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Authenticate a user with a Facebook auth token.

Parameters
accessTokenAn OAuth access token from the Facebook SDK.
usernameA username used to create the user.
createTrue if the user should be created when authenticated.
importFriendsTrue if the Facebook friends should be imported.
varsExtra information that will be bundled in the session token.

◆ authenticateGameCenter()

virtual void NClientInterface::authenticateGameCenter ( const std::string &  playerId,
const std::string &  bundleId,
NTimestamp  timestampSeconds,
const std::string &  salt,
const std::string &  signature,
const std::string &  publicKeyUrl,
const std::string &  username = std::string(),
bool  create = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Authenticate a user with Apple Game Center.

Parameters
playerIdThe player id of the user in Game Center.
bundleIdThe bundle id of the Game Center application.
timestampSecondsThe date and time that the signature was created.
saltA random NSString used to compute the hash and keep it randomized.
signatureThe verification signature data generated.
publicKeyUrlThe URL for the public encryption key.
usernameA username used to create the user.
createTrue if the user should be created when authenticated.
varsExtra information that will be bundled in the session token.

◆ authenticateGoogle()

virtual void NClientInterface::authenticateGoogle ( const std::string &  accessToken,
const std::string &  username = std::string(),
bool  create = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Authenticate a user with a Google auth token.

Parameters
accessTokenAn OAuth access token from the Google SDK.
usernameA username used to create the user.
createTrue if the user should be created when authenticated.
varsExtra information that will be bundled in the session token.

◆ authenticateSteam()

virtual void NClientInterface::authenticateSteam ( const std::string &  token,
const std::string &  username = std::string(),
bool  create = false,
const NStringMap vars = {},
std::function< void(NSessionPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Authenticate a user with a Steam auth token.

Parameters
tokenAn authentication token from the Steam network.
usernameA username used to create the user.
createTrue if the user should be created when authenticated.
varsExtra information that will be bundled in the session token.

◆ blockFriends()

virtual void NClientInterface::blockFriends ( NSessionPtr  session,
const std::vector< std::string > &  ids,
const std::vector< std::string > &  usernames = {},
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Block one or more friends by id.

Parameters
sessionThe session of the user.
idsThe ids of the users to block.
usernamesThe usernames of the users to block.

◆ createGroup()

virtual void NClientInterface::createGroup ( NSessionPtr  session,
const std::string &  name,
const std::string &  description = "",
const std::string &  avatarUrl = "",
const std::string &  langTag = "",
bool  open = false,
const opt::optional< int32_t > &  maxCount = {},
std::function< void(const NGroup &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.
openTrue if the group should have open membership.
maxCountMaximum number of group members.

◆ createRtClient() [1/2]

virtual NRtClientPtr NClientInterface::createRtClient ( const RtClientParameters parameters,
NRtTransportPtr  transport = nullptr 
)
pure virtual

Create a new real-time client with custom parameters.

Parameters
parametersThe real-time client parameters.
transportThe websocket transport. If not set then default websocket transport will be used.
Returns
a new NRtClient instance.

◆ createRtClient() [2/2]

virtual NRtClientPtr NClientInterface::createRtClient ( int32_t  port = DEFAULT_PORT,
NRtTransportPtr  transport = nullptr 
)
pure virtual

Create a new real-time client with parameters from client.

Parameters
portThe port number of the server. Default is 7350 for non-SSL connection, 443 for SSL.
transportThe websocket transport. If not set then default websocket transport will be used.
Returns
a new NRtClient instance.

◆ deleteFriends()

virtual void NClientInterface::deleteFriends ( NSessionPtr  session,
const std::vector< std::string > &  ids,
const std::vector< std::string > &  usernames = {},
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ deleteGroup()

virtual void NClientInterface::deleteGroup ( NSessionPtr  session,
const std::string &  groupId,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Delete a group by id.

Parameters
sessionThe session of the user.
groupIdThe group id to to remove.

◆ deleteLeaderboardRecord()

virtual void NClientInterface::deleteLeaderboardRecord ( NSessionPtr  session,
const std::string &  leaderboardId,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Delete a leaderboard record.

Parameters
sessionThe session of the user.
leaderboardIdThe id of the leaderboard with the record to be deleted.

◆ deleteNotifications()

virtual void NClientInterface::deleteNotifications ( NSessionPtr  session,
const std::vector< std::string > &  notificationIds,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Delete one or more notifications by id.

Parameters
sessionThe session of the user.
notificationIdsThe notification ids to remove.

◆ deleteStorageObjects()

virtual void NClientInterface::deleteStorageObjects ( NSessionPtr  session,
const std::vector< NDeleteStorageObjectId > &  objectIds,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Delete one or more storage objects.

Parameters
sessionThe session of the user.
objectIdsThe ids of the objects to delete.

◆ demoteGroupUsers()

virtual void NClientInterface::demoteGroupUsers ( NSessionPtr  session,
const std::string &  groupId,
const std::vector< std::string > &  ids,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
groupIdThe group ID to demote in.
idsThe ids of the users to demote.

◆ disconnect()

virtual void NClientInterface::disconnect ( )
pure virtual

Disconnects the client. This function kills all outgoing exchanges immediately without waiting.

◆ getAccount()

virtual void NClientInterface::getAccount ( NSessionPtr  session,
std::function< void(const NAccount &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Fetch the user account owned by the session.

Parameters
sessionThe session of the user.

◆ getUserData()

virtual void * NClientInterface::getUserData ( ) const
pure virtual

Get user data.

Returns
The user data.

◆ getUsers()

virtual void NClientInterface::getUsers ( NSessionPtr  session,
const std::vector< std::string > &  ids,
const std::vector< std::string > &  usernames = {},
const std::vector< std::string > &  facebookIds = {},
std::function< void(const NUsers &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
idsList of user IDs.
usernamesList of usernames.
facebookIdsList of Facebook IDs.

◆ importFacebookFriends()

virtual void NClientInterface::importFacebookFriends ( NSessionPtr  session,
const std::string &  token,
const opt::optional< bool > &  reset = opt::nullopt,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

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

Parameters
sessionThe session of the user.
tokenAn OAuth access token from the Facebook SDK.
resetTrue if the Facebook friend import for the user should be reset.

◆ joinGroup()

virtual void NClientInterface::joinGroup ( NSessionPtr  session,
const std::string &  groupId,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ joinTournament()

virtual void NClientInterface::joinTournament ( NSessionPtr  session,
const std::string &  tournamentId,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
tournamentIdThe id of the tournament to join.

◆ kickGroupUsers()

virtual void NClientInterface::kickGroupUsers ( NSessionPtr  session,
const std::string &  groupId,
const std::vector< std::string > &  ids,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ leaveGroup()

virtual void NClientInterface::leaveGroup ( NSessionPtr  session,
const std::string &  groupId,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Leave a group by id.

Parameters
sessionThe session of the user.
groupIdThe id of the group to leave.

◆ linkApple()

virtual void NClientInterface::linkApple ( NSessionPtr  session,
const std::string &  token,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ linkCustom()

virtual void NClientInterface::linkCustom ( NSessionPtr  session,
const std::string &  id,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ linkDevice()

virtual void NClientInterface::linkDevice ( NSessionPtr  session,
const std::string &  id,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ linkEmail()

virtual void NClientInterface::linkEmail ( NSessionPtr  session,
const std::string &  email,
const std::string &  password,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ linkFacebook()

virtual void NClientInterface::linkFacebook ( NSessionPtr  session,
const std::string &  accessToken,
const opt::optional< bool > &  importFriends = opt::nullopt,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Link a Facebook profile to a user account.

Parameters
sessionThe session of the user.
accessTokenAn OAuth access token from the Facebook SDK.
importFriendsTrue if the Facebook friends should be imported.

◆ linkGameCenter()

virtual void NClientInterface::linkGameCenter ( NSessionPtr  session,
const std::string &  playerId,
const std::string &  bundleId,
NTimestamp  timestampSeconds,
const std::string &  salt,
const std::string &  signature,
const std::string &  publicKeyUrl,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Link a Game Center profile to a user account.

Parameters
sessionThe session of the user.
playerIdThe player id of the user in Game Center.
bundleIdThe bundle id of the Game Center application.
timestampSecondsThe date and time that the signature was created.
saltA random NSString used to compute the hash and keep it randomized.
signatureThe verification signature data generated.
publicKeyUrlThe URL for the public encryption key.

◆ linkGoogle()

virtual void NClientInterface::linkGoogle ( NSessionPtr  session,
const std::string &  accessToken,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Link a Google profile to a user account.

Parameters
sessionThe session of the user.
accessTokenAn OAuth access token from the Google SDK.

◆ linkSteam()

virtual void NClientInterface::linkSteam ( NSessionPtr  session,
const std::string &  token,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Link a Steam profile to a user account.

Parameters
sessionThe session of the user.
tokenAn authentication token from the Steam network.

◆ listChannelMessages()

virtual void NClientInterface::listChannelMessages ( NSessionPtr  session,
const std::string &  channelId,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cursor = opt::nullopt,
const opt::optional< bool > &  forward = opt::nullopt,
std::function< void(NChannelMessageListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List messages from a chat channel.

Parameters
sessionThe session of the user.
channelIdA channel identifier.
limitThe number of chat messages to list.
cursorA cursor for the current position in the messages history to list.
forwardFetch messages forward from the current cursor (or the start).

◆ listFriends()

virtual void NClientInterface::listFriends ( NSessionPtr  session,
const opt::optional< int32_t > &  limit,
const opt::optional< NFriend::State > &  state,
const std::string &  cursor = "",
std::function< void(NFriendListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List of friends of the current user.

Parameters
sessionThe session of the user.
limitThe max number of records to return. Between 1 and 100.
stateThe friend state to list.
cursorAn optional next page cursor.

◆ listGroups()

virtual void NClientInterface::listGroups ( NSessionPtr  session,
const std::string &  name,
int32_t  limit = 0,
const std::string &  cursor = "",
std::function< void(NGroupListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ listGroupUsers()

virtual void NClientInterface::listGroupUsers ( NSessionPtr  session,
const std::string &  groupId,
const opt::optional< int32_t > &  limit,
const opt::optional< NFriend::State > &  state,
const std::string &  cursor = "",
std::function< void(NGroupUserListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List all users part of the group.

Parameters
sessionThe session of the user.
groupIdThe id of the group.
limitThe max number of records to return. Between 1 and 100.
stateThe friend state to list.
cursorAn optional next page cursor.

◆ listLeaderboardRecords()

virtual void NClientInterface::listLeaderboardRecords ( NSessionPtr  session,
const std::string &  leaderboardId,
const std::vector< std::string > &  ownerIds = {},
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cursor = opt::nullopt,
std::function< void(NLeaderboardRecordListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.
limitThe number of records to list.
cursorA cursor for the current position in the leaderboard records to list.

◆ listLeaderboardRecordsAroundOwner()

virtual void NClientInterface::listLeaderboardRecordsAroundOwner ( NSessionPtr  session,
const std::string &  leaderboardId,
const std::string &  ownerId,
const opt::optional< int32_t > &  limit = opt::nullopt,
std::function< void(NLeaderboardRecordListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List leaderboard records from a given leaderboard around the owner.

Parameters
sessionThe session of the user.
leaderboardIdThe id of the leaderboard to list.
ownerIdThe owner to retrieve records around.
limitMax number of records to return. Between 1 and 100.

◆ listMatches()

virtual void NClientInterface::listMatches ( NSessionPtr  session,
const opt::optional< int32_t > &  min_size = opt::nullopt,
const opt::optional< int32_t > &  max_size = opt::nullopt,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  label = opt::nullopt,
const opt::optional< bool > &  authoritative = opt::nullopt,
std::function< void(NMatchListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Fetch a list of matches active on the server.

Parameters
sessionThe session of the user.
min_sizeThe minimum number of match participants.
max_sizeThe maximum number of match participants.
limitThe number of matches to list.
labelThe label to filter the match list on.
authoritativetrue to include authoritative matches.

◆ listNotifications()

virtual void NClientInterface::listNotifications ( NSessionPtr  session,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cacheableCursor = opt::nullopt,
std::function< void(NNotificationListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ listStorageObjects()

virtual void NClientInterface::listStorageObjects ( NSessionPtr  session,
const std::string &  collection,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cursor = opt::nullopt,
std::function< void(NStorageObjectListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.
cursorA cursor to paginate over the collection.

◆ listTournamentRecords()

virtual void NClientInterface::listTournamentRecords ( NSessionPtr  session,
const std::string &  tournamentId,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cursor = opt::nullopt,
const std::vector< std::string > &  ownerIds = {},
std::function< void(NTournamentRecordListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List tournament records from a given tournament.

Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament to list for.
limitMax number of records to return. Between 1 and 100.
cursorA next or previous page cursor.
ownerIdsOne or more owners to retrieve records for.

◆ listTournamentRecordsAroundOwner()

virtual void NClientInterface::listTournamentRecordsAroundOwner ( NSessionPtr  session,
const std::string &  tournamentId,
const std::string &  ownerId,
const opt::optional< int32_t > &  limit = opt::nullopt,
std::function< void(NTournamentRecordListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List tournament records from a given tournament around the owner.

Parameters
sessionThe session of the user.
tournamentIdThe ID of the tournament to list for.
ownerIdThe owner to retrieve records around.
limitMax number of records to return. Between 1 and 100.

◆ listTournaments()

virtual void NClientInterface::listTournaments ( NSessionPtr  session,
const opt::optional< uint32_t > &  categoryStart = opt::nullopt,
const opt::optional< uint32_t > &  categoryEnd = opt::nullopt,
const opt::optional< uint32_t > &  startTime = opt::nullopt,
const opt::optional< uint32_t > &  endTime = opt::nullopt,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cursor = opt::nullopt,
std::function< void(NTournamentListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List active/upcoming tournaments based on given filters.

Parameters
sessionThe session of the user.
categoryStartThe start of the categories to include. Defaults to 0.
categoryEndThe end of the categories to include. Defaults to 128.
startTimeThe start time for tournaments. Defaults to current Unix time.
endTimeThe end time for tournaments. Defaults to +1 year from current Unix time.
limitMax number of records to return. Between 1 and 100.
cursorA next page cursor for listings.

◆ listUserGroups() [1/2]

virtual void NClientInterface::listUserGroups ( NSessionPtr  session,
const opt::optional< int32_t > &  limit,
const opt::optional< NFriend::State > &  state,
const std::string &  cursor = "",
std::function< void(NUserGroupListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List of groups the current user is a member of.

Parameters
sessionThe session of the user.
limitThe max number of records to return. Between 1 and 100.
stateThe friend state to list.
cursorAn optional next page cursor.

◆ listUserGroups() [2/2]

virtual void NClientInterface::listUserGroups ( NSessionPtr  session,
const std::string &  userId,
const opt::optional< int32_t > &  limit,
const opt::optional< NFriend::State > &  state,
const std::string &  cursor = "",
std::function< void(NUserGroupListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

List groups a user is a member of.

Parameters
sessionThe session of the user.
userIdThe id of the user whose groups to list.
limitThe max number of records to return. Between 1 and 100.
stateThe friend state to list.
cursorAn optional next page cursor.

◆ listUsersStorageObjects()

virtual void NClientInterface::listUsersStorageObjects ( NSessionPtr  session,
const std::string &  collection,
const std::string &  userId,
const opt::optional< int32_t > &  limit = opt::nullopt,
const opt::optional< std::string > &  cursor = opt::nullopt,
std::function< void(NStorageObjectListPtr)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ promoteGroupUsers()

virtual void NClientInterface::promoteGroupUsers ( NSessionPtr  session,
const std::string &  groupId,
const std::vector< std::string > &  ids,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Promote a set of users in a group to the next role up.

Parameters
sessionThe session of the user.
groupIdThe group ID to promote in.
idsThe ids of the users to promote.

◆ readStorageObjects()

virtual void NClientInterface::readStorageObjects ( NSessionPtr  session,
const std::vector< NReadStorageObjectId > &  objectIds,
std::function< void(const NStorageObjects &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Read one or more objects from the storage engine.

Parameters
sessionThe session of the user.
objectIdsThe objects to read.

◆ rpc() [1/2]

virtual void NClientInterface::rpc ( const std::string &  http_key,
const std::string &  id,
const opt::optional< std::string > &  payload = opt::nullopt,
std::function< void(const NRpc &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Execute a Lua function with an input payload on the server.

Parameters
http_keyThe server's runtime HTTP key.
idThe id of the function to execute on the server.
payloadThe payload to send with the function call.

◆ rpc() [2/2]

virtual void NClientInterface::rpc ( NSessionPtr  session,
const std::string &  id,
const opt::optional< std::string > &  payload = opt::nullopt,
std::function< void(const NRpc &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Execute a Lua 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.

◆ setErrorCallback()

virtual void NClientInterface::setErrorCallback ( ErrorCallback  errorCallback)
pure virtual

Set default error callback.

Will be called if a request fails and no error callback was set for the request.

Parameters
errorCallbackThe error callback.

◆ setUserData()

virtual void NClientInterface::setUserData ( void *  userData)
pure virtual

Set user data.

Client just holds this data so you can receive it later when you need it.

Parameters
userDataThe user data.

◆ tick()

virtual void NClientInterface::tick ( )
pure virtual

Pumps requests queue in your thread. Call it periodically, each 50 ms is ok.

◆ unlinkApple()

virtual void NClientInterface::unlinkApple ( NSessionPtr  session,
const std::string &  token,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
tokenAn Apple authentication token.

◆ unlinkCustom()

virtual void NClientInterface::unlinkCustom ( NSessionPtr  session,
const std::string &  id,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ unlinkDevice()

virtual void NClientInterface::unlinkDevice ( NSessionPtr  session,
const std::string &  id,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ unlinkEmail()

virtual void NClientInterface::unlinkEmail ( NSessionPtr  session,
const std::string &  email,
const std::string &  password,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ unlinkFacebook()

virtual void NClientInterface::unlinkFacebook ( NSessionPtr  session,
const std::string &  accessToken,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
accessTokenAn OAuth access token from the Facebook SDK.

◆ unlinkGameCenter()

virtual void NClientInterface::unlinkGameCenter ( NSessionPtr  session,
const std::string &  playerId,
const std::string &  bundleId,
NTimestamp  timestampSeconds,
const std::string &  salt,
const std::string &  signature,
const std::string &  publicKeyUrl,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
playerIdThe player id of the user in Game Center.
bundleIdThe bundle id of the Game Center application.
timestampSecondsThe date and time that the signature was created.
saltA random NSString used to compute the hash and keep it randomized.
signatureThe verification signature data generated.
publicKeyUrlThe URL for the public encryption key.

◆ unlinkGoogle()

virtual void NClientInterface::unlinkGoogle ( NSessionPtr  session,
const std::string &  accessToken,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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

Parameters
sessionThe session of the user.
accessTokenAn OAuth access token from the Google SDK.

◆ unlinkSteam()

virtual void NClientInterface::unlinkSteam ( NSessionPtr  session,
const std::string &  token,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ updateAccount()

virtual void NClientInterface::updateAccount ( NSessionPtr  session,
const opt::optional< std::string > &  username = opt::nullopt,
const opt::optional< std::string > &  displayName = opt::nullopt,
const opt::optional< std::string > &  avatarUrl = opt::nullopt,
const opt::optional< std::string > &  langTag = opt::nullopt,
const opt::optional< std::string > &  location = opt::nullopt,
const opt::optional< std::string > &  timezone = opt::nullopt,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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.

◆ updateGroup()

virtual void NClientInterface::updateGroup ( NSessionPtr  session,
const std::string &  groupId,
const opt::optional< std::string > &  name = opt::nullopt,
const opt::optional< std::string > &  description = opt::nullopt,
const opt::optional< std::string > &  avatarUrl = opt::nullopt,
const opt::optional< std::string > &  langTag = opt::nullopt,
const opt::optional< bool > &  open = opt::nullopt,
std::function< void()>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Update a group.

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

Parameters
sessionThe session of the user.
groupIdThe id of the group to update.
nameA new name for the group.
descriptionA new description for the group.
avatarUrlA new avatar url for the group.
langTagA new language tag in BCP-47 format for the group.
openTrue if the group should have open membership.

◆ writeLeaderboardRecord()

virtual void NClientInterface::writeLeaderboardRecord ( NSessionPtr  session,
const std::string &  leaderboardId,
int64_t  score,
const opt::optional< int64_t > &  subscore = opt::nullopt,
const opt::optional< std::string > &  metadata = opt::nullopt,
std::function< void(NLeaderboardRecord)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

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 subscore for the leaderboard record.
metadataThe metadata for the leaderboard record.

◆ writeStorageObjects()

virtual void NClientInterface::writeStorageObjects ( NSessionPtr  session,
const std::vector< NStorageObjectWrite > &  objects,
std::function< void(const NStorageObjectAcks &)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

Write objects to the storage engine.

Parameters
sessionThe session of the user.
objectsThe objects to write.

◆ writeTournamentRecord()

virtual void NClientInterface::writeTournamentRecord ( NSessionPtr  session,
const std::string &  tournamentId,
int64_t  score,
const opt::optional< int64_t > &  subscore = opt::nullopt,
const opt::optional< std::string > &  metadata = opt::nullopt,
std::function< void(NLeaderboardRecord)>  successCallback = nullptr,
ErrorCallback  errorCallback = nullptr 
)
pure virtual

A request to submit a score to a tournament.

Parameters
sessionThe session for the user.
tournamentIdThe tournament ID to write the record for.
scoreThe score value to submit.
subscoreAn optional secondary value.
metadataA JSON object of additional properties.

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