public Call call() { IRestResponse response = Client.Execute(Request); var content = response.Content; content = Regex.Replace(content, @"[^\u0000-\u007F]+", string.Empty); callProperties properties = JsonConvert.DeserializeObject <callProperties>(content); Call newcall = new Call(properties); return(newcall); }
public void ModifyCall(Dictionary <string, string> parameter, String AccountSId, String AuthToken) { RestClient client = new RestClient(Account.baseurl + "Accounts/" + AccountSId + "/Calls.json/" + Properties.sid); RestRequest makecallmodification = new RestRequest(Method.POST); client.Authenticator = new HttpBasicAuthenticator(AccountSId, AuthToken); foreach (var pair in parameter) { makecallmodification.AddParameter(pair.Key, pair.Value); } IRestResponse response = client.Execute(makecallmodification); var content = response.Content; content = Regex.Replace(content, @"[^\u0000-\u007F]+", string.Empty); Properties = JsonConvert.DeserializeObject <callProperties>(content); }
public Call(callProperties properties) { Properties = properties; }