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");
}
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>(); } }