diff --git a/TropoCSharp/Tropo.cs b/TropoCSharp/Tropo.cs index 27884dd..a274640 100644 --- a/TropoCSharp/Tropo.cs +++ b/TropoCSharp/Tropo.cs @@ -1058,7 +1058,7 @@ public void Say(IEnumerable says) /// This is the destination URL to send the recording. /// This identifies the FTP account username. /// This identifies the FTP account password. - public void StartRecording(string format, string method, string url, string username, string password) + public void StartRecording(string format, string method, object url, string username, string password) { StartRecording startRecording = new StartRecording(); startRecording.Format = format; @@ -1082,7 +1082,7 @@ public void StartRecording(string format, string method, string url, string user /// The value that's included with your transcription when it's sent to your URL. This allows you to keep track of transcriptions; accepts a string.. /// The format of the email. Setting it as "encoded" will include a chunk of JSON in the email body or you can set it as "omit" to send as a human-readable message. It defaults to "omit", so unless you want JSON, this can be left out. /// The address this transcription will be POSTed to; use a mailto: url to have the transcription emailed. - public void StartRecording(string format, string method, string url, string username, string password, string transcriptionID, string transcriptionEmailFormat, string transcriptionOutURI) + public void StartRecording(string format, string method, object url, string username, string password, string transcriptionID, string transcriptionEmailFormat, string transcriptionOutURI) { StartRecording startRecording = new StartRecording(); startRecording.Format = format; @@ -1111,7 +1111,7 @@ public void StartRecording(string format, string method, string url, string user /// The format of the email. Setting it as "encoded" will include a chunk of JSON in the email body or you can set it as "omit" to send as a human-readable message. It defaults to "omit", so unless you want JSON, this can be left out. /// transcription languages. /// The address this transcription will be POSTed to; use a mailto: url to have the transcription emailed. - public void StartRecording(bool? asyncUpload, string format, string method, string url, string username, string password, string transcriptionID, string transcriptionEmailFormat, string transcriptionLanguage, string transcriptionOutURI) + public void StartRecording(bool? asyncUpload, string format, string method, object url, string username, string password, string transcriptionID, string transcriptionEmailFormat, string transcriptionLanguage, string transcriptionOutURI) { StartRecording startRecording = new StartRecording(); startRecording.AsyncUpload = asyncUpload; @@ -1142,7 +1142,7 @@ public void StartRecording(bool? asyncUpload, string format, string method, stri /// The value that's included with your transcription when it's sent to your URL. This allows you to keep track of transcriptions; accepts a string.. /// The format of the email. Setting it as "encoded" will include a chunk of JSON in the email body or you can set it as "omit" to send as a human-readable message. It defaults to "omit", so unless you want JSON, this can be left out. /// The address this transcription will be POSTed to; use a mailto: url to have the transcription emailed. - public void StartRecording(bool? asyncUpload, string format, string method, string url, string username, string password, string transcriptionID, string transcriptionEmailFormat, string transcriptionOutURI) + public void StartRecording(bool? asyncUpload, string format, string method, object url, string username, string password, string transcriptionID, string transcriptionEmailFormat, string transcriptionOutURI) { StartRecording startRecording = new StartRecording(); startRecording.AsyncUpload = asyncUpload; diff --git a/TropoCSharp/TropoClasses.cs b/TropoCSharp/TropoClasses.cs index f3e0f34..d229b41 100644 --- a/TropoCSharp/TropoClasses.cs +++ b/TropoCSharp/TropoClasses.cs @@ -616,7 +616,7 @@ public class StartRecording : TropoBase public string Method { get; set; } [JsonProperty(PropertyName = "url")] - public string Url { get; set; } + public object Url { get; set; } [JsonProperty(PropertyName = "username")] public string Username { get; set; } diff --git a/TropoSample/StartRecordingTest.aspx.cs b/TropoSample/StartRecordingTest.aspx.cs index 542270a..b74a9bc 100644 --- a/TropoSample/StartRecordingTest.aspx.cs +++ b/TropoSample/StartRecordingTest.aspx.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Web.UI; using TropoCSharp.Structs; using TropoCSharp.Tropo; @@ -24,8 +25,47 @@ protected void Page_Load(object sender, EventArgs e) StartRecording startRecording = new StartRecording(); startRecording.AsyncUpload = true; + + + RecordUrlTuple RecordUrlTuple1 = new RecordUrlTuple() + { + Url = "http://fakeurl.one.com", + Username = "user1", + Password = "password1", + Method = "POST" + }; + + RecordUrlTuple RecordUrlTuple2 = new RecordUrlTuple() + { + Url = "http://192.168.26.88:8080/FileUpload/uploadFile", + Username = "user2", + Password = "fakepass", + Method = "POST" + + }; + + RecordUrlTuple RecordUrlTuple3 = new RecordUrlTuple() + { + Url = "http://fakeurl.three.com", + Password = "password3", + Method = "PUT" + + }; + + RecordUrlTuple RecordUrlTuple4 = new RecordUrlTuple() + { + Url = "http://fakeurl.four.com", + Password = "password3", + Method = "put" + + }; + + IEnumerable recordingURL = new RecordUrlTuple[] { RecordUrlTuple1, RecordUrlTuple2, RecordUrlTuple3, RecordUrlTuple4 }; + + //tropo.StartRecording(false, AudioFormat.Wav, Method.Post, "http://192.168.26.88:8080/FileUpload/uploadFile", "", "", "", "plain", ""); - tropo.StartRecording(false, AudioFormat.Wav, Method.Post, "http://192.168.26.88:8080/FileUpload/uploadFile", "", "", "", "plain", "en-usa", ""); + //tropo.StartRecording(false, AudioFormat.Wav, Method.Post, "/FileUpload/url/uploadFile", "", "", "", "plain", "en-usa", "/FileUpload/transcrition/uploadFile"); + tropo.StartRecording(false, AudioFormat.Wav, Method.Post, recordingURL, "", "", "", "plain", "en-usa", "/FileUpload/transcrition/uploadFile"); //Say say2 = new Say("Fourscore and seven years ago our fathers brought forth, on this continent, a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived, and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting-place for those who here gave their lives, that that nation might live. It is altogether fitting and proper that we should do this. But, in a larger sense, we cannot dedicate, we cannot consecrate—we cannot hallow—this ground. The brave men, living and dead, who struggled here, have consecrated it far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us—that from these honored dead we take increased devotion to that cause for which they here gave the last full measure of devotion—that we here highly resolve that these dead shall not have died in vain—that this nation, under God, shall have a new birth of freedom, and that government of the people, by the people, for the people, shall not perish from the earth."); Say say2 = new Say("I love beijing, hi tropo new version");