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

Delete() public method

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.
return Task
        public Task<bool> Delete(string apiClientId)
        {
            if(apiClientId == null)
                throw new ArgumentNullException();

            return _syncanoClient.GetAsync("apikey.delete", new {api_client_id = apiClientId});
        }
    }

Usage Example

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