Nakama .NET Client SDK 3.8.0
Nakama .NET Client SDK
Loading...
Searching...
No Matches
Satori.IClient Interface Reference

A client for the API in Satori server. More...

Inheritance diagram for Satori.IClient:
Satori.Client

Public Member Functions

Task< ISessionAuthenticateAsync (string id, Dictionary< string, string > defaultProperties=default, Dictionary< string, string > customProperties=default, CancellationToken? cancellationToken=default)
 Authenticate against the server.
 
Task AuthenticateLogoutAsync (ISession session, CancellationToken? cancellationToken=default)
 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)
 Send an event for this session.
 
Task EventsAsync (ISession session, IEnumerable< Event > events, CancellationToken? cancellationToken=default)
 Send a batch of events for this session.
 
Task< IApiExperimentListGetAllExperimentsAsync (ISession session, CancellationToken? cancellationToken=default)
 Get all experiments data.
 
Task< IApiExperimentListGetExperimentsAsync (ISession session, IEnumerable< string > names, CancellationToken? cancellationToken=default)
 Get specific experiments data.
 
Task< IApiFlagGetFlagAsync (ISession session, string name, CancellationToken? cancellationToken=default)
 Get a single flag for this identity.
 
Task< IApiFlagGetFlagAsync (ISession session, string name, string defaultValue, CancellationToken? cancellationToken=default)
 Get a single flag for this identity.
 
Task< IApiFlagGetFlagDefaultAsync (string name, CancellationToken? cancellationToken=default)
 Get a single default flag for this identity.
 
Task< IApiFlagGetFlagDefaultAsync (string name, string defaultValue, CancellationToken? cancellationToken=default)
 Get a single default flag for this identity.
 
Task< IApiFlagListGetFlagsAsync (ISession session, IEnumerable< string > names, CancellationToken? cancellationToken=default)
 List all available flags for this identity.
 
Task< IApiFlagListGetFlagsDefaultAsync (IEnumerable< string > names, CancellationToken? cancellationToken=default)
 List all available default flags.
 
Task< IApiLiveEventListGetLiveEventsAsync (ISession session, IEnumerable< string > names=null, CancellationToken? cancellationToken=default)
 List available live events.
 
Task< ISessionIdentifyAsync (ISession session, string id, Dictionary< string, string > defaultProperties, Dictionary< string, string > customProperties, CancellationToken? cancellationToken=default)
 Identify a session with a new ID.
 
Task< IApiPropertiesListPropertiesAsync (ISession session, CancellationToken? cancellationToken=default)
 List properties associated with this identity.
 
Task< ISessionSessionRefreshAsync (ISession session, CancellationToken? cancellationToken=default)
 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)
 Update properties associated with this identity.
 
Task DeleteIdentityAsync (ISession session, CancellationToken? cancellationToken=default)
 Delete the caller's identity and associated data.
 

Properties

bool AutoRefreshSession [get]
 True if the session should be refreshed with an active refresh token.
 

Detailed Description

A client for the API in Satori server.

Member Function Documentation

◆ AuthenticateAsync()

Task< ISession > Satori.IClient.AuthenticateAsync ( string  id,
Dictionary< string, string >  defaultProperties = default,
Dictionary< string, string >  customProperties = default,
CancellationToken?  cancellationToken = default 
)

Authenticate against the server.

Parameters
idAn optional user id.
defaultPropertiesOptional default properties to update with this call. If not set, properties are left as they are on the server.
Parameters
customPropertiesOptional custom properties to update with this call. If not set, properties are left as they are on the server.
Parameters
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a user session.

Implemented in Satori.Client.

◆ AuthenticateLogoutAsync()

Task Satori.IClient.AuthenticateLogoutAsync ( ISession  session,
CancellationToken?  cancellationToken = default 
)

Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user.

Parameters
sessionThe session of the user.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which represents the asynchronous operation.

Implemented in Satori.Client.

◆ DeleteIdentityAsync()

Task Satori.IClient.DeleteIdentityAsync ( ISession  session,
CancellationToken?  cancellationToken = default 
)

Delete the caller's identity and associated data.

Parameters
sessionThe session of the user.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task object.

Implemented in Satori.Client.

◆ EventAsync()

Task Satori.IClient.EventAsync ( ISession  session,
Event event,
CancellationToken?  cancellationToken = default 
)

Send an event for this session.

Parameters
sessionThe session of the user.
eventThe event to send.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task object.

Implemented in Satori.Client.

◆ EventsAsync()

Task Satori.IClient.EventsAsync ( ISession  session,
IEnumerable< Event events,
CancellationToken?  cancellationToken = default 
)

Send a batch of events for this session.

Parameters
sessionThe session of the user.
eventsThe batch of events which will be sent.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task object.

Implemented in Satori.Client.

◆ GetAllExperimentsAsync()

Task< IApiExperimentList > Satori.IClient.GetAllExperimentsAsync ( ISession  session,
CancellationToken?  cancellationToken = default 
)

Get all experiments data.

Parameters
sessionThe session of the user.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to all experiments that this identity is involved with.

Implemented in Satori.Client.

◆ GetExperimentsAsync()

Task< IApiExperimentList > Satori.IClient.GetExperimentsAsync ( ISession  session,
IEnumerable< string >  names,
CancellationToken?  cancellationToken = default 
)

Get specific experiments data.

Parameters
sessionThe session of the user.
namesExperiment names.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to all experiments that this identity is involved with.

Implemented in Satori.Client.

◆ GetFlagAsync() [1/2]

Task< IApiFlag > Satori.IClient.GetFlagAsync ( ISession  session,
string  name,
CancellationToken?  cancellationToken = default 
)

Get a single flag for this identity.

Parameters
sessionThe session of the user.
nameThe name of the flag.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a single feature flag.

Implemented in Satori.Client.

◆ GetFlagAsync() [2/2]

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.

Parameters
sessionThe session of the user.
nameThe name of the flag.
defaultValueThe default value if the server is unreachable.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a single feature flag.

Implemented in Satori.Client.

◆ GetFlagDefaultAsync() [1/2]

Task< IApiFlag > Satori.IClient.GetFlagDefaultAsync ( string  name,
CancellationToken?  cancellationToken = default 
)

Get a single default flag for this identity.

Parameters
nameThe name of the flag.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a single default feature flag.

Implemented in Satori.Client.

◆ GetFlagDefaultAsync() [2/2]

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.

Parameters
nameThe name of the flag.
defaultValueThe default value if the server is unreachable.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a single default feature flag.

Implemented in Satori.Client.

◆ GetFlagsAsync()

Task< IApiFlagList > Satori.IClient.GetFlagsAsync ( ISession  session,
IEnumerable< string >  names,
CancellationToken?  cancellationToken = default 
)

List all available flags for this identity.

Parameters
sessionThe session of the user.
namesFlag names, if empty string all flags are returned.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to all flags available to this identity.

Implemented in Satori.Client.

◆ GetFlagsDefaultAsync()

Task< IApiFlagList > Satori.IClient.GetFlagsDefaultAsync ( IEnumerable< string >  names,
CancellationToken?  cancellationToken = default 
)

List all available default flags.

Parameters
namesFlag names, if empty string all flags are returned.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to all available default flags.

Implemented in Satori.Client.

◆ GetLiveEventsAsync()

Task< IApiLiveEventList > Satori.IClient.GetLiveEventsAsync ( ISession  session,
IEnumerable< string >  names = null,
CancellationToken?  cancellationToken = default 
)

List available live events.

Parameters
sessionThe session of the user.
namesLive event names, if null or empty, all live events are returned.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a list of live events.

Implemented in Satori.Client.

◆ IdentifyAsync()

Task< ISession > Satori.IClient.IdentifyAsync ( ISession  session,
string  id,
Dictionary< string, string >  defaultProperties,
Dictionary< string, string >  customProperties,
CancellationToken?  cancellationToken = default 
)

Identify a session with a new ID.

Parameters
sessionThe session of the user.
idIdentity 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.
defaultPropertiesThe default properties.
customPropertiesThe custom event properties.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to the new session for the user.

Implemented in Satori.Client.

◆ ListPropertiesAsync()

Task< IApiProperties > Satori.IClient.ListPropertiesAsync ( ISession  session,
CancellationToken?  cancellationToken = default 
)

List properties associated with this identity.

Parameters
sessionThe session of the user.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a list of live events.

Implemented in Satori.Client.

◆ SessionRefreshAsync()

Task< ISession > Satori.IClient.SessionRefreshAsync ( ISession  session,
CancellationToken?  cancellationToken = default 
)

Refresh a user's session using a refresh token retrieved from a previous authentication request.

Parameters
sessionThe session of the user.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task which resolves to a user session.

Implemented in Satori.Client.

◆ UpdatePropertiesAsync()

Task Satori.IClient.UpdatePropertiesAsync ( ISession  session,
Dictionary< string, string >  defaultProperties,
Dictionary< string, string >  customProperties,
bool  recompute,
CancellationToken?  cancellationToken = default 
)

Update properties associated with this identity.

Parameters
sessionThe session of the user.
defaultPropertiesThe default properties to update.
customPropertiesThe custom properties to update.
recomputeWhether or not to recompute the user's audience membership immediately after property update.
cancellationTokenThe CancellationToken that can be used to cancel the request while mid-flight.
Returns
A task object.

Implemented in Satori.Client.

Property Documentation

◆ AutoRefreshSession

bool Satori.IClient.AutoRefreshSession
get

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

Implemented in Satori.Client.


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