Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public Call(callProperties properties)
 {
     Properties = properties;
 }