NakamaRestApiClient class

Base class for communicating with Nakama via gRPC. NakamaGrpcClient abstracts the gRPC calls and handles authentication for you.

Inheritance

Constructors

NakamaRestApiClient.init({String? host, String? serverKey, String key = _kDefaultAppKey, int port = 7350, bool ssl = false})
Either inits and returns a new instance of NakamaRestApiClient or returns a already initialized one.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverKey String
The key used to authenticate with the server without a session. Defaults to "defaultkey".
latefinal

Methods

authenticateCustom({required String id, bool create = true, String? username, Map<String, String>? vars}) Future<Session>
override
authenticateDevice({required String deviceId, bool create = true, String? username, Map<String, String>? vars}) Future<Session>
override
authenticateEmail({required String email, required String password, bool create = true, String? username, Map<String, String>? vars}) Future<Session>
override
authenticateFacebook({required String token, bool create = true, String? username, Map<String, String>? vars, bool import = false}) Future<Session>
override
authenticateGameCenter({required String playerId, required String bundleId, required int timestampSeconds, required String salt, required String signature, required String publicKeyUrl, bool create = true, String? username, Map<String, String>? vars}) Future<Session>
override
authenticateGoogle({required String token, bool create = true, String? username, Map<String, String>? vars}) Future<Session>
override
authenticateSteam({required String token, bool create = true, String? username, Map<String, String>? vars}) Future<Session>
override
getAccount(Session session) Future<Account>
override
getUsers({required Session session, List<String>? facebookIds, List<String>? ids, List<String>? usernames}) Future<Users>
override
listChannelMessages({required Session session, required String channelId, int limit = 20, bool? forward, String? cursor}) Future<ChannelMessageList?>
override
listLeaderboardRecords({required Session session, required String leaderboardId, List<String>? ownerIds, int limit = 20, String? cursor, String? expiry}) Future<LeaderboardRecordList>
override
listLeaderboardRecordsAroundOwner({required Session session, required String leaderboardId, String? ownerId, int limit = 20, String? expiry}) Future<LeaderboardRecordList>
override
listStorageObjects({required Session session, String? collection, String? cursor, String? userId, int? limit}) Future<StorageObjectList>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readStorageObject({required Session session, String? collection, String? key, String? userId}) Future<StorageObject>
override
rpc({required Session session, required String id, String? payload}) Future<Rpc>
override
sessionRefresh({required Session session, Map<String, String>? vars}) Future<Session>
override
toString() String
A string representation of this object.
inherited
updateAccount({required Session session, String? username, String? displayName, String? avatarUrl, String? langTag, String? location, String? timezone}) Future<void>
override
writeLeaderboardRecord({required Session session, required String leaderboardId, int? score, int? subscore, String? metadata}) Future<LeaderboardRecord>
override
writeStorageObject({required Session session, String? collection, String? key, String? value, String? version, StorageWritePermission? writePermission, StorageReadPermission? readPermission}) Future<void>
override

Operators

operator ==(Object other) bool
The equality operator.
inherited