Skip to content

Commit 4c041ef

Browse files
committed
Work in progress for recordin text tracks API.
1 parent 8b58303 commit 4c041ef

9 files changed

+396
-15
lines changed

src/BigBlueButton.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use BigBlueButton\Parameters\EndMeetingParameters;
2525
use BigBlueButton\Parameters\GetMeetingInfoParameters;
2626
use BigBlueButton\Parameters\GetRecordingsParameters;
27+
use BigBlueButton\Parameters\GetRecordingTextTracksParameters;
2728
use BigBlueButton\Parameters\IsMeetingRunningParameters;
2829
use BigBlueButton\Parameters\JoinMeetingParameters;
2930
use BigBlueButton\Parameters\PublishRecordingsParameters;
@@ -351,6 +352,27 @@ public function updateRecordings($recordingParams)
351352
return new UpdateRecordingsResponse($xml);
352353
}
353354

355+
/**
356+
* @param $getRecordingTextTracksParams GetRecordingTextTracksParameters
357+
* @return string
358+
*/
359+
public function getRecordingTextTracksUrl($getRecordingTextTracksParams)
360+
{
361+
return $this->urlBuilder->buildUrl(ApiMethod::GET_RECORDING_TEXT_TRACKS, $getRecordingTextTracksParams->getHTTPQuery());
362+
}
363+
364+
/**
365+
* @param $getRecordingTextTracksParams GetRecordingTextTracksParameters
366+
* @return GetRecordingTextTracksResponse
367+
* @throws \RuntimeException
368+
*/
369+
public function getRecordingTextTracks($getRecordingTextTracksParams)
370+
{
371+
$xml = $this->processXmlResponse($this->getRecordingTextTracksUrl($getRecordingTextTracksParams));
372+
373+
return new GetRecordingTextTracksResponse($xml);
374+
}
375+
354376
/* ____________________ SPECIAL METHODS ___________________ */
355377
/**
356378
* @return string

src/Core/ApiMethod.php

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@
2020

2121
abstract class ApiMethod
2222
{
23-
const CREATE = 'create';
24-
const JOIN = 'join';
25-
const ENTER = 'enter';
26-
const END = 'end';
27-
const IS_MEETING_RUNNING = 'isMeetingRunning';
28-
const GET_MEETING_INFO = 'getMeetingInfo';
29-
const GET_MEETINGS = 'getMeetings';
30-
const GET_DEFAULT_CONFIG_XML = 'getDefaultConfigXML';
31-
const SET_CONFIG_XML = 'setConfigXML';
32-
const CONFIG_XML = 'configXML';
33-
const SIGN_OUT = 'signOut';
34-
const GET_RECORDINGS = 'getRecordings';
35-
const PUBLISH_RECORDINGS = 'publishRecordings';
36-
const DELETE_RECORDINGS = 'deleteRecordings';
37-
const UPDATE_RECORDINGS = 'updateRecordings';
23+
const CREATE = 'create';
24+
const JOIN = 'join';
25+
const ENTER = 'enter';
26+
const END = 'end';
27+
const IS_MEETING_RUNNING = 'isMeetingRunning';
28+
const GET_MEETING_INFO = 'getMeetingInfo';
29+
const GET_MEETINGS = 'getMeetings';
30+
const GET_DEFAULT_CONFIG_XML = 'getDefaultConfigXML';
31+
const SET_CONFIG_XML = 'setConfigXML';
32+
const CONFIG_XML = 'configXML';
33+
const SIGN_OUT = 'signOut';
34+
const GET_RECORDINGS = 'getRecordings';
35+
const PUBLISH_RECORDINGS = 'publishRecordings';
36+
const DELETE_RECORDINGS = 'deleteRecordings';
37+
const UPDATE_RECORDINGS = 'updateRecordings';
38+
const GET_RECORDING_TEXT_TRACKS = 'getRecordingTextTracks';
39+
const PUT_RECORDING_TEXT_TRACKS = 'putRecordingTextTrack';
3840
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4+
*
5+
* Copyright (c) 2016-2019 BigBlueButton Inc. and by respective authors (see below).
6+
*
7+
* This program is free software; you can redistribute it and/or modify it under the
8+
* terms of the GNU Lesser General Public License as published by the Free Software
9+
* Foundation; either version 3.0 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License along
17+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace BigBlueButton\Parameters;
20+
21+
/**
22+
* Class GetRecordingTextTracksParameters
23+
* @package BigBlueButton\Parameters
24+
*/
25+
class GetRecordingTextTracksParameters extends MetaParameters
26+
{
27+
28+
/**
29+
* @var string
30+
*/
31+
private $recordId;
32+
33+
/**
34+
* GetRecordingTextTracksParameters constructor.
35+
*
36+
* @param $recordId
37+
*/
38+
public function __construct($recordId)
39+
{
40+
$this->recordId = $recordId;
41+
}
42+
43+
/**
44+
* @return string
45+
*/
46+
public function getRecordId()
47+
{
48+
return $this->recordId;
49+
}
50+
51+
/**
52+
* @param string $recordId
53+
* @return GetRecordingTextTracksParameters
54+
*/
55+
public function setRecordId($recordId)
56+
{
57+
$this->recordId = $recordId;
58+
59+
return $this;
60+
}
61+
62+
/**
63+
* @return string
64+
*/
65+
public function getHTTPQuery()
66+
{
67+
$queries = [
68+
'recordID' => $this->recordId,
69+
];
70+
71+
$this->buildMeta($queries);
72+
73+
return $this->buildHTTPQuery($queries);
74+
}
75+
}
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
<?php
2+
/**
3+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4+
*
5+
* Copyright (c) 2016-2019 BigBlueButton Inc. and by respective authors (see below).
6+
*
7+
* This program is free software; you can redistribute it and/or modify it under the
8+
* terms of the GNU Lesser General Public License as published by the Free Software
9+
* Foundation; either version 3.0 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License along
17+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace BigBlueButton\Parameters;
20+
21+
/**
22+
* Class PutRecordingTextTracksParameters
23+
* @package BigBlueButton\Parameters
24+
*/
25+
class PutRecordingTextTracksParameters extends MetaParameters
26+
{
27+
28+
/**
29+
* @var string
30+
*/
31+
private $recordId;
32+
33+
/**
34+
* @var string
35+
*/
36+
private $kind;
37+
38+
/**
39+
* @var string
40+
*/
41+
private $lang;
42+
43+
/**
44+
* @var string
45+
*/
46+
private $label;
47+
48+
/**
49+
* PutRecordingTextTracksParameters constructor.
50+
*
51+
* @param $recordId
52+
*/
53+
public function __construct($recordId)
54+
{
55+
$this->recordId = $recordId;
56+
}
57+
58+
/**
59+
* @return string
60+
*/
61+
public function getRecordId()
62+
{
63+
return $this->recordId;
64+
}
65+
66+
/**
67+
* @param string $recordId
68+
* @return PutRecordingTextTracksParameters
69+
*/
70+
public function setRecordId($recordId)
71+
{
72+
$this->recordId = $recordId;
73+
74+
return $this;
75+
}
76+
77+
/**
78+
* @return string
79+
*/
80+
public function getKind()
81+
{
82+
return $this->kind;
83+
}
84+
85+
/**
86+
* @param string $kind
87+
* @return PutRecordingTextTracksParameters
88+
*/
89+
public function setKind($kind)
90+
{
91+
$this->kind = $kind;
92+
93+
return $this;
94+
}
95+
96+
/**
97+
* @return string
98+
*/
99+
public function getLang()
100+
{
101+
return $this->lang;
102+
}
103+
104+
/**
105+
* @param string $lang
106+
* @return PutRecordingTextTracksParameters
107+
*/
108+
public function setLang($lang)
109+
{
110+
$this->lang = $lang;
111+
112+
return $this;
113+
}
114+
115+
/**
116+
* @return string
117+
*/
118+
public function getLabel()
119+
{
120+
return $this->label;
121+
}
122+
123+
/**
124+
* @param string $label
125+
* @return PutRecordingTextTracksParameters
126+
*/
127+
public function setLabel($label)
128+
{
129+
$this->label = $label;
130+
131+
return $this;
132+
}
133+
134+
/**
135+
* @return string
136+
*/
137+
public function getHTTPQuery()
138+
{
139+
$queries = [
140+
'recordID' => $this->recordId,
141+
];
142+
143+
$this->buildMeta($queries);
144+
145+
return $this->buildHTTPQuery($queries);
146+
}
147+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4+
*
5+
* Copyright (c) 2016-2018 BigBlueButton Inc. and by respective authors (see below).
6+
*
7+
* This program is free software; you can redistribute it and/or modify it under the
8+
* terms of the GNU Lesser General Public License as published by the Free Software
9+
* Foundation; either version 3.0 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License along
17+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace BigBlueButton\Responses;
20+
21+
/**
22+
* Class GetRecordingTextTracksResponse
23+
* @package BigBlueButton\Responses
24+
*/
25+
class GetRecordingTextTracksResponse extends BaseResponse
26+
{
27+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
/**
4+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5+
*
6+
* Copyright (c) 2016-2019 BigBlueButton Inc. and by respective authors (see below).
7+
*
8+
* This program is free software; you can redistribute it and/or modify it under the
9+
* terms of the GNU Lesser General Public License as published by the Free Software
10+
* Foundation; either version 3.0 of the License, or (at your option) any later
11+
* version.
12+
*
13+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
14+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License along
18+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
namespace BigBlueButton\Parameters;
21+
22+
use BigBlueButton\TestCase;
23+
24+
class GetRecordingTextTracksParametersTest extends TestCase
25+
{
26+
public function testGetRecordingTextTracksParameters()
27+
{
28+
$getRecordingTextTracksParams = new GetRecordingTextTracksParameters($recordId = $this->faker->uuid);
29+
30+
$this->assertEquals($recordId, $getRecordingTextTracksParams->getRecordId());
31+
32+
// Test setters that are ignored by the constructor
33+
$getRecordingTextTracksParams->setRecordId($newRecordId = $this->faker->uuid);
34+
$this->assertEquals($newRecordId, $getRecordingTextTracksParams->getRecordId());
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
/**
4+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5+
*
6+
* Copyright (c) 2016-2019 BigBlueButton Inc. and by respective authors (see below).
7+
*
8+
* This program is free software; you can redistribute it and/or modify it under the
9+
* terms of the GNU Lesser General Public License as published by the Free Software
10+
* Foundation; either version 3.0 of the License, or (at your option) any later
11+
* version.
12+
*
13+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
14+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License along
18+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
namespace BigBlueButton\Parameters;
21+
22+
use BigBlueButton\TestCase;
23+
24+
class PutRecordingTextTracksParametersTest extends TestCase
25+
{
26+
public function testPutRecordingTextTracksParameters()
27+
{
28+
$getRecordingTextTracksParams = new PutRecordingTextTracksParameters($recordId = $this->faker->uuid);
29+
30+
$this->assertEquals($recordId, $getRecordingTextTracksParams->getRecordId());
31+
32+
// Test setters that are ignored by the constructor
33+
$getRecordingTextTracksParams->setRecordId($newRecordId = $this->faker->uuid);
34+
$this->assertEquals($newRecordId, $getRecordingTextTracksParams->getRecordId());
35+
}
36+
}

0 commit comments

Comments
 (0)