Skip to content

Commit 7f48e42

Browse files
authored
SWI-8402 Add New StartStream Attributes (#157)
1 parent 1d8f756 commit 7f48e42

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/Bandwidth.Standard.Test/Unit/Model/Bxml/TestStartStream.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class TestStartStream
1111
[Fact]
1212
public void StartStreamTest()
1313
{
14-
var expected = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Response> <StartStream name=\"test\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"wss://test.url/\" streamEventUrl=\"https://test.url/\" streamEventMethod=\"POST\" username=\"username\" password=\"password\"> <StreamParam name=\"testName\" value=\"testValue\" /> </StartStream></Response>";
14+
var expected = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Response> <StartStream name=\"test\" mode=\"unidirectional\" tracks=\"inbound\" destination=\"wss://test.url/\" destinationUsername=\"destinationUsername\" destinationPassword=\"destinationPassword\" streamEventUrl=\"https://test.url/\" streamEventMethod=\"POST\" username=\"username\" password=\"password\"> <StreamParam name=\"testName\" value=\"testValue\" /> </StartStream></Response>";
1515

1616
var streamParam = new StreamParam();
1717
streamParam.Name = "testName";
@@ -22,6 +22,8 @@ public void StartStreamTest()
2222
startStream.Mode = "unidirectional";
2323
startStream.Tracks = "inbound";
2424
startStream.Destination = "wss://test.url/";
25+
startStream.DestinationUsername = "destinationUsername";
26+
startStream.DestinationPassword = "destinationPassword";
2527
startStream.StreamEventUrl = "https://test.url/";
2628
startStream.StreamEventMethod = "POST";
2729
startStream.Username = "username";

src/Bandwidth.Standard/Model/Bxml/Verbs/StartStream.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,23 @@ public StartStream()
3737
public string Tracks { get; set; }
3838

3939
/// <summary>
40-
/// A websocket URI to send the stream to.
40+
/// A websocket URI to send the stream to.
4141
/// </summary>
4242
[XmlAttribute("destination")]
4343
public string Destination { get; set; }
4444

45+
/// <summary>
46+
/// The username to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
47+
/// </summary>
48+
[XmlAttribute("destinationUsername")]
49+
public string DestinationUsername { get; set; }
50+
51+
/// <summary>
52+
/// The password to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
53+
/// </summary>
54+
[XmlAttribute("destinationPassword")]
55+
public string DestinationPassword { get; set; }
56+
4557
/// <summary>
4658
/// URL to send the associated Webhook events to during this stream's lifetime.
4759
/// </summary>

0 commit comments

Comments
 (0)