C# Class SyncanoSyncServer.Net.RealTimeSyncApi.RealTimeSyncSyncanoClient

Datei anzeigen Open project: Syncano/syncano-dotnet

Public Methods

Method Description
GetAllConnections ( string name = null, string sinceId = null, int limit = MaxLimit ) : Task>

Get all connections from current instance up to a limit (max 100).

GetConnections ( string apiClientId = null, string name = null, string sinceId = null, int limit = MaxLimit ) : Task>

Get currently connected API client connections up to a limit (max 100).

GetHistory ( string sinceId = null, System.DateTime sinceTime = null, int limit = MaxLimit, DataObjectOrder order = DataObjectOrder.Ascending ) : Task>

Get a history of notifications of current API client. History items are stored for 24 hours. User API key usage permitted if subscribe permission is added through apikey.authorize().

GetSubscriptions ( string apiClientId = null, string sessionId = null, string uuid = null ) : Task>

Get API client subscriptions. User API key usage permitted.

RealTimeSyncSyncanoClient ( SyncServerClient syncanoClient ) : System
SendNotification ( string topic, object>.Dictionary additional = null ) : Task
SendNotification ( string apiClientId = null, string uuid = null, object>.Dictionary additional = null ) : Task

Sends custom notification to API client through Sync Server. If uuid is specified - will only send to this specific instance. User API key usage permitted if send_notification permission is added through apikey.authorize().

SubscribeCollection ( string projectId, string collectionId = null, string collectionKey = null, Context context = Context.Client ) : Task

Subscribe to collection level notifications within a specified project. Collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key. User API key usage permitted with context session or connection if subscribe permission is added through apikey.authorize() and read_data permission is added to specified collection through collection.authorize() or project.authorize().

SubscribeProject ( string projectId, Context context = Context.Client ) : Task

Subscribe to project level notifications - will get all notifications in contained collections. User API key usage permitted with context session or connection if subscribe permission is added through apikey.authorize() and read_data permission is added to specified project through project.authorize().

UnsubscribeCollection ( string projectId, string collectionId = null, string collectionKey = null ) : Task

Unsubscribe from a collection within a specified project. Unsubscribing will work in context that it was originally created for. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key. User API key usage permitted.

UnsubscribeProject ( string projectId ) : Task

Unsubscribe from a project. Unsubscribing will work in context that it was originally created for. User API key usage permitted.

UpdateConnection ( string uuid, string name = null, string state = null, string apiClientId = null ) : Task

Updates specified API client connection info.

Method Details

GetAllConnections() public method

Get all connections from current instance up to a limit (max 100).
public GetAllConnections ( string name = null, string sinceId = null, int limit = MaxLimit ) : Task>
name string If specified, will only return connections of specified name.
sinceId string If specified, will only return data created after specified uuid (newer).
limit int Maximum number of API client connections to get. Default and max: 100.
return Task>

GetConnections() public method

Get currently connected API client connections up to a limit (max 100).
public GetConnections ( string apiClientId = null, string name = null, string sinceId = null, int limit = MaxLimit ) : Task>
apiClientId string API client id. If not specified, will get connections for current API client.
name string If specified, will only return connections of specified name.
sinceId string If specified, will only return data created after specified uuid (newer).
limit int Maximum number of API client connections to get. Default and max: 100.
return Task>

GetHistory() public method

Get a history of notifications of current API client. History items are stored for 24 hours. User API key usage permitted if subscribe permission is added through apikey.authorize().
public GetHistory ( string sinceId = null, System.DateTime sinceTime = null, int limit = MaxLimit, DataObjectOrder order = DataObjectOrder.Ascending ) : Task>
sinceId string If specified, will only return data with id higher than since_id (newer).
sinceTime System.DateTime String with date. If specified, will only return data with timestamp after specified value (newer).
limit int Maximum number of history items to get. Default and max: 100.
order DataObjectOrder Order of data that will be returned.
return Task>

GetSubscriptions() public method

Get API client subscriptions. User API key usage permitted.
public GetSubscriptions ( string apiClientId = null, string sessionId = null, string uuid = null ) : Task>
apiClientId string API client id defining client. If not present, gets subscriptions for current API client.
sessionId string Session id associated with API client. If present, gets subscriptions associated with specified API client's session.
uuid string Connection UUID. If present, gets subscriptions associated with specified API client's connection.
return Task>

RealTimeSyncSyncanoClient() public method

public RealTimeSyncSyncanoClient ( SyncServerClient syncanoClient ) : System
syncanoClient SyncServerClient
return System

SendNotification() public method

public SendNotification ( string topic, object>.Dictionary additional = null ) : Task
topic string
additional object>.Dictionary
return Task

SendNotification() public method

Sends custom notification to API client through Sync Server. If uuid is specified - will only send to this specific instance. User API key usage permitted if send_notification permission is added through apikey.authorize().
public SendNotification ( string apiClientId = null, string uuid = null, object>.Dictionary additional = null ) : Task
apiClientId string Destination API client id. If not specified, will query current API client's connections.
uuid string UUID of specified API client's connection. If not specified, will send a broadcast to all specified API client's connections.
additional object>.Dictionary Any number of additional parameters will be sent as well into data structure.
return Task

SubscribeCollection() public method

Subscribe to collection level notifications within a specified project. Collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key. User API key usage permitted with context session or connection if subscribe permission is added through apikey.authorize() and read_data permission is added to specified collection through collection.authorize() or project.authorize().
public SubscribeCollection ( string projectId, string collectionId = null, string collectionKey = null, Context context = Context.Client ) : Task
projectId string Project id.
collectionId string Collection id defining collection.
collectionKey string Collection key defining collection.
context Context Context to subscribe within.
return Task

SubscribeProject() public method

Subscribe to project level notifications - will get all notifications in contained collections. User API key usage permitted with context session or connection if subscribe permission is added through apikey.authorize() and read_data permission is added to specified project through project.authorize().
public SubscribeProject ( string projectId, Context context = Context.Client ) : Task
projectId string Project id.
context Context Context to subscribe within.
return Task

UnsubscribeCollection() public method

Unsubscribe from a collection within a specified project. Unsubscribing will work in context that it was originally created for. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key. User API key usage permitted.
public UnsubscribeCollection ( string projectId, string collectionId = null, string collectionKey = null ) : Task
projectId string Project id.
collectionId string Collection id defining collection.
collectionKey string Collection key defining collection.
return Task

UnsubscribeProject() public method

Unsubscribe from a project. Unsubscribing will work in context that it was originally created for. User API key usage permitted.
public UnsubscribeProject ( string projectId ) : Task
projectId string Project id.
return Task

UpdateConnection() public method

Updates specified API client connection info.
public UpdateConnection ( string uuid, string name = null, string state = null, string apiClientId = null ) : Task
uuid string Connection UUID.
name string New name to set.
state string New state to set.
apiClientId string API client id. If not specified, will update current API client connections.
return Task