/// <summary> /// PUT /v1/calls/{uuid}/talk - send a synthesized speech message to an active Call /// </summary> /// <param name="id">id of call</param> /// <param name="cmd">Command to execute against call</param> /// <param name="creds">(Optional) Overridden credentials for only this request</param> /// <exception cref="NexmoHttpRequestException">thrown if an error is encountered when talking to the API</exception> public CallCommandResponse StartTalk(string id, TalkCommand cmd, Credentials creds = null) { return(ApiRequest.DoRequestWithJsonContent <CallCommandResponse>( PUT, ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"{CALLS_ENDPOINT}/{id}/talk"), cmd, ApiRequest.AuthType.Bearer, creds ?? Credentials )); }
/// <summary> /// PUT /v1/calls/{uuid}/talk - send a synthesized speech message to an active Call /// </summary> /// <param name="id">id of call</param> /// <param name="cmd">Command to execute against call</param> /// <param name="creds">(Optional) Overridden credentials for only this request</param> public static CallCommandResponse BeginTalk(string id, TalkCommand cmd, Credentials creds = null) { return(ApiRequest.DoRequestWithJsonContent <CallCommandResponse>("PUT", ApiRequest.GetBaseUriFor(typeof(Call), $"/v1/calls/{id}/talk"), cmd, ApiRequest.AuthType.Bearer, creds)); }
/// <summary> /// PUT /v1/calls/{uuid}/talk - send a synthesized speech message to an active Call /// </summary> public static CallCommandResponse BeginTalk(string id, TalkCommand cmd) { var response = VersionedApiRequest.DoRequest("PUT", ApiRequest.GetBaseUriFor(typeof(Call), $"/v1/calls/{id}/talk"), cmd); return(JsonConvert.DeserializeObject <CallCommandResponse>(response.JsonResponse)); }