Syncano.Net.Api.ApiKeySyncanoClient.GetOne C# (CSharp) Method

GetOne() public method

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.
return Task
        public Task<ApiKey> GetOne(string apiClientId = null)
        {
            return _syncanoClient.GetAsync<ApiKey>("apikey.get_one", new {api_client_id = apiClientId}, "apikey");
        }

Usage Example

 public async Task GetOne_WithInvalidApiKey_ThrowsException(ApiKeySyncanoClient client)
 {
     try
     {
         //when
         await client.GetOne("abcde");
         throw new Exception("GetOne should throw an exception");
     }
     catch (Exception e)
     {
         //then
         e.ShouldBeType<SyncanoException>();
     }
 }
All Usage Examples Of Syncano.Net.Api.ApiKeySyncanoClient::GetOne