C# Class Syncano.Net.Api.CollectionSyncanoClient

Class with Collection management api.
Afficher le fichier Open project: Syncano/syncano-dotnet Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat Task

AddTag() public méthode

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.
Résultat Task

Authorize() public méthode

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.
Résultat Task

CollectionSyncanoClient() public méthode

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

Deactivate() public méthode

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.
Résultat Task

Deauthorize() public méthode

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.
Résultat Task

Delete() public méthode

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.
Résultat Task

DeleteTag() public méthode

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.
Résultat Task

Get() public méthode

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

GetOne() public méthode

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.
Résultat Task

New() public méthode

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.
Résultat Task

Update() public méthode

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.
Résultat Task