C# Класс SyncanoSyncServer.Net.RealTimeSyncApi.RealTimeSyncSyncanoClient

Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

GetAllConnections() публичный Метод

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.
Результат Task>

GetConnections() публичный Метод

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.
Результат Task>

GetHistory() публичный Метод

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.
Результат Task>

GetSubscriptions() публичный Метод

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.
Результат Task>

RealTimeSyncSyncanoClient() публичный Метод

public RealTimeSyncSyncanoClient ( SyncServerClient syncanoClient ) : System
syncanoClient SyncServerClient
Результат System

SendNotification() публичный Метод

public SendNotification ( string topic, object>.Dictionary additional = null ) : Task
topic string
additional object>.Dictionary
Результат Task

SendNotification() публичный Метод

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.
Результат Task

SubscribeCollection() публичный Метод

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.
Результат Task

SubscribeProject() публичный Метод

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.
Результат Task

UnsubscribeCollection() публичный Метод

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.
Результат Task

UnsubscribeProject() публичный Метод

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.
Результат Task

UpdateConnection() публичный Метод

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.
Результат Task