public void GetRecordingStreamTest() { try { RecordingsRequester recordingsRequester = new RecordingsRequester("ACabe7063197551fe51671f9ac3a9708e9dad51c4d", "204c15aae7a486c42776aea4dbafe8c68a773071", "ACabe7063197551fe51671f9ac3a9708e9dad51c4d"); Type type = typeof(APIRequester); FieldInfo fieldInfo = type.GetField("persyUrl", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { fieldInfo.SetValue(recordingsRequester, "http://GetRecordingStreamTest:3000"); } WebRequest.RegisterPrefix("http://GetRecordingStreamTest:3000", new TestWebRequestCreate()); byte[] rawWav = { 0x52, 0x49, 0x46, 0x46, 0x84, 0x0a, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x40, 0x1f, 0x00, 0x00, 0x80, 0x3e, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x60, 0x0a, 0x00, 0x00, 0xf8, 0xff, 0xf0, 0xff, 0xf1, 0xff, 0xf5, 0xff, 0xfc, 0xff, 0xf3, 0xff, 0xf6, 0xff, 0xe3, 0xff, 0xea, 0xff, 0xf0, 0xff, 0xf7, 0xff, 0xf9, 0xff, 0xf7, 0xff, 0xf8, 0xff, 0xf9, 0xff, 0xf7, 0xff, 0xf1, 0xff, 0xef, 0xff, 0xe8, 0xff, 0xf8, 0xff, 0x01, 0x00, 0x07, 0x00, 0x11, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x01, 0x00, 0xf7, 0xff, 0xf9, 0xff, 0xee, 0xff, 0xf1, 0xff, 0xf8, 0xff, 0x08, 0x00, 0x08, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xf9, 0xff, 0x00, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x03, 0x00, 0x06, 0x00, 0x09, 0x00, 0xff, 0xff, 0x01, 0x00, 0x07, 0x00, 0x09, 0x00, 0xff, 0xff, 0xf9, 0xff, 0xef, 0xff, 0xf9, 0xff, 0xf8, 0xff, 0xff, 0xff, 0x02, 0x00, 0xf5, 0xff, 0x02, 0x00, 0xf8, 0xff, 0xf0, 0xff, 0xe8, 0xff, 0xe7, 0xff, 0xf8, 0xff, 0x01, 0x00, 0xf8, 0xff, 0xef, 0xff, 0xf1, 0xff, 0xe7, 0xff, 0xe0, 0xff, 0xd9, 0xff, 0xd7, 0xff, 0xd9, 0xff, 0xd8, 0xff, 0xe6, 0xff, 0xf2, 0xff, 0xef, 0xff, 0xf8, 0xff, 0x09, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x13, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x11, 0x00, 0x10, 0x00, 0x1f, 0x00, 0x22, 0x00, 0x15, 0x00, 0x13, 0x00, 0xfe, 0xff, 0x02, 0x00, 0x05, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0xf9, 0xff, 0xf5, 0xff, 0xf3, 0xff, 0xe5, 0xff, 0xf4, 0xff, 0xf5, 0xff, 0xf9, 0xff, 0xf8, 0xff, 0xf7, 0xff, 0x0a, 0x00, 0x07, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x09, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x12, 0x00, 0x0e, 0x00, 0xf2, 0xff, 0xdf, 0xff, 0xbf, 0xff, 0xda, 0xff, 0xe6, 0xff, 0xf2, 0xff, 0x07, 0x00, 0x17, 0x00, 0x12, 0x00, 0x16, 0x00, 0x1a, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0xff, 0xd6, 0xff, 0xda, 0xff, 0xdd, 0xff, 0xf3, 0xff, 0xd5, 0xff, 0x13, 0x00, 0x45, 0x00, 0x42, 0x00, 0x48, 0x00, 0x47, 0x00, 0x31, 0x00, 0x27, 0x00, 0x11, 0x00, 0x18, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x48, 0x00, 0x37, 0x00, 0x1a, 0x00, 0xfe, 0xff, 0xda, 0xff, 0x9e, 0xff, 0x89, 0xff, 0x87, 0xff, 0x8a, 0xff, 0x9e, 0xff, 0xb9, 0xff, 0xb0, 0xff, 0xcf, 0xff, 0xea, 0xff, 0xce, 0xff, 0xda, 0xff, 0xce, 0xff, 0xc2, 0xff, 0xd6, 0xff, 0xf2, 0xff, 0xef, 0xff, 0x0f, 0x00, 0x33, 0x00, 0x4d, 0x00, 0x52, 0x00, 0x37, 0x00, 0x27, 0x00, 0x1a, 0x00, 0xef, 0xff, 0xd0, 0xff, 0x09, 0x00, 0x1e, 0x00, 0x62, 0x00, 0xa3, 0x00, 0xe4, 0x00, 0x14, 0x01, 0x04, 0x01, 0x15, 0x01, 0x23, 0x01, 0x14, 0x01, 0xe4, 0x00, 0xe3, 0x00, 0xc7, 0x00, 0x81, 0x00, 0x42, 0x00, 0xf6, 0xff, 0xa2, 0xff, 0x4a, 0xff, 0xff, 0xfe, 0xb8, 0xfe, 0x79, 0xfe, 0x4f, 0xfe, 0xf9, 0xfd, 0xef, 0xfd, 0xb8, 0xfd, 0xb2, 0xfd, 0x54, 0xfd, 0xf6, 0xfc, 0x52, 0xfd, 0x95, 0xfd, 0x14, 0xfe, 0xdb, 0xfe, 0x6d, 0xff, 0x68, 0x00, 0x53, 0x01, 0xad, 0x01, 0x0c, 0x02, 0x6a, 0x02, 0x70, 0x02, 0x47, 0x02, 0x90, 0x02, 0x69, 0x02, 0x8e, 0x02, 0xcb, 0x02, 0xcd, 0x02, 0xca, 0x02, 0xce, 0x02, 0x4b, 0x02, 0xac, 0x02, 0x9d, 0x03, 0x1b, 0x04, 0x5c, 0x04, 0x1d, 0x05, 0xdb, 0x04, 0x5d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, 0xef, 0x07, 0xe9, 0x42, 0xf2, 0x05, 0xed, 0x43, 0xf1, 0x1d, 0x04, 0xeb, 0x02, 0x5d, 0x05, 0xbc, 0x0c, 0x5b, 0x06, 0x1d, 0x04, 0x68, 0x00, 0x23, 0xf9, 0x65, 0xfa, 0xc4, 0xf6, 0x44, 0xf6, 0x94, 0xfd, 0x14, 0xfd, 0x2c, 0x02, 0xbc, 0x07, 0x5c, 0x07, 0xbc, 0x0b, 0x3c, 0x0a, 0x9d, 0x06, 0xda, 0x06, 0xa6, 0x00, 0x93, 0xfd, 0xb3, 0xfd, 0x27, 0xfb, 0x60, 0xfc, 0x28, 0xfc, 0xa1, 0xfb, 0xf5, 0xfc, 0x44, 0xf8, 0x44, 0xf8, 0x54, 0xfd, 0xa4, 0xfb, 0x63, 0xfb, 0x02, 0x00, 0xba, 0x0b, 0xfe, 0x17, 0xf9, 0x10, 0xbf, 0x0b, 0xfa, 0x16, 0x3e, 0x0a, 0xa2, 0xfb, 0x65, 0xf9, 0x03, 0xed, 0x05, 0xef, 0xc4, 0xf0, 0x03, 0xea, 0xa6, 0xf8, 0x52, 0x01, 0xd5, 0xfd, 0xdb, 0x06, 0x3d, 0x09, 0x9c, 0x04, 0x1d, 0x04, 0xf1, 0xfd, 0x68, 0xfc, 0xe0, 0xfb, 0xc7, 0xf6, 0x62, 0xfa, 0x35, 0xfd, 0xb4, 0xfd, 0x9d, 0x03, 0xda, 0x03, 0x5e, 0x07, 0xb9, 0x0a, 0xe0, 0x06, 0x18, 0x07, 0xa0, 0x05, 0x91, 0x00, 0xa9, 0xff, 0x14, 0xfe }; TestWebRequestCreate.MockHttpWebRequestWithGivenResponseCode(HttpStatusCode.OK, rawWav); MemoryStream memoryStream = new MemoryStream(); using (BinaryReader reader = new BinaryReader(recordingsRequester.stream("REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810"))) { reader.BaseStream.CopyTo(memoryStream); } byte[] byteResponse = memoryStream.ToArray(); Assert.IsTrue(rawWav.SequenceEqual(byteResponse)); } catch (PersyException pe) { Assert.Fail(pe.Message); } }
public void GetRecordingMetaTest() { try { RecordingsRequester recordingsRequester = new RecordingsRequester("ACabe7063197551fe51671f9ac3a9708e9dad51c4d", "204c15aae7a486c42776aea4dbafe8c68a773071", "ACabe7063197551fe51671f9ac3a9708e9dad51c4d"); Type type = typeof(APIRequester); FieldInfo fieldInfo = type.GetField("persyUrl", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { fieldInfo.SetValue(recordingsRequester, "http://GetRecordingMetaTest:3000"); } WebRequest.RegisterPrefix("http://GetRecordingMetaTest:3000", new TestWebRequestCreate()); TestWebRequestCreate.MockHttpWebRequestWithGivenResponseCode(HttpStatusCode.OK, "{\"uri\" : \"/Accounts/ACabe7063197551fe51671f9ac3a9708e9dad51c4d/Recordings/REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810\", \"revision\" : 1, \"dateCreated\" : \"Mon, 27 Jun 2016 17:53:55 GMT\", \"dateUpdated\" : \"Mon, 27 Jun 2016 17:53:55 GMT\", \"recordingId\" : \"REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810\", \"accountId\" : \"ACabe7063197551fe51671f9ac3a9708e9dad51c4d\", \"conferenceId\" : \"CF3cb8a52f461bcf64cbd3111d9492c3f61943eef9\", \"duration\" : 9}"); Recording recording = recordingsRequester.getMetaByRecordingId("REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810"); Assert.IsNotNull(recording); Assert.AreEqual(recording.getRecordingId, "REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810"); } catch (PersyException pe) { Assert.Fail(pe.Message); } }
public void GetRecordingListTest() { try { RecordingsRequester recordingsRequester = new RecordingsRequester("AC736ca2078721a9a41fb47f07bf40d9e21cb304da", "8e3d1c1c519fc761856f8cc825bcfea94d8c58b5", "AC736ca2078721a9a41fb47f07bf40d9e21cb304da"); Type type = typeof(APIRequester); FieldInfo fieldInfo = type.GetField("persyUrl", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { fieldInfo.SetValue(recordingsRequester, "http://GetRecordingListTest:3000"); } WebRequest.RegisterPrefix("http://GetRecordingListTest:3000", new TestWebRequestCreate()); TestWebRequestCreate.MockHttpWebRequestWithGivenResponseCode(HttpStatusCode.OK, "{\"total\":3,\"start\":0,\"end\":1,\"page\":0,\"numPages\":2,\"pageSize\":2,\"nextPageUri\":\"/Accounts/ACabe7063197551fe51671f9ac3a9708e9dad51c4d/Recordings&cursor=492dc883a811bd0204204ea9047122f93a2788a2\",\"recordings\":[{\"uri\":\"/Accounts/ACabe7063197551fe51671f9ac3a9708e9dad51c4d/Recordings/REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810\",\"revision\":1,\"dateCreated\":\"Mon, 27 Jun 2016 17:53:55 GMT\",\"dateUpdated\":\"Mon, 27 Jun 2016 17:53:55 GMT\",\"recordingId\":\"REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810\",\"accountId\":\"ACabe7063197551fe51671f9ac3a9708e9dad51c4d\",\"callId\":\"CF3cb8a52f461bcf64cbd3111d9492c3f61943eef9\",\"duration\":9},{\"uri\":\"/Accounts/ACabe7063197551fe51671f9ac3a9708e9dad51c4d/Recordings/RE9cae4798ca0803cbd52209c1bfe99d25027cc2cf\",\"revision\":1,\"dateCreated\":\"Mon, 27 Jun 2016 20:38:16 GMT\",\"dateUpdated\":\"Mon, 27 Jun 2016 20:38:16 GMT\",\"recordingId\":\"RE9cae4798ca0803cbd52209c1bfe99d25027cc2cf\",\"accountId\":\"ACabe7063197551fe51671f9ac3a9708e9dad51c4d\",\"callId\":\"CFa32e912be62fff5d0b1bcd99610a69281918800a\",\"duration\":9}]}"); RecordingList recordingList = recordingsRequester.getMeta(); Assert.IsNotNull(recordingList); Assert.AreEqual(recordingList.getLocalSize, 2); Assert.AreEqual((recordingList.export()).Count, 2); Recording recording = recordingList.get(0) as Recording; Assert.IsNotNull(recording); Assert.AreEqual(recording.getRecordingId, "REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810"); type = typeof(APIRequester); fieldInfo = type.GetField("persyUrl", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { fieldInfo.SetValue(recordingList, "http://GetRecordingListTest:3000"); } TestWebRequestCreate.MockHttpWebRequestWithGivenResponseCode(HttpStatusCode.OK, "{\"total\":3,\"start\":2,\"end\":2,\"page\":1,\"numPages\":2,\"pageSize\":2,\"nextPageUri\":null,\"recordings\":[{\"uri\":\"/Accounts/ACabe7063197551fe51671f9ac3a9708e9dad51c4d/Recordings/REb1eecfce410141ad1749c0fc84dfbb6fc4c2a815\",\"revision\":1,\"dateCreated\":\"Mon, 27 Jun 2016 17:53:55 GMT\",\"dateUpdated\":\"Mon, 27 Jun 2016 17:53:55 GMT\",\"recordingId\":\"REb1eecfce410141ad1749c0fc84dfbb6fc4c2a815\",\"accountId\":\"ACabe7063197551fe51671f9ac3a9708e9dad51c4d\",\"callId\":\"CF3cb8a52f461bcf64cbd3111d9492c3f61943eef9\",\"duration\":9}]}"); recordingList.loadNextPage(); Assert.IsNotNull(recordingList); Assert.AreEqual(recordingList.getLocalSize, 3); Assert.AreEqual((recordingList.export()).Count, 3); recording = recordingList.get(2) as Recording; Assert.IsNotNull(recording); Assert.AreEqual(recording.getRecordingId, "REb1eecfce410141ad1749c0fc84dfbb6fc4c2a815"); } catch (PersyException pe) { Assert.Fail(pe.Message); } }
/// <summary> /// This constructor allows one to create a PersyClient that authenticates /// with one set of credentials but acts as a second account (i.e. a sub /// account). /// </summary> /// <param name="credAccountId">The Account ID to use in your credentials for the Persephony API.</param> /// <param name="credAuthToken">The Auth Token to use in your credentials for the Persephony API. This should be the matching Auth Token to the credAccountId parameter.</param> /// <param name="accountId">The Account ID of the account you want to act as. This should either be the same Account ID ass credAccountId or the id of a sub-account to the credAccountId's account.</param> /// <exception cref="PersyException">Thrown upon failed request.</exception> public PersyClient(string credAccountId, string credAuthToken, string accountId) { this.credAccountId = credAccountId; this.credAuthToken = credAuthToken; this.accountId = accountId; calls = new CallsRequester(credAccountId, credAuthToken, accountId); recordings = new RecordingsRequester(credAccountId, credAuthToken, accountId); conferences = new ConferencesRequester(credAccountId, credAuthToken, accountId); queues = new QueuesRequester(credAccountId, credAuthToken, accountId); applications = new ApplicationsRequester(credAccountId, credAuthToken, accountId); logs = new LogsRequester(credAccountId, credAuthToken, accountId); availablePhoneNumbers = new AvailablePhoneNumbersRequester(credAccountId, credAuthToken, accountId); incomingPhoneNumbers = new IncomingPhoneNumbersRequester(credAccountId, credAuthToken, accountId); callingNumbers = new CallingNumbersRequester(credAccountId, credAuthToken, accountId); accounts = new AccountsRequester(credAccountId, credAuthToken); }
public void GetRecordingListByCallIdTest() { try { RecordingsRequester recordingsRequester = new RecordingsRequester("AC736ca2078721a9a41fb47f07bf40d9e21cb304da", "8e3d1c1c519fc761856f8cc825bcfea94d8c58b5", "AC736ca2078721a9a41fb47f07bf40d9e21cb304da"); Type type = typeof(APIRequester); FieldInfo fieldInfo = type.GetField("persyUrl", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { fieldInfo.SetValue(recordingsRequester, "http://GetRecordingListTest:3000"); } WebRequest.RegisterPrefix("http://GetRecordingListTest:3000/Accounts/AC736ca2078721a9a41fb47f07bf40d9e21cb304da/Recordings?callId=CF3cb8a52f461bcf64cbd3111d9492c3f61943eef9", new TestWebRequestCreate()); TestWebRequestCreate.MockHttpWebRequestWithGivenResponseCode(HttpStatusCode.OK, "{\"total\":1,\"start\":0,\"end\":0,\"page\":1,\"numPages\":1,\"pageSize\":20,\"nextPageUri\":null,\"recordings\":[{\"uri\":\"/Accounts/ACabe7063197551fe51671f9ac3a9708e9dad51c4d/Recordings/REb1eecfce410141ad1749c0fc84dfbb6fc4c2a815\",\"revision\":1,\"dateCreated\":\"Mon, 27 Jun 2016 17:53:55 GMT\",\"dateUpdated\":\"Mon, 27 Jun 2016 17:53:55 GMT\",\"recordingId\":\"REb1eecfce410141ad1749c0fc84dfbb6fc4c2a815\",\"accountId\":\"ACabe7063197551fe51671f9ac3a9708e9dad51c4d\",\"callId\":\"CF3cb8a52f461bcf64cbd3111d9492c3f61943eef9\",\"duration\":9}]}"); RecordingsSearchFilters filters = new RecordingsSearchFilters(); filters.setCallId("CF3cb8a52f461bcf64cbd3111d9492c3f61943eef9"); RecordingList recordingList = recordingsRequester.getMeta(filters); Assert.IsNotNull(recordingList); Assert.AreEqual(recordingList.getLocalSize, 1); Assert.AreEqual((recordingList.export()).Count, 1); Recording recording = recordingList.get(0) as Recording; Assert.IsNotNull(recording); Assert.AreEqual(recording.getRecordingId, "REb1eecfce410141ad1749c0fc84dfbb6fc4c2a815"); } catch (PersyException pe) { Assert.Fail(pe.Message); } }
public void DeleteRecordingTest() { try { RecordingsRequester recordingsRequester = new RecordingsRequester("ACabe7063197551fe51671f9ac3a9708e9dad51c4d", "204c15aae7a486c42776aea4dbafe8c68a773071", "ACabe7063197551fe51671f9ac3a9708e9dad51c4d"); Type type = typeof(APIRequester); FieldInfo fieldInfo = type.GetField("persyUrl", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { fieldInfo.SetValue(recordingsRequester, "http://DeleteRecordingTest:3000"); } WebRequest.RegisterPrefix("http://DeleteRecordingTest:3000", new TestWebRequestCreate()); TestWebRequestCreate.MockHttpWebRequestWithGivenResponseCode(HttpStatusCode.OK); recordingsRequester.delete("REb1eecfce410141ad1749c0fc84dfbb6fc4c2a810"); } catch (PersyException pe) { Assert.Fail(pe.Message); } }