/// <summary> /// Retrieve a telegraf config. /// </summary> /// <param name="telegrafId">ID of telegraf config to get</param> /// <returns>telegraf config details</returns> public async Task <Telegraf> FindTelegrafByIdAsync(string telegrafId) { Arguments.CheckNonEmptyString(telegrafId, nameof(telegrafId)); return(await _service.GetTelegrafsIDWithIRestResponseAsync(telegrafId, null, "application/json") .ContinueWith(t => (Telegraf)_service.Configuration.ApiClient.Deserialize(t.Result, typeof(Telegraf)))); }
/// <summary> /// Retrieve a telegraf config. /// </summary> /// <param name="telegrafId">ID of telegraf config to get</param> /// <returns>telegraf config details</returns> public async Task<Telegraf> FindTelegrafByIdAsync(string telegrafId) { Arguments.CheckNonEmptyString(telegrafId, nameof(telegrafId)); var response = await _service.GetTelegrafsIDWithIRestResponseAsync(telegrafId, null, "application/json").ConfigureAwait(false); return (Telegraf) _service.Configuration.ApiClient.Deserialize(response, typeof(Telegraf)); }