C# Class Syncano.Net.Api.CollectionSyncanoClient

Class with Collection management api.
Show file Open project: Syncano/syncano-dotnet Class Usage Examples

Public Methods

Method Description
Activate ( string projectId, string collectionId, bool force = false ) : Task

Activates specified collection.

AddTag ( ManageCollactionTagsRequest request, double weight = 1.0, bool removeOther = false ) : Task

Add a tag to specific event. Note: tags are case sensitive.

Authorize ( string apiClientId, Permissions permission, string projectId, string collectionId = null, string collectionKey = null ) : Task

Adds container-level permission to specified User API client. Requires Backend API key with Admin permission role. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.

CollectionSyncanoClient ( ISyncanoClient syncanoClient ) : System

Creates CollectionSyncanoClient object.

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

Deactivates specified collection. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.

Deauthorize ( string apiClientId, Permissions permission, string projectId, string collectionId = null, string collectionKey = null ) : Task

Removes container-level permission from specified User API client. Requires Backend API key with Admin permission role. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.

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

Permanently delete a specified collection and all associated data. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.

DeleteTag ( ManageCollactionTagsRequest request ) : Task

Delete a tag or tags from specified collection. Note: tags are case sensitive.

Get ( GetCollectionRequest request ) : Task>

Get collections by a specified request.

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

Get one collection from a specified project. 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 if read_data permission is added to specified collection through collection.authorize() or project.authorize().

New ( string projectId, string name, string key = null, string description = null ) : Task

Create a new collection within the specified project.

Update ( string projectId, string collectionId = null, string collectionKey = null, string name = null, string description = null ) : Task

Update existing collection. If both the id and key are specified, will use id for getting collection while collection_key will be updated with a new value.

Method Details

Activate() public method

Activates specified collection.
public Activate ( string projectId, string collectionId, bool force = false ) : Task
projectId string Project id.
collectionId string Collection id defining collection to be activated.
force bool If set to True, will force the activation by deactivating all other collections that may share it's data_key.
return Task

AddTag() public method

Add a tag to specific event. Note: tags are case sensitive.
public AddTag ( ManageCollactionTagsRequest request, double weight = 1.0, bool removeOther = false ) : Task
request Syncano.Net.DataRequests.ManageCollactionTagsRequest Tags manage request.
weight double Tag(s) weight. Default value: 1.
removeOther bool If true, will remove all other tags of specified collection. Default value: False.
return Task

Authorize() public method

Adds container-level permission to specified User API client. Requires Backend API key with Admin permission role. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.
public Authorize ( string apiClientId, Permissions permission, string projectId, string collectionId = null, string collectionKey = null ) : Task
apiClientId string User API client id.
permission Permissions User API client's permission to add.
projectId string Defines project containing specified container.
collectionId string Collection id defining collection that permission will be added to.
collectionKey string Collection key defining collection that permission will be added to.
return Task

CollectionSyncanoClient() public method

Creates CollectionSyncanoClient object.
public CollectionSyncanoClient ( ISyncanoClient syncanoClient ) : System
syncanoClient ISyncanoClient Object implementing ISyncanoClient interface. Provides means for connecting to Syncano.
return System

Deactivate() public method

Deactivates specified collection. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.
public Deactivate ( string projectId, string collectionId = null, string collectionKey = null ) : Task
projectId string Project id.
collectionId string Collection id defining collection to be deactivated.
collectionKey string Collection key defining collection to be deactivated.
return Task

Deauthorize() public method

Removes container-level permission from specified User API client. Requires Backend API key with Admin permission role. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.
public Deauthorize ( string apiClientId, Permissions permission, string projectId, string collectionId = null, string collectionKey = null ) : Task
apiClientId string User API client id.
permission Permissions User API client's permission to add.
projectId string Defines project containing specified container.
collectionId string Collection id defining collection that permission will be added to.
collectionKey string Collection key defining collection that permission will be added to.
return Task

Delete() public method

Permanently delete a specified collection and all associated data. The collection_id/collection_key parameter means that one can use either one of them - collection_id or collection_key.
public Delete ( string projectId, string collectionId = null, string collectionKey = null ) : Task
projectId string Project id.
collectionId string Collection id defining the collection to be deleted.
collectionKey string Collection key defining the collection to be deleted.
return Task

DeleteTag() public method

Delete a tag or tags from specified collection. Note: tags are case sensitive.
public DeleteTag ( ManageCollactionTagsRequest request ) : Task
request Syncano.Net.DataRequests.ManageCollactionTagsRequest Tags manage request.
return Task

Get() public method

Get collections by a specified request.
public Get ( GetCollectionRequest request ) : Task>
request Syncano.Net.DataRequests.GetCollectionRequest Query request.
return Task>

GetOne() public method

Get one collection from a specified project. 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 if read_data permission is added to specified collection through collection.authorize() or project.authorize().
public GetOne ( 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

New() public method

Create a new collection within the specified project.
public New ( string projectId, string name, string key = null, string description = null ) : Task
projectId string Project id that the collection will be created for.
name string New collection's name.
key string New collection's key.
description string New collection's description.
return Task

Update() public method

Update existing collection. If both the id and key are specified, will use id for getting collection while collection_key will be updated with a new value.
public Update ( string projectId, string collectionId = null, string collectionKey = null, string name = null, string description = null ) : Task
projectId string Project id.
collectionId string Collection id defining a collection.
collectionKey string Collection key defining a collection.
name string New collection name.
description string New collection description.
return Task