|
| Client (string scheme, string host, int port, string apiKey) |
|
| Client (string scheme, string host, int port, string apiKey, IHttpAdapter adapter, bool autoRefreshSession=true) |
|
async Task< ISession > | AuthenticateAsync (string id, Dictionary< string, string > defaultProperties=default, Dictionary< string, string > customProperties=default, CancellationToken? cancellationToken=default) |
| Authenticate against the server.- Parameters
-
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. - Parameters
-
customProperties | Optional custom properties to update with this call. If not set, properties are left as they are on the server. - Parameters
-
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
|
- Returns
- A task which resolves to a user session.
|
|
|
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.- Parameters
-
session | The session of the user. |
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
- Returns
- A task which represents the asynchronous operation.
|
|
async Task | EventAsync (ISession session, Event @event, CancellationToken? cancellationToken=default) |
| Send an event for this session.- Parameters
-
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. |
- Returns
- A task object.
|
|
async Task | EventsAsync (ISession session, IEnumerable< Event > events, CancellationToken? cancellationToken=default) |
| Send a batch of events for this session.- Parameters
-
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. |
- Returns
- A task object.
|
|
async Task< IApiExperimentList > | GetAllExperimentsAsync (ISession session, CancellationToken? cancellationToken=default) |
| Get all experiments data.- Parameters
-
session | The session of the user. |
cancellationToken | The 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.
|
|
async Task< IApiExperimentList > | GetExperimentsAsync (ISession session, IEnumerable< string > names, CancellationToken? cancellationToken=default) |
| Get specific experiments data.- Parameters
-
session | The session of the user. |
names | Experiment names. |
cancellationToken | The 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.
|
|
async Task< IApiFlag > | GetFlagAsync (ISession session, string name, CancellationToken? cancellationToken=default) |
| Get a single flag for this identity.- Parameters
-
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. |
- Returns
- A task which resolves to a single feature flag.
|
|
Task< IApiFlag > | 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.
|
|
async Task< IApiFlag > | GetFlagDefaultAsync (string name, CancellationToken? cancellationToken=default) |
| Get a single default flag for this identity.- Parameters
-
name | The name of the flag. |
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
- Returns
- A task which resolves to a single default feature flag.
|
|
Task< IApiFlag > | 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.
|
|
async Task< IApiFlagList > | GetFlagsAsync (ISession session, IEnumerable< string > names, CancellationToken? cancellationToken=default) |
| List all available flags for this identity.- Parameters
-
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. |
- Returns
- A task which resolves to all flags available to this identity.
|
|
Task< IApiFlagList > | GetFlagsDefaultAsync (IEnumerable< string > names, CancellationToken? cancellationToken=default) |
| List all available default flags.- Parameters
-
names | Flag names, if empty string all flags are returned. |
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
- Returns
- A task which resolves to all available default flags.
|
|
async Task< ISession > | IdentifyAsync (ISession session, string id, Dictionary< string, string > defaultProperties, Dictionary< string, string > customProperties, CancellationToken? cancellationToken=default) |
| Identify a session with a new ID.- Parameters
-
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. |
- Returns
- A task which resolves to the new session for the user.
|
|
async Task< IApiLiveEventList > | GetLiveEventsAsync (ISession session, IEnumerable< string > names=null, CancellationToken? cancellationToken=default) |
| List available live events.- Parameters
-
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. |
- Returns
- A task which resolves to a list of live events.
|
|
async Task< IApiProperties > | ListPropertiesAsync (ISession session, CancellationToken? cancellationToken=default) |
| List properties associated with this identity.- Parameters
-
session | The session of the user. |
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
- Returns
- A task which resolves to a list of live events.
|
|
async Task< ISession > | SessionRefreshAsync (ISession session, CancellationToken? cancellationToken=default) |
| Refresh a user's session using a refresh token retrieved from a previous authentication request.- Parameters
-
session | The session of the user. |
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
- Returns
- A task which resolves to a user session.
|
|
async Task | UpdatePropertiesAsync (ISession session, Dictionary< string, string > defaultProperties, Dictionary< string, string > customProperties, bool recompute=false, CancellationToken? cancellationToken=default) |
| Update properties associated with this identity.- Parameters
-
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. |
- Returns
- A task object.
|
|
async Task | DeleteIdentityAsync (ISession session, CancellationToken? cancellationToken=default) |
| Delete the caller's identity and associated data.- Parameters
-
session | The session of the user. |
cancellationToken | The CancellationToken that can be used to cancel the request while mid-flight. |
- Returns
- A task object.
|
|