|
Nakama .NET Client 3.17.0
The official Nakama and Satori .NET client.
|
A client for the API in Satori server. More...
Public Member Functions | |
| Task< ISession > | AuthenticateAsync (string id, Dictionary< string, string > defaultProperties=default, Dictionary< string, string > customProperties=default, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Authenticate against the server. | |
| Task | AuthenticateLogoutAsync (ISession session, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user. | |
| Task | EventAsync (ISession session, Event @event, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Send an event for this session. | |
| Task | EventsAsync (ISession session, IEnumerable< Event > events, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Send a batch of events for this session. | |
| Task< IApiExperimentList > | GetAllExperimentsAsync (ISession session, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Get all experiments data. | |
| Task< IApiExperimentList > | GetExperimentsAsync (ISession session, IEnumerable< string > names, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Get specific experiments data. | |
| Task< IApiFlag > | GetFlagAsync (ISession session, string name, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Get a single flag for this identity. | |
| Task< IApiFlag > | GetFlagAsync (ISession session, string name, string defaultValue, CancellationToken? cancellationToken=default) |
| Get a single flag for this identity. | |
| Task< IApiFlag > | GetFlagDefaultAsync (string name, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Get a single default flag for this identity. | |
| Task< IApiFlag > | GetFlagDefaultAsync (string name, string defaultValue, CancellationToken? cancellationToken=default) |
| Get a single default flag for this identity. | |
| Task< IApiFlagList > | GetFlagsAsync (ISession session, IEnumerable< string > names, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| List all available flags for this identity. | |
| Task< IApiFlagList > | GetFlagsDefaultAsync (IEnumerable< string > names, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| List all available default flags. | |
| Task< IApiLiveEventList > | GetLiveEventsAsync (ISession session, IEnumerable< string > names=null, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| List available live events. | |
| Task< ISession > | IdentifyAsync (ISession session, string id, Dictionary< string, string > defaultProperties, Dictionary< string, string > customProperties, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Identify a session with a new ID. | |
| Task< IApiProperties > | ListPropertiesAsync (ISession session, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| List properties associated with this identity. | |
| Task< ISession > | SessionRefreshAsync (ISession session, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Refresh a user's session using a refresh token retrieved from a previous authentication request. | |
| Task | UpdatePropertiesAsync (ISession session, Dictionary< string, string > defaultProperties, Dictionary< string, string > customProperties, bool recompute, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Update properties associated with this identity. | |
| Task | DeleteIdentityAsync (ISession session, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Delete the caller's identity and associated data. | |
| Task< IApiGetMessageListResponse > | GetMessageListAsync (ISession session, int limit=1, bool forward=true, string cursor=null, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Get all the messages for an identity. | |
| Task | UpdateMessageAsync (ISession session, string id, string consumeTime, string readTime, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Update the status of a message. | |
| Task | DeleteMessageAsync (ISession session, string id, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Delete a scheduled message. | |
| Task< IApiFlagOverrideList > | GetFlagOverridesAsync (ISession session, IEnumerable< string > names=null, CancellationToken? cancellationToken=default, RetryConfiguration retryConfiguration=null) |
| Get all available flags and their value overrides for this identity. | |
Properties | |
| string | ApiKey [get] |
| The key used to authenticate with the server without a session. | |
| bool | AutoRefreshSession [get] |
| True if the session should be refreshed with an active refresh token. | |
| RetryConfiguration | GlobalRetryConfiguration [get, set] |
| The global retry configuration. See RetryConfiguration. | |
| string | Host [get] |
| The host address of the server. | |
| int | Port [get] |
| The port number of the server. | |
| string | Scheme [get] |
| The protocol scheme used to connect with the server. Must be either "http" or "https". | |
| int | Timeout [get, set] |
| Set the timeout in seconds on requests sent to the server. | |
Events | |
| Action< ISession > | ReceivedSessionUpdated |
| Received a new session after the current one has expired. | |
A client for the API in Satori server.
| Task< ISession > Satori.IClient.AuthenticateAsync | ( | string | id, |
| Dictionary< string, string > | defaultProperties = default, | ||
| Dictionary< string, string > | customProperties = default, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Authenticate against the server.
| id | An optional user id. |
| defaultProperties | Optional default properties to update with this call. If not set, properties are left as they are on the server. |
| customProperties | Optional custom properties to update with this call. If not set, properties are left as they are on the server. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.AuthenticateLogoutAsync | ( | ISession | session, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.
| session | The session of the user. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.DeleteIdentityAsync | ( | ISession | session, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Delete the caller's identity and associated data.
| session | The session of the user. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.DeleteMessageAsync | ( | ISession | session, |
| string | id, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Delete a scheduled message.
| session | The session of the user. |
| id | The identifier of the message. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.EventAsync | ( | ISession | session, |
| Event @ | event, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Send an event for this session.
| session | The session of the user. |
| event | The event to send. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.EventsAsync | ( | ISession | session, |
| IEnumerable< Event > | events, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Send a batch of events for this session.
| session | The session of the user. |
| events | The batch of events which will be sent. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiExperimentList > Satori.IClient.GetAllExperimentsAsync | ( | ISession | session, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Get all experiments data.
| session | The session of the user. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiExperimentList > Satori.IClient.GetExperimentsAsync | ( | ISession | session, |
| IEnumerable< string > | names, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Get specific experiments data.
| session | The session of the user. |
| names | Experiment names. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiFlag > Satori.IClient.GetFlagAsync | ( | ISession | session, |
| string | name, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Get a single flag for this identity.
| session | The session of the user. |
| name | The name of the flag. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiFlag > Satori.IClient.GetFlagAsync | ( | ISession | session, |
| string | name, | ||
| string | defaultValue, | ||
| CancellationToken? | cancellationToken = default ) |
Get a single flag for this identity.
Unlike GetFlags(ISession,string,CancellationToken) this method will return the default value specified and will not raise an exception if the network is unavailable.
| session | The session of the user. |
| name | The name of the flag. |
| defaultValue | The default value if the server is unreachable. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
Implemented in Satori.Client.
| Task< IApiFlag > Satori.IClient.GetFlagDefaultAsync | ( | string | name, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Get a single default flag for this identity.
| name | The name of the flag. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiFlag > Satori.IClient.GetFlagDefaultAsync | ( | string | name, |
| string | defaultValue, | ||
| CancellationToken? | cancellationToken = default ) |
Get a single default flag for this identity.
Unlike GetFlagDefaultAsync(string,string,CancellationToken) this method will return the default value specified and will not raise an exception if the network is unreachable.
| name | The name of the flag. |
| defaultValue | The default value if the server is unreachable. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
Implemented in Satori.Client.
| Task< IApiFlagOverrideList > Satori.IClient.GetFlagOverridesAsync | ( | ISession | session, |
| IEnumerable< string > | names = null, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Get all available flags and their value overrides for this identity.
| session | The session of the user. |
| names | Live event names, if null or empty, all live events are returned. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiFlagList > Satori.IClient.GetFlagsAsync | ( | ISession | session, |
| IEnumerable< string > | names, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
List all available flags for this identity.
| session | The session of the user. |
| names | Flag names, if empty string all flags are returned. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiFlagList > Satori.IClient.GetFlagsDefaultAsync | ( | IEnumerable< string > | names, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
List all available default flags.
| names | Flag names, if empty string all flags are returned. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiLiveEventList > Satori.IClient.GetLiveEventsAsync | ( | ISession | session, |
| IEnumerable< string > | names = null, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
List available live events.
| session | The session of the user. |
| names | Live event names, if null or empty, all live events are returned. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiGetMessageListResponse > Satori.IClient.GetMessageListAsync | ( | ISession | session, |
| int | limit = 1, | ||
| bool | forward = true, | ||
| string | cursor = null, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Get all the messages for an identity.
| session | The session of the user. |
| limit | Max number of messages to return. Between 1 and 100. |
| forward | True if listing should be older messages to newer, false if reverse. |
| cursor | A pagination cursor, if any. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< ISession > Satori.IClient.IdentifyAsync | ( | ISession | session, |
| string | id, | ||
| Dictionary< string, string > | defaultProperties, | ||
| Dictionary< string, string > | customProperties, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Identify a session with a new ID.
| session | The session of the user. |
| id | Identity ID to enrich the current session and return a new session. The old session will no longer be usable. Must be between eight and 128 characters (inclusive). Must be an alphanumeric string with only underscores and hyphens allowed. |
| defaultProperties | The default properties. |
| customProperties | The custom event properties. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< IApiProperties > Satori.IClient.ListPropertiesAsync | ( | ISession | session, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
List properties associated with this identity.
| session | The session of the user. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task< ISession > Satori.IClient.SessionRefreshAsync | ( | ISession | session, |
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Refresh a user's session using a refresh token retrieved from a previous authentication request.
| session | The session of the user. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.UpdateMessageAsync | ( | ISession | session, |
| string | id, | ||
| string | consumeTime, | ||
| string | readTime, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Update the status of a message.
| session | The session of the user. |
| id | The message's unique identifier. |
| consumeTime | The time the message was consumed by the identity. |
| readTime | The time the message was read at the client. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
| Task Satori.IClient.UpdatePropertiesAsync | ( | ISession | session, |
| Dictionary< string, string > | defaultProperties, | ||
| Dictionary< string, string > | customProperties, | ||
| bool | recompute, | ||
| CancellationToken? | cancellationToken = default, | ||
| RetryConfiguration | retryConfiguration = null ) |
Update properties associated with this identity.
| session | The session of the user. |
| defaultProperties | The default properties to update. |
| customProperties | The custom properties to update. |
| recompute | Whether or not to recompute the user's audience membership immediately after property update. |
| cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
| retryConfiguration | The retry configuration. See RetryConfiguration |
Implemented in Satori.Client.
|
get |
The key used to authenticate with the server without a session.
Implemented in Satori.Client.
|
get |
True if the session should be refreshed with an active refresh token.
Implemented in Satori.Client.
|
getset |
The global retry configuration. See RetryConfiguration.
Implemented in Satori.Client.
|
get |
The host address of the server.
Implemented in Satori.Client.
|
get |
The port number of the server.
Implemented in Satori.Client.
|
get |
The protocol scheme used to connect with the server. Must be either "http" or "https".
Implemented in Satori.Client.
|
getset |
Set the timeout in seconds on requests sent to the server.
Implemented in Satori.Client.
| Action<ISession> Satori.IClient.ReceivedSessionUpdated |
Received a new session after the current one has expired.
This event will only be sent when SessionRefreshAsync is called which also happens automatically if AutoRefreshSession is enabled.