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

UpdateDescription() public method

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

            return _syncanoClient.GetAsync<ApiKey>("apikey.update_description", new {description, api_client_id = apiClientId},
                "apikey");
        }

Usage Example

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