C# 클래스 Syncano.Net.Api.ApiKeySyncanoClient

Class with ApiKey management api.
파일 보기 프로젝트 열기: Syncano/syncano-dotnet 1 사용 예제들

공개 메소드들

메소드 설명
ApiKeySyncanoClient ( ISyncanoClient syncanoClient ) : System

Creates ApiKeySyncanoClient object.

Authorize ( string apiClientId, ApiKeyPermission permission ) : Task

Adds permission to specified User API client. Requires Backend API key with Admin permission role.

ClearSession ( ) : void

Clears current Session Id.

Deauthorize ( string apiClientId, ApiKeyPermission permission ) : Task

Removes permission from specified User API client. Requires Backend API key with Admin permission role.

Delete ( string apiClientId ) : Task

Deletes specified API client. Only Admin permission role can delete API clients.

Get ( ) : Task>

Get API clients. Only Admin permission role can view other API clients.

GetOne ( string apiClientId = null ) : Task

Gets info of one specified API client. Only Admin permission role can view other API clients.

GetRoles ( ) : Task>

Lists all permission roles of current instance.

New ( string description, ApiKeyType type = ApiKeyType.Backend, string roleId = null ) : Task

Creates a new API client (for backend or user-aware usage) in current instance. Only Admin permission role can create new API clients.

StartSession ( TimeZoneInfo timeZone = null ) : Task

Logs in the API client and returns session_id for session id or cookie-based authentication. Session is valid for 2 hours and is automatically renewed whenever it is used. User API key usage permitted.

UpdateDescription ( string description, string apiClientId = null ) : Task

Updates specified API client's info.

메소드 상세

ApiKeySyncanoClient() 공개 메소드

Creates ApiKeySyncanoClient object.
public ApiKeySyncanoClient ( ISyncanoClient syncanoClient ) : System
syncanoClient ISyncanoClient Object implementing ISyncanoClient interface. Provides means for connecting to Syncano.
리턴 System

Authorize() 공개 메소드

Adds permission to specified User API client. Requires Backend API key with Admin permission role.
public Authorize ( string apiClientId, ApiKeyPermission permission ) : Task
apiClientId string User API client id.
permission ApiKeyPermission User API client's permission to add.
리턴 Task

ClearSession() 공개 메소드

Clears current Session Id.
public ClearSession ( ) : void
리턴 void

Deauthorize() 공개 메소드

Removes permission from specified User API client. Requires Backend API key with Admin permission role.
public Deauthorize ( string apiClientId, ApiKeyPermission permission ) : Task
apiClientId string User API client id.
permission ApiKeyPermission User API client's permission to remove.
리턴 Task

Delete() 공개 메소드

Deletes specified API client. Only Admin permission role can delete API clients.
public Delete ( string apiClientId ) : Task
apiClientId string API client id defining API client to delete.
리턴 Task

Get() 공개 메소드

Get API clients. Only Admin permission role can view other API clients.
public Get ( ) : Task>
리턴 Task>

GetOne() 공개 메소드

Gets info of one specified API client. Only Admin permission role can view other API clients.
public GetOne ( string apiClientId = null ) : Task
apiClientId string API client id. If not specified, will use current API client.
리턴 Task

GetRoles() 공개 메소드

Lists all permission roles of current instance.
public GetRoles ( ) : Task>
리턴 Task>

New() 공개 메소드

Creates a new API client (for backend or user-aware usage) in current instance. Only Admin permission role can create new API clients.
public New ( string description, ApiKeyType type = ApiKeyType.Backend, string roleId = null ) : Task
description string Description of new API client.
type ApiKeyType Type of new API client.
roleId string New API client's permission role id (see role.get()). Not used when creating User API key (type = user)
리턴 Task

StartSession() 공개 메소드

Logs in the API client and returns session_id for session id or cookie-based authentication. Session is valid for 2 hours and is automatically renewed whenever it is used. User API key usage permitted.
public StartSession ( TimeZoneInfo timeZone = null ) : Task
timeZone System.TimeZoneInfo Sets default timezone for all subsequent requests using returned session_id.
리턴 Task

UpdateDescription() 공개 메소드

Updates specified API client's info.
public UpdateDescription ( string description, string apiClientId = null ) : Task
description string New API client's description to set.
apiClientId string API client id. If not specified, will update current API client.
리턴 Task