示例#1
0
        public void CallRecordingMp3ByName()
        {
            CallRecording rec         = Client.CallsApi.GetCallRecording(18666772003);
            string        mp3FilePath = GetFullPath("/Resources/File-examples/testDownloadRecordingByName.mp3");
            MemoryStream  ms          = (MemoryStream)Client.CallsApi.GetCallRecordingMp3ByName((long)rec.CallId, rec.Name);

            File.WriteAllBytes(mp3FilePath, ms.ToArray());
        }
示例#2
0
        public void GetCallRecording()
        {
            CallRecording rec = Client.CallsApi.GetCallRecording(64837518003);

            Assert.NotNull(rec);
            Assert.NotNull(rec.Id);
            Assert.NotNull(rec.Mp3Url);

            rec = Client.CallsApi.GetCallRecording(64837518003, "campaignId");
            Assert.Null(rec.Id);
        }
示例#3
0
        public void GetCallRecordings()
        {
            CallRecording         rec  = Client.CallsApi.GetCallRecording(64837518003);
            IList <CallRecording> recs = Client.CallsApi.GetCallRecordings((long)rec.CallId, null);

            Assert.NotNull(recs);
            Assert.AreEqual(rec.CallId, recs[0].CallId);

            recs = Client.CallsApi.GetCallRecordings((long)rec.CallId, "items(callId)");
            Assert.Null(recs[0].Id);
            Assert.NotNull(recs[0].CallId);
        }
示例#4
0
        public void GetCallRecordingByName()
        {
            CallRecording rec       = Client.CallsApi.GetCallRecording(18666772003);
            CallRecording recording = Client.CallsApi.GetCallRecordingByName((long)rec.CallId, rec.Name, null);

            Assert.NotNull(recording);
            Assert.AreEqual(rec.CallId, recording.CallId);
            Assert.AreEqual(rec.Id, recording.Id);
            Assert.AreEqual(rec.Name, recording.Name);
            Assert.AreEqual(rec.Mp3Url, recording.Mp3Url);

            recording = Client.CallsApi.GetCallRecordingByName((long)rec.CallId, rec.Name, "callId");
            Assert.Null(recording.Id);
            Assert.NotNull(recording.CallId);
        }
 public static void Main(string[] args)
 {
     var           client = new CallfireClient("api_login", "api_password");
     CallRecording rec    = client.CallsApi.GetCallRecording(379506003, "callId,campaignId,lengthInBytes,mp3Url");
 }