@@ -19,7 +19,8 @@ composer require bandwidth/sdk
1919
2020### Initialize
2121
22- ```
22+ ``` php
23+
2324require "vendor/autoload.php";
2425
2526$config = new BandwidthLib\Configuration(
@@ -40,7 +41,8 @@ $accountId = "12345";
4041
4142### Create A Phone Call
4243
43- ```
44+ ``` php
45+
4446$voiceClient = $client->getVoice()->getClient();
4547
4648$body = new BandwidthLib\Voice\Models\CreateCallRequest();
5961
6062### Send A Text Message
6163
62- ```
64+ ``` php
65+
6366$messagingClient = $client->getMessaging()->getClient();
6467
6568$body = new BandwidthLib\Messaging\Models\MessageRequest();
7881
7982### Create BXML
8083
81- ```
84+ ``` php
85+
8286$speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence("Hello!");
8387$speakSentence->voice("susan");
8488$speakSentence->locale("en_US");
@@ -90,7 +94,8 @@ echo $response->toBxml();
9094
9195### Create A MFA Request
9296
93- ```
97+ ``` php
98+
9499$mfaClient = $client->getTwoFactorAuth()->getMFA();
95100
96101$body = new BandwidthLib\TwoFactorAuth\Models\TwoFactorCodeRequestSchema();
@@ -117,7 +122,8 @@ echo $response->getResult()->valid;
117122
118123### WebRtc Participant & Session Management
119124
120- ```
125+ ``` php
126+
121127$webRtcClient = $client->getWebRtc()->getClient();
122128
123129$createSessionBody = new BandwidthLib\WebRtc\Models\Session();
@@ -133,10 +139,13 @@ $createParticipantBody->publishPermissions = array(
133139 BandwidthLib\WebRtc\Models\PublishPermissionEnum::VIDEO
134140);
135141
142+ $body = new BandwidthLib\WebRtc\Models\Subscriptions();
143+ $body->sessionId = "1234-abcd";
144+
136145$createParticipantResponse = $webRtcClient->createParticipant($accountId, $createParticipantBody);
137146$participantId = $createParticipantResponse->getResult()->participant->id;
138147
139- $webRtcClient->addParticipantToSession($accountId, $sessionId, $participantId);
148+ $webRtcClient->addParticipantToSession($accountId, $sessionId, $participantId, $body );
140149```
141150
142151## Supported PHP Versions
0 commit comments