### Start the server and database with Docker Compose Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md__r_e_a_d_m_e.html Starts the server and database using the Docker Compose file described in the documentation. Required before running integration tests. ```bash docker-compose -f ./docker-compose-postgres.yml up ``` -------------------------------- ### Install Doxygen with Homebrew Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md__r_e_a_d_m_e.html Installs Doxygen, which is used to generate the nakama-dotnet API docs. ```bash brew install doxygen ``` -------------------------------- ### GetExperimentsAsync Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/interface_satori_1_1_i_client.tex Gets all experiments data. ```APIDOC ## GetExperimentsAsync ### Description Gets all experiments data. ### Method GetExperimentsAsync ### Parameters - **session** (ISession) - Required - The session to use. - **names** (IEnumerable) - Required - The names of the experiments to retrieve. - **cancellationToken** (CancellationToken?) - Optional - A token to cancel the operation. ### Returns Task - The list of experiments. ``` -------------------------------- ### Generate API Documentation Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/index.tex Installs Doxygen and generates the API documentation. ```bash brew install doxygen cd docs/ doxygen ``` -------------------------------- ### string Nakama.IApiTournament.Title { get; } Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_tournament.html Gets the title for the tournament. ```APIDOC ## Property: Title ### Description Gets the title for the tournament. ### Interface IApiTournament ### Property Signature ```csharp string Title { get; } ``` ### Access Read-only (get) ### Returns - **string** - The title of the tournament. ``` -------------------------------- ### Create a Satori Client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/README.md Initializes a Satori client with the scheme, host, port, and API key provided to you as a Satori customer. Replace the placeholder host and apiKey with your actual values. ```csharp using Satori; const string scheme = "https"; const string host = "127.0.0.1"; // add your host here const int port = 443; const string apiKey = "apiKey"; // add the api key that was given to you as a Satori customer. var client = new Client(scheme, host, port, apiKey); ``` -------------------------------- ### IPartyJoinRequest.PartyId Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_party_join_request.html Gets the ID of the party to get a list of join requests for. ```APIDOC ## Property: PartyId ### Description Gets the ID of the party to get a list of join requests for. ### Signature ```csharp string PartyId { get; } ``` ### Property Value - **Type**: string - **Access**: get ### Remarks This property is part of the IPartyJoinRequest interface, which represents an incoming notification for one or more new presences attempting to join the party. ``` -------------------------------- ### Client() [2/6] Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_client.html Initializes a new instance of the Client class with a server key and a custom HTTP adapter. ```APIDOC ## Client(string serverKey, IHttpAdapter adapter) ### Description Initializes a new instance of the Client class with a server key and a custom HTTP adapter. ### Constructor `Nakama.Client.Client(string serverKey, IHttpAdapter adapter)` ### Parameters - **serverKey** (string) - Required - The server key used for authentication. - **adapter** (IHttpAdapter) - Required - The HTTP adapter to use for network requests. ``` -------------------------------- ### Client(Uri _uri, string _serverKey) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_client.html Initializes a new instance of the Client class with the specified URI and server key. ```APIDOC ## Client(Uri _uri, string _serverKey) ### Description Initializes a new instance of the Client class with the specified URI and server key. ### Method Constructor ### Parameters - **uri** (Uri) - Required - The URI of the Nakama server. - **serverKey** (string) - Required - The server key used for authentication. ### Returns A new instance of the Client class. ``` -------------------------------- ### Create a Nakama client with connection credentials Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/README.md Use this snippet to instantiate a Client object for connecting to a Nakama server. Requires the server and database to be set up first, typically via Docker. The example uses scheme 'http', host '127.0.0.1', port 7350, and server key 'defaultkey'. ```csharp // using Nakama; const string scheme = "http"; const string host = "127.0.0.1"; const int port = 7350; const string serverKey = "defaultkey"; var client = new Client(scheme, host, port, serverKey); ``` -------------------------------- ### Client() [4/6] Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_client.html Initializes a new instance of the Client class with scheme, host, port, server key, adapter, and auto-refresh session flag. ```APIDOC ## Client(string scheme, string host, int port, string serverKey, IHttpAdapter adapter, bool autoRefreshSession = true) ### Description Initializes a new instance of the Client class with scheme, host, port, server key, adapter, and auto-refresh session flag. ### Constructor `Nakama.Client.Client(string scheme, string host, int port, string serverKey, IHttpAdapter adapter, bool autoRefreshSession = true)` ### Parameters - **scheme** (string) - Required - The URI scheme (e.g., http or https). - **host** (string) - Required - The hostname of the Nakama server. - **port** (int) - Required - The port number of the Nakama server. - **serverKey** (string) - Required - The server key used for authentication. - **adapter** (IHttpAdapter) - Required - The HTTP adapter to use for network requests. - **autoRefreshSession** (bool) - Optional - Whether to automatically refresh the session when it expires. Default is true. ``` -------------------------------- ### Satori.IApiSession.Token Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_session.html Gets the token credential. ```APIDOC ## Property: Token ### Description Gets the token credential. ### Interface Satori.IApiSession ### Property Signature string Token { get; } ### Return Type string ### Remarks This property is read-only (get accessor only). ``` -------------------------------- ### Satori.IApiSession.RefreshToken Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_session.html Gets the refresh token. ```APIDOC ## Property: RefreshToken ### Description Gets the refresh token. ### Interface Satori.IApiSession ### Property Signature string RefreshToken { get; } ### Return Type string ### Remarks This property is read-only (get accessor only). ``` -------------------------------- ### Generate Satori API client with go run main.go Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md_codegen__r_e_a_d_m_e.html Run this command to generate the Satori API client from the Satori Swagger spec. Outputs to ../Satori/ApiClient.gen.cs. Requires the SATORI environment variable to point to the Satori source. ```bash go run main.go "${SATORI}/api/satori.swagger.json" "Satori" > ../Satori/ApiClient.gen.cs ``` -------------------------------- ### Client(string scheme, string host, int port, string apiKey) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_satori_1_1_client.html Constructor for the Satori.Client class. Initializes a new client with the specified scheme, host, port, and API key. ```APIDOC ## Client(scheme, host, port, apiKey) ### Description Initializes a new Satori client with the given connection parameters. ### Method Constructor ### Parameters - **scheme** (string) - Required - The URI scheme (e.g., http or https). - **host** (string) - Required - The hostname of the server. - **port** (int) - Required - The port number. - **apiKey** (string) - Required - The API key for authentication. ### Request Example ```csharp var client = new Satori.Client("https", "example.com", 443, "my-api-key"); ``` ``` -------------------------------- ### Satori.IApiExperiment.Name Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_experiment.html Gets the experiment name. ```APIDOC ## Property: Name ### Description Gets the experiment name. ### Signature `string Satori.IApiExperiment.Name { get; }` ### Property Type - **string** - The name of the experiment. ### Access - **get** - Read-only property. ``` -------------------------------- ### IApiValidatedSubscription.Store Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_validated_subscription.html Gets the store identifier. ```APIDOC ## Property: Store ### Description Gets the store identifier. ### Interface IApiValidatedSubscription ### Property Signature ApiStoreProvider Store { get; } ### Property Type ApiStoreProvider ### Access Read-only (get) ### Remarks This property is part of the IApiValidatedSubscription interface in the Nakama .NET client. ``` -------------------------------- ### Generate Satori Console API client with go run main.go Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md_codegen__r_e_a_d_m_e.html Run this command to generate the Satori Console client from the console Swagger spec. Outputs to ../Satori/ConsoleClient.gen.cs. ```bash go run main.go "${SATORI}/console/console.swagger.json" "Satori" > ../Satori/ConsoleClient.gen.cs ``` -------------------------------- ### GetMessageListAsync Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_satori_1_1_client.html Gets all the messages for an identity. ```APIDOC ## GetMessageListAsync ### Description Get all the messages for an identity. ### Method Async Task ### Signature `async Task GetMessageListAsync(ISession session, int limit = 1, bool forward = true, string cursor = null, CancellationToken? cancellationToken = default, RetryConfiguration retryConfiguration = null)` ### Parameters - **session** (ISession) - Required - The session of the user. - **limit** (int) - Optional - Max number of messages to return. Between 1 and 100. - **forward** (bool) - Optional - True if listing should be older messages to newer, false if reverse. - **cursor** (string) - Optional - A pagination cursor, if any. - **cancellationToken** (CancellationToken?) - Optional - The CancellationToken that can be used to cancel the request while mid-flight. - **retryConfiguration** (RetryConfiguration) - Optional - The retry configuration. See RetryConfiguration. ### Returns A task object which resolves to a list of messages. ``` -------------------------------- ### IApiReadStorageObjectId Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/namespace_nakama.tex Represents storage objects to get. ```APIDOC ## IApiReadStorageObjectId ### Description Represents storage objects to get. ### Usage Use this interface when specifying storage objects to read. ``` -------------------------------- ### Client() Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/class_nakama_1_1_client.tex Constructor for the Nakama.Client class. Initializes a new client with the specified server key. ```APIDOC ## Client() ### Description Constructor for the Nakama.Client class. Initializes a new client with the specified server key. ### Method Constructor ### Signature `Nakama.Client(string serverKey)` ### Parameters - **serverKey** (string) - Required - The key used to authenticate with the server without a session. ### Remarks 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. ``` -------------------------------- ### Build Satori .NET client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/RELEASEINST.md Builds the Satori project in Release configuration. ```shell dotnet build -c Release ./Satori/Satori.csproj ``` -------------------------------- ### Satori.IApiSession.Properties Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_session.html Gets the properties associated with this identity. ```APIDOC ## Property: Properties ### Description Gets the properties associated with this identity. ### Interface Satori.IApiSession ### Property Signature IApiProperties Properties { get; } ### Return Type IApiProperties ### Remarks This property is read-only (get accessor only). ``` -------------------------------- ### Client Constructor Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_client-members.html Initializes a new instance of the Client class. ```APIDOC ## Client Constructor ### Description Initializes a new instance of the Client class. ### Method Client ### Signature `Client(string serverKey)` ### Parameters - **serverKey** (string) - Required - The server key for the Nakama server. ``` -------------------------------- ### Satori.IApiExperiment.Value Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_experiment.html Gets the value associated with this experiment. ```APIDOC ## Property: Value ### Description Gets the value associated with this experiment. ### Signature `string Satori.IApiExperiment.Value { get; }` ### Property Type - **string** - The value associated with the experiment. ### Access - **get** - Read-only property. ``` -------------------------------- ### IApiValidatedSubscription.UserId Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_validated_subscription.html Gets the subscription user ID. ```APIDOC ## Property: UserId ### Description Gets the subscription user ID. ### Interface IApiValidatedSubscription ### Property Signature string UserId { get; } ### Property Type string ### Access Read-only (get) ### Remarks This property is part of the IApiValidatedSubscription interface in the Nakama .NET client. ``` -------------------------------- ### Package and push to NuGet Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md__r_e_l_e_a_s_e_i_n_s_t.html Packs the project with specified assembly and package versions, then pushes the resulting .nupkg to NuGet. Do not use a 'v' prefix before the version number. ```bash dotnet pack -p:AssemblyVersion= -p:PackageVersion= -c Release ./Nakama/Nakama.csproj dotnet nuget push ./Nakama/bin/Release/NakamaClient..nupkg -k "somekey" -s https://api.nuget.org/v3/index.json ``` -------------------------------- ### IApiStorageObjects.Objects Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_storage_objects.html Gets the batch of storage objects. ```APIDOC ## Property: Objects ### Description Gets the batch of storage objects. ### Property Signature `IEnumerable Objects { get; }` ### Type `IEnumerable` ### Access Read-only (getter only) ### Remarks This property is part of the `IApiStorageObjects` interface, which represents a batch of storage objects. ``` -------------------------------- ### Generate Nakama Console API client with go run main.go Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md_codegen__r_e_a_d_m_e.html Run this command to generate the Nakama Console client from the console Swagger spec. Outputs to ../Nakama/Console/ConsoleClient.gen.cs. ```bash go run main.go "$GOPATH/src/github.com/heroiclabs/nakama/console/console.swagger.json" "NakamaConsole" > ../Nakama/Console/ConsoleClient.gen.cs ``` -------------------------------- ### IApiFriendList.Friends Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_friend_list.html Gets the collection of friend objects. ```APIDOC ## Property: Friends ### Description Gets the Friend objects. ### Signature ```csharp IEnumerable Nakama.IApiFriendList.Friends { get; } ``` ### Type - **IEnumerable** - A collection of friend objects. ``` -------------------------------- ### Length Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_ninja_1_1_web_sockets_1_1_buffer_pool_1_1_public_buffer_memory_stream-members.html Gets the length in bytes of the stream. ```APIDOC ## Property ### Description Gets the length in bytes of the stream. ### Signature `Length` ### Type - **long** ``` -------------------------------- ### Build and Pack for Release Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/index.tex Builds the project in Release mode and packages it for NuGet. ```bash dotnet build -c Release /p:AssemblyVersion=2.0.0.0 Nakama/Nakama.csproj // For Nuget packaging dotnet pack -p:AssemblyVersion=2.0.0.0 -p:PackageVersion=2.0.0 -c Release Nakama/Nakama.csproj ``` -------------------------------- ### Client(Uri _uri, string _serverKey, IHttpAdapter _adapter, bool _autoRefreshSession = true) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_client.html Initializes a new instance of the Client class with the specified URI, server key, HTTP adapter, and auto-refresh session option. ```APIDOC ## Client(Uri _uri, string _serverKey, IHttpAdapter _adapter, bool _autoRefreshSession = true) ### Description Initializes a new instance of the Client class with the specified URI, server key, HTTP adapter, and auto-refresh session option. ### Method Constructor ### Parameters - **uri** (Uri) - Required - The URI of the Nakama server. - **serverKey** (string) - Required - The server key used for authentication. - **adapter** (IHttpAdapter) - Required - The HTTP adapter used for network communication. - **autoRefreshSession** (bool) - Optional - Whether to automatically refresh the session. Default is true. ### Returns A new instance of the Client class. ``` -------------------------------- ### ISession.UserId Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/interface_nakama_1_1_i_session.tex Gets the ID of the user who owns this session. ```APIDOC ## UserId ### Description Gets the ID of the user who owns this session. ### Property `string UserId { get; }` ### Returns - **string** - The user ID string. ``` -------------------------------- ### Build Nakama .NET client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/RELEASEINST.md Builds the Nakama project in Release configuration. ```shell dotnet build -c Release ./Nakama/Nakama.csproj ``` -------------------------------- ### Ticket Property Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/interface_nakama_1_1_i_matchmaker_ticket.tex Gets the ticket generated by the matchmaker. ```APIDOC ## Ticket Property ### Description Gets the ticket generated by the matchmaker. ### Property `string Ticket` ### Returns - **string** - The ticket generated by the matchmaker. ``` -------------------------------- ### GetFlagAsync Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/class_satori_1_1_client.tex Gets a single feature flag for this identity. ```APIDOC ## GetFlagAsync ### Description Gets a single feature flag for this identity. ### Method GetFlagAsync ### Signature async Task Satori.Client.GetFlagAsync(ISession session, string name, CancellationToken? cancellationToken = default) ### Parameters - **session** (ISession) - Required - The session of the user. - **name** (string) - Required - The name of the flag. - **cancellationToken** (CancellationToken?) - Optional - The CancellationToken that can be used to cancel the request while mid-flight. ### Returns A task which resolves to a single feature flag. ### Implements Satori.IClient ``` -------------------------------- ### Generate Satori client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/codegen/README.md Run this command to generate a client for the Satori API. ```shell task -v generate-satori ``` -------------------------------- ### Client() [2/2] Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_satori_1_1_client.html Constructor for the Satori.Client class. Initializes a new client with the specified scheme, host, port, API key, HTTP adapter, and auto-refresh session option. ```APIDOC ## Client() [2/2] ### Description Constructor for the Satori.Client class. Initializes a new client with the specified scheme, host, port, API key, HTTP adapter, and auto-refresh session option. ### Method Constructor ### Signature Satori.Client.Client(string scheme, string host, int port, string apiKey, IHttpAdapter adapter, bool autoRefreshSession = true) ### Parameters - **scheme** (string) - Required - The URL scheme (e.g., http or https). - **host** (string) - Required - The hostname of the Satori server. - **port** (int) - Required - The port number of the Satori server. - **apiKey** (string) - Required - The API key used for authentication. - **adapter** (IHttpAdapter) - Required - The HTTP adapter to use for network requests. - **autoRefreshSession** (bool) - Optional - Whether to automatically refresh the session when it expires. Default is true. ``` -------------------------------- ### Nakama.ISession.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_session.html Gets any custom properties associated with this session. ```APIDOC ## Property: Vars ### Description Gets any custom properties associated with this session. ### Property Signature ```csharp IDictionary Vars { get; } ``` ### Property Value - **Type**: IDictionary - **Access**: get ### Remarks Implemented in Nakama.Session. ``` -------------------------------- ### CreatePartyAsync(bool open, bool hidden, int maxSize, string label=null) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_socket.html Create a party on the server. ```APIDOC ## CreatePartyAsync(bool open, bool hidden, int maxSize, string label=null) ### Description Create a party on the server. ### Method Async Task ### Signature `async Task CreatePartyAsync(bool open, bool hidden, int maxSize, string label=null)` ### Parameters - **open** (bool) - Required - Whether the party is open to join requests. - **hidden** (bool) - Required - Whether the party is hidden from discovery. - **maxSize** (int) - Required - The maximum number of party members. - **label** (string) - Optional - A label for the party. Defaults to null. ### Returns A task which resolves to a party object. ``` -------------------------------- ### Nakama.ISession.Username Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_session.html Gets the username of the user who owns this session. ```APIDOC ## Property: Username ### Description Gets the username of the user who owns this session. ### Property Signature ```csharp string Username { get; } ``` ### Property Value - **Type**: string - **Access**: get ### Remarks Implemented in Nakama.Session. ``` -------------------------------- ### Satori.Client Constructors Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_satori_1_1_client-members.html Constructors for initializing the Satori.Client with connection parameters and optional adapter and auto-refresh settings. ```APIDOC ## Satori.Client Constructors ### Description Initializes a new instance of the Satori.Client class with the specified connection parameters. ### Constructors #### Client(string scheme, string host, int port, string apiKey) - **scheme** (string) - Required - The URI scheme (e.g., http or https). - **host** (string) - Required - The hostname or IP address of the server. - **port** (int) - Required - The port number to connect to. - **apiKey** (string) - Required - The API key for authentication. #### Client(string scheme, string host, int port, string apiKey, IHttpAdapter adapter, bool autoRefreshSession = true) - **scheme** (string) - Required - The URI scheme. - **host** (string) - Required - The hostname or IP address. - **port** (int) - Required - The port number. - **apiKey** (string) - Required - The API key. - **adapter** (IHttpAdapter) - Required - The HTTP adapter to use for network requests. - **autoRefreshSession** (bool) - Optional - Whether to automatically refresh the session when it expires. Default is true. ### Example ```csharp var client = new Satori.Client("https", "example.com", 443, "myApiKey"); ``` ``` -------------------------------- ### IPartyJoinRequest.Presences Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_party_join_request.html Gets the presences attempting to join, or who have joined. ```APIDOC ## Property: Presences ### Description Gets the presences attempting to join, or who have joined. ### Signature ```csharp IEnumerable Presences { get; } ``` ### Property Value - **Type**: IEnumerable - **Access**: get ### Remarks This property is part of the IPartyJoinRequest interface, which represents an incoming notification for one or more new presences attempting to join the party. ``` -------------------------------- ### Generate Nakama API client with go run main.go Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md_codegen__r_e_a_d_m_e.html Run this command to generate the Nakama API client from the Swagger spec. It outputs the generated C# code to ../Nakama/ApiClient.gen.cs. Requires the Nakama server source path in $GOPATH. ```bash go run main.go "$GOPATH/src/github.com/heroiclabs/nakama/apigrpc/apigrpc.swagger.json" "Nakama" > ../Nakama/ApiClient.gen.cs ``` -------------------------------- ### IPartyLeader.Presence Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_party_leader.html Gets the presence of the new party leader. ```APIDOC ## Property: Presence ### Description Gets the presence of the new party leader. ### Interface Nakama.IPartyLeader ### Property Signature ```csharp IUserPresence Presence { get; } ``` ### Access Read-only (get) ### Returns - **IUserPresence** - The presence of the new party leader. ``` -------------------------------- ### IApiValidatedSubscription.PurchaseTime Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_validated_subscription.html Gets the UNIX timestamp when the purchase was done. ```APIDOC ## Property: PurchaseTime ### Description Gets the UNIX timestamp when the purchase was done. ### Interface IApiValidatedSubscription ### Property Signature string PurchaseTime { get; } ### Property Type string ### Access Read-only (get) ### Remarks This property is part of the IApiValidatedSubscription interface in the Nakama .NET client. ``` -------------------------------- ### WebSocketServerOptions() Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_ninja_1_1_web_sockets_1_1_web_socket_server_options.html Initialises a new instance of the WebSocketServerOptions class. ```APIDOC ## WebSocketServerOptions() ### Description Initialises a new instance of the WebSocketServerOptions class. ### Method Constructor ### Signature `Nakama.Ninja.WebSockets.WebSocketServerOptions.WebSocketServerOptions()` ``` -------------------------------- ### IApiFriendList.Cursor Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_friend_list.html Gets the cursor for the next page of results, if any. ```APIDOC ## Property: Cursor ### Description Gets the cursor for the next page of results, if any. ### Signature ```csharp string Nakama.IApiFriendList.Cursor { get; } ``` ### Type - **string** - The cursor string for pagination. ``` -------------------------------- ### Run Integration Tests Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/index.tex Starts the required infrastructure via Docker Compose and executes the integration tests. ```bash docker-compose -f ./docker-compose-postgres.yml up dotnet test tests/Nakama.Tests/Nakama.Tests.csproj ``` -------------------------------- ### async Task CreatePartyAsync(bool open, int maxSize) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/class_nakama_1_1_socket.tex Creates a party. ```APIDOC ## async Task CreatePartyAsync(bool open, int maxSize) ### Description Creates a party. ### Method Async Method ### Parameters - **open** (bool) - Required - Whether or not the party will require join requests to be approved by the party leader. - **maxSize** (int) - Required - Maximum number of party members. ### Returns A task to represent the asynchronous operation. ``` -------------------------------- ### StorageObjectId.Version Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_storage_object_id.html Gets or sets the version hash of the object. ```APIDOC ## StorageObjectId.Version ### Description Gets or sets the version hash of the object. ### Property - **Version** (string) - The version hash of the object. ``` -------------------------------- ### Run integration tests with Docker Compose and dotnet test Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/README.md Starts the server and database using Docker Compose, then runs the Nakama integration tests. Most tests are integration tests that execute against the server. ```shell docker-compose -f ./docker-compose-postgres.yml up ``` ```shell dotnet test Nakama.Tests/Nakama.Tests.csproj ``` -------------------------------- ### StorageObjectId.UserId Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_storage_object_id.html Gets or sets the user owner of the object. ```APIDOC ## StorageObjectId.UserId ### Description Gets or sets the user owner of the object. ### Property - **UserId** (string) - The user owner of the object. ``` -------------------------------- ### Generate Satori Console client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/codegen/README.md Run this command to generate a client for the Satori Console API. ```shell task -v generate-satoriconsole ``` -------------------------------- ### StorageObjectId.Collection Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_storage_object_id.html Gets or sets the collection which stores the object. ```APIDOC ## StorageObjectId.Collection ### Description Gets or sets the collection which stores the object. ### Property - **Collection** (string) - The collection which stores the object. ``` -------------------------------- ### IApiReadStorageObjectsRequest Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/namespace_nakama.tex Represents a request to batch get storage objects. ```APIDOC ## IApiReadStorageObjectsRequest ### Description Represents a request to batch get storage objects. ### Usage Use this interface when constructing a request to read multiple storage objects. ``` -------------------------------- ### Package and push Satori to NuGet Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/RELEASEINST.md Packs the Satori project with the specified version and pushes the resulting nupkg to NuGet. ```shell dotnet pack -p:AssemblyVersion= -p:PackageVersion= -c Release ./Satori/Satori.csproj ``` ```shell dotnet nuget push ./Satori/bin/Release/SatoriClient..nupkg -k "somekey" -s https://api.nuget.org/v3/index.json ``` -------------------------------- ### GetFlagAsync (single flag) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/interface_satori_1_1_i_client.tex Gets a single flag for this identity. ```APIDOC ## GetFlagAsync ### Description Gets a single flag for this identity. ### Method GetFlagAsync ### Parameters - **session** (ISession) - Required - The session of the user. - **name** (string) - Required - The name of the flag. - **cancellationToken** (CancellationToken?) - Optional - The Cancellation+Token that can be used to cancel the request while mid-/flight. ### Returns A task which resolves to a single feature flag. ``` -------------------------------- ### Create a release build with dotnet build -c Release Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md__r_e_a_d_m_e.html Builds the Nakama project in Release configuration with a specified assembly version. Use this for release builds. ```bash dotnet build -c Release /p:AssemblyVersion=2.0.0.0 Nakama/Nakama.csproj ``` -------------------------------- ### CreateTime Property Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_session.html Gets the UNIX timestamp when this session was created. ```APIDOC ## CreateTime Property ### Description Gets the UNIX timestamp when this session was created. ### Property - **CreateTime** (long) - The UNIX timestamp when this session was created. ``` -------------------------------- ### Build Satori project with dotnet build Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/README.md Builds the Satori project using the Dotnet CLI. All dependencies are downloaded at build time with Nuget. ```shell dotnet build Satori/Satori.csproj ``` -------------------------------- ### Satori.IHttpAdapter.Logger Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_http_adapter-members.html Gets or sets the logger used by the HTTP adapter. ```APIDOC ## Logger ### Description Gets or sets the logger used by the HTTP adapter. ### Property `Logger` ``` -------------------------------- ### BufferPool() Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_ninja_1_1_web_sockets_1_1_buffer_pool-members.html Initializes a new instance of the BufferPool class with default settings. ```APIDOC ## BufferPool() ### Description Initializes a new instance of the BufferPool class. ### Method Constructor ### Signature `BufferPool()` ### Parameters None ### Returns A new BufferPool instance. ``` -------------------------------- ### From Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/latex/class_nakama_1_1_socket.tex Builds a socket from a client object, inheriting connection settings. ```APIDOC ## From ### Description Build a socket from a client object. ### Method From (static) ### Signature ```csharp static ISocket From(IClient client) ``` ### Parameters - **client** (IClient) - Required - A client object. ### Returns A new socket with the connection settings from the client. ``` -------------------------------- ### Satori.IApiFlagOverride.FlagName Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_flag_override.html Gets the flag name for the feature flag override. ```APIDOC ## Property: FlagName ### Description Gets the flag name for the feature flag override. ### Interface Satori.IApiFlagOverride ### Property Signature string FlagName { get; } ### Access - **get** - Returns the flag name as a string. ### Return Value - **string** - The name of the flag. ``` -------------------------------- ### Satori.IApiAuthenticateRefreshRequest.RefreshToken Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_satori_1_1_i_api_authenticate_refresh_request.html Gets the refresh token used to authenticate against the server. ```APIDOC ## Property: RefreshToken ### Description Gets the refresh token used to authenticate against the server. ### Interface Satori.IApiAuthenticateRefreshRequest ### Property Signature string RefreshToken { get; } ### Type string ### Access Read-only (get) ### Remarks This property is part of the request used to authenticate against the server with a refresh token. ``` -------------------------------- ### Generate Nakama client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/codegen/README.md Run this command to generate a client for the Nakama server API. ```shell task -v generate-nakama ``` -------------------------------- ### Client(string scheme, string host, int port, string apiKey, IHttpAdapter adapter, bool autoRefreshSession=true) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_satori_1_1_client.html Constructor for the Satori.Client class with additional configuration for HTTP adapter and session auto-refresh. ```APIDOC ## Client(scheme, host, port, apiKey, adapter, autoRefreshSession) ### Description Initializes a new Satori client with custom HTTP adapter and session auto-refresh option. ### Method Constructor ### Parameters - **scheme** (string) - Required - The URI scheme (e.g., http or https). - **host** (string) - Required - The hostname of the server. - **port** (int) - Required - The port number. - **apiKey** (string) - Required - The API key for authentication. - **adapter** (IHttpAdapter) - Required - The HTTP adapter to use for network requests. - **autoRefreshSession** (bool) - Optional - Whether to automatically refresh the session when it expires. Default is true. ### Request Example ```csharp var adapter = new UnityWebRequestAdapter(); var client = new Satori.Client("https", "example.com", 443, "my-api-key", adapter, true); ``` ``` -------------------------------- ### IProtobufAny.type Property Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_protobuf_any.html Gets the protobuf type string for the Any message. ```APIDOC ## Property: type ### Description Gets the protobuf type string for the Any message. ### Interface Nakama.IProtobufAny ### Property Signature `string Nakama.IProtobufAny.type { get; }` ### Access - **get** - Returns the type string. ### Return Value - **string** - The protobuf type string. ### Remarks This property is part of the IProtobufAny interface in the Nakama .NET client. ``` -------------------------------- ### WebSocketServerOptions Constructor Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_ninja_1_1_web_sockets_1_1_web_socket_server_options.html Initialises a new instance of the WebSocketServerOptions class. ```APIDOC ## WebSocketServerOptions() ### Description Initialises a new instance of the WebSocketServerOptions class. ### Method Constructor ### Parameters None ### Returns A new WebSocketServerOptions instance. ``` -------------------------------- ### IPartyLeader.PartyId Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_party_leader.html Gets the ID of the party to announce the new leader for. ```APIDOC ## Property: PartyId ### Description Gets the ID of the party to announce the new leader for. ### Interface Nakama.IPartyLeader ### Property Signature ```csharp string PartyId { get; } ``` ### Access Read-only (get) ### Returns - **string** - The ID of the party. ``` -------------------------------- ### ConnectAsync(ISession session, bool appearOnline=false, int connectTimeoutSec=DefaultConnectTimeout, string langTag="en") Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_socket.html Connect to the server. ```APIDOC ## ConnectAsync(ISession session, bool appearOnline=false, int connectTimeoutSec=DefaultConnectTimeout, string langTag="en") ### Description Connect to the server. ### Method Async Task ### Signature `Task ConnectAsync(ISession session, bool appearOnline=false, int connectTimeoutSec=DefaultConnectTimeout, string langTag="en")` ### Parameters - **session** (ISession) - Required - The session of the user. - **appearOnline** (bool) - Optional - If the user who appear online to other users. Defaults to false. - **connectTimeoutSec** (int) - Optional - The time allowed for the socket connection to be established. Defaults to DefaultConnectTimeout. - **langTag** (string) - Optional - The language tag of the user on the connected socket. Defaults to "en". ### Returns A task to represent the asynchronous operation. ``` -------------------------------- ### Nakama.IMatchmakerTicket.Ticket Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_matchmaker_ticket.html Gets the ticket generated by the matchmaker. This property is read-only. ```APIDOC ## Property: Ticket ### Description Gets the ticket generated by the matchmaker. ### Signature ```csharp string Nakama.IMatchmakerTicket.Ticket { get; } ``` ### Property Value - **Ticket** (string) - The ticket generated by the matchmaker. ### Access - **get** - Read-only. ``` -------------------------------- ### Build Nakama project with dotnet build Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/README.md Builds the Nakama project using the Dotnet CLI. All dependencies are downloaded at build time with Nuget. ```shell dotnet build Nakama/Nakama.csproj ``` -------------------------------- ### IApiAccountSteam.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_account_steam.html Gets extra information that will be bundled in the session token. ```APIDOC ## Property: Vars ### Description Gets extra information that will be bundled in the session token. ### Signature `IDictionary Nakama.IApiAccountSteam.Vars { get; }` ### Type IDictionary ### Access Read-only (get) ``` -------------------------------- ### CreateMatchAsync(string name=null) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_socket.html Create a multiplayer match on the server. ```APIDOC ## CreateMatchAsync(string name=null) ### Description Create a multiplayer match on the server. ### Method Async Task ### Signature `async Task CreateMatchAsync(string name=null)` ### Parameters - **name** (string) - Optional - The name of the match. Defaults to null. ### Returns A task to represent the asynchronous operation. ``` -------------------------------- ### IApiAccountFacebook.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_account_facebook.html Gets extra information that will be bundled in the session token. ```APIDOC ## Property: Vars ### Description Gets extra information that will be bundled in the session token. ### Signature ```csharp IDictionary Vars { get; } ``` ### Type - **IDictionary** - A dictionary of extra information to be bundled in the session token. ### Access - **get** - Read-only property. ``` -------------------------------- ### ConnectAsync(Uri uri, CancellationToken token = default(CancellationToken)) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_ninja_1_1_web_sockets_1_1_web_socket_client_factory.html Connect with default options. ```APIDOC ## ConnectAsync(Uri uri, CancellationToken token = default(CancellationToken)) ### Description Connect with default options. ### Method Async Task ### Signature `async Task ConnectAsync(Uri uri, CancellationToken token = default(CancellationToken))` ### Parameters - **uri** (Uri) - Required - The URI to connect to. - **token** (CancellationToken) - Optional - A cancellation token to cancel the operation. Default is default(CancellationToken). ### Returns A Task that resolves to a WebSocket instance. ``` -------------------------------- ### IApiAccountGoogle.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_account_google.html Gets extra information that will be bundled in the session token. ```APIDOC ## Property: Vars ### Description Gets extra information that will be bundled in the session token. ### Signature `IDictionary Nakama.IApiAccountGoogle.Vars { get; }` ### Type IDictionary ### Access Read-only (get) ``` -------------------------------- ### Get Account Details Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/README.md Fetches the account for the current session and prints the user ID, username, and wallet. ```csharp var account = await client.GetAccountAsync(session); System.Console.WriteLine(account.User.Id); System.Console.WriteLine(account.User.Username); System.Console.WriteLine(account.Wallet); ``` -------------------------------- ### IApiAccountApple.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_account_apple.html Gets extra information that will be bundled in the session token. ```APIDOC ## Property: Vars ### Description Gets extra information that will be bundled in the session token. ### Interface IApiAccountApple ### Property Signature `IDictionary Vars { get; }` ### Type IDictionary ### Access Read-only (get) ### Remarks This property allows additional key-value pairs to be included in the session token. ``` -------------------------------- ### WithGzip(bool decompression=false, bool compression=false) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_http_request_adapter.html Static method that returns a new HTTP adapter with configuration for gzip support in the underlying HTTP client. ```APIDOC ## WithGzip(bool decompression=false, bool compression=false) ### Description Static method that returns a new HTTP adapter with configuration for gzip support in the underlying HTTP client. ### Method Static ### Parameters - **decompression** (bool) - Optional - Whether to enable gzip decompression. Default is false. - **compression** (bool) - Optional - Whether to enable gzip compression. Default is false. ### Returns - **IHttpAdapter** - A new HTTP adapter with gzip support configured. ``` -------------------------------- ### IApiAccountApple.Token Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_account_apple.html Gets the ID token received from Apple to validate. ```APIDOC ## Property: Token ### Description Gets the ID token received from Apple to validate. ### Interface IApiAccountApple ### Property Signature `string Token { get; }` ### Type string ### Access Read-only (get) ### Remarks This token is used with authenticate/link/unlink operations. ``` -------------------------------- ### AddMatchmakerAsync(string query="*", int minCount=2, int maxCount=8, Dictionary stringProperties=null, Dictionary numericProperties=null, int? countMultiple=null) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_socket.html Join the matchmaker pool and search for opponents on the server. ```APIDOC ## AddMatchmakerAsync(string query="*", int minCount=2, int maxCount=8, Dictionary stringProperties=null, Dictionary numericProperties=null, int? countMultiple=null) ### Description Join the matchmaker pool and search for opponents on the server. ### Method Async Task ### Signature `async Task AddMatchmakerAsync(string query="*", int minCount=2, int maxCount=8, Dictionary stringProperties=null, Dictionary numericProperties=null, int? countMultiple=null)` ### Parameters - **query** (string) - Optional - The matchmaker query to search for opponents. Defaults to "*". - **minCount** (int) - Optional - The minimum number of players to compete against in a match. Defaults to 2. - **maxCount** (int) - Optional - The maximum number of players to compete against in a match. Defaults to 8. - **stringProperties** (Dictionary) - Optional - A set of key/value properties to provide to searches. - **numericProperties** (Dictionary) - Optional - A set of key/value numeric properties to provide to searches. - **countMultiple** (int?) - Optional - An optional integer to force the matchmaker to match in multiples of. ### Returns A task which resolves to a matchmaker ticket object. ``` -------------------------------- ### IApiAccountFacebookInstantGame.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_i_api_account_facebook_instant_game.html Gets extra information that will be bundled in the session token. ```APIDOC ## Property: Vars ### Description Gets extra information that will be bundled in the session token. ### Type IDictionary ### Access Read-only (get) ### Interface Nakama.IApiAccountFacebookInstantGame ### Remarks This property is used with authenticate/link/unlink operations. ``` -------------------------------- ### INakamaconsoleAccount.DisableTime Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_console_1_1_i_nakamaconsole_account.html Gets the UNIX time when the account was disabled as a string. ```APIDOC ## Property: DisableTime ### Description Gets the UNIX time when the account was disabled. ### Type string ### Access Read-only (get) ### Example ```csharp INakamaconsoleAccount account = ...; string disableTime = account.DisableTime; ``` ``` -------------------------------- ### Generate API docs with Doxygen Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/md__r_e_a_d_m_e.html Changes to the docs directory and runs Doxygen to generate the API documentation. Commit the changes in docs/* after rerunning. ```bash cd docs/ doxygen ``` -------------------------------- ### CreatePartyAsync(bool open, bool hidden, int maxSize, string label = null) Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/class_nakama_1_1_socket.html Creates a party with specified settings. This method is asynchronous and returns a task that resolves to an IParty object. ```APIDOC ## CreatePartyAsync(bool open, bool hidden, int maxSize, string label = null) ### Description Creates a party with specified settings. This method is asynchronous and returns a task that resolves to an IParty object. ### Method CreatePartyAsync ### Signature async Task CreatePartyAsync(bool open, bool hidden, int maxSize, string label = null) ### Parameters - **open** (bool) - Required - Whether the party will require join requests to be approved by the party leader. - **hidden** (bool) - Required - Whether the party should be hidden from client listing. - **maxSize** (int) - Required - Maximum number of party members. - **label** (string) - Optional - An optional label to set for party listing. Defaults to null. ### Returns A task to represent the asynchronous operation. The task resolves to an IParty object. ### Implements Nakama.ISocket ``` -------------------------------- ### IConsoleStorageList.TotalCount Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_console_1_1_i_console_storage_list.html Gets the approximate total number of storage objects. ```APIDOC ## Property: TotalCount ### Description Gets the approximate total number of storage objects. ### Property Signature `int TotalCount { get; }` ### Type `int` ### Access Read-only (get) ### Remarks This property is part of the `IConsoleStorageList` interface in the `Nakama.Console` namespace. ``` -------------------------------- ### Generate Nakama Console client Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/codegen/README.md Run this command to generate a client for the Nakama Console API. ```shell task -v generate-nakamaconsole ``` -------------------------------- ### IApiAccountDevice.Vars Source: https://github.com/heroiclabs/nakama-dotnet/blob/master/docs/html/interface_nakama_1_1_console_1_1_i_api_account_device.html Gets extra information that will be bundled in the session token. ```APIDOC ## Property: Vars ### Description Gets extra information that will be bundled in the session token. ### Property Signature IDictionary Nakama.Console.IApiAccountDevice.Vars { get; } ### Access - **get** - Returns a dictionary of string keys and string values containing extra information. ### Remarks This property is used with authenticate/link/unlink and user operations. ```