Skip to content

Commit 35cf08c

Browse files
committed
Enrich getRecordings response with new properties
1 parent 8dc24c3 commit 35cf08c

3 files changed

Lines changed: 38 additions & 11 deletions

File tree

src/Core/Record.php

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ class Record
2929

3030
private string $recordId;
3131
private string $meetingId;
32+
private string $internalMeetingID;
3233
private string $name;
3334
private bool $isPublished;
3435
private string $state;
36+
private int $participants;
37+
private int $rawSize;
3538
private float $startTime;
3639
private float $endTime;
3740

@@ -57,17 +60,20 @@ class Record
5760

5861
public function __construct(\SimpleXMLElement $xml)
5962
{
60-
$this->rawXml = $xml;
61-
$this->recordId = $xml->recordID->__toString();
62-
$this->meetingId = $xml->meetingID->__toString();
63-
$this->name = $xml->name->__toString();
64-
$this->isPublished = 'true' === $xml->published->__toString();
65-
$this->state = $xml->state->__toString();
66-
$this->startTime = (float) $xml->startTime->__toString();
67-
$this->endTime = (float) $xml->endTime->__toString();
68-
$this->playbackType = $xml->playback->format->type->__toString();
69-
$this->playbackUrl = $xml->playback->format->url->__toString();
70-
$this->playbackLength = (int) $xml->playback->format->length->__toString();
63+
$this->rawXml = $xml;
64+
$this->recordId = $xml->recordID->__toString();
65+
$this->meetingId = $xml->meetingID->__toString();
66+
$this->internalMeetingID = $xml->internalMeetingID->__toString();
67+
$this->name = $xml->name->__toString();
68+
$this->isPublished = 'true' === $xml->published->__toString();
69+
$this->state = $xml->state->__toString();
70+
$this->startTime = (float) $xml->startTime->__toString();
71+
$this->endTime = (float) $xml->endTime->__toString();
72+
$this->participants = (int) $xml->participants->__toString();
73+
$this->rawSize = (int) $xml->rawSize->__toString();
74+
$this->playbackType = $xml->playback->format->type->__toString();
75+
$this->playbackUrl = $xml->playback->format->url->__toString();
76+
$this->playbackLength = (int) $xml->playback->format->length->__toString();
7177

7278
foreach ($xml->metadata->children() as $meta) {
7379
$this->metas[$meta->getName()] = $meta->__toString();
@@ -84,6 +90,11 @@ public function getMeetingId(): string
8490
return $this->meetingId;
8591
}
8692

93+
public function getInternalMeetingID(): string
94+
{
95+
return $this->internalMeetingID;
96+
}
97+
8798
public function getName(): string
8899
{
89100
return $this->name;
@@ -109,6 +120,16 @@ public function getEndTime(): float
109120
return $this->endTime;
110121
}
111122

123+
public function getParticipants(): float
124+
{
125+
return $this->participants;
126+
}
127+
128+
public function getRawSize(): float
129+
{
130+
return $this->rawSize;
131+
}
132+
112133
/**
113134
* @deprecated
114135
*/

tests/Responses/GetRecordingsResponseTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ public function testGetRecordingResponseContent(): void
5151

5252
$this->assertEquals('9d287cf50490ca856ca5273bd303a7e321df6051-4-119[0]', $aRecord->getMeetingId());
5353
$this->assertEquals('f71d810b6e90a4a34ae02b8c7143e8733178578e-1462980100026', $aRecord->getRecordId());
54+
$this->assertEquals('f71d810b6e90a4a34ae02b8c7143e8733178578e-1462980100026', $aRecord->getInternalMeetingID());
5455
$this->assertEquals('SAT- Writing Section- Social Science and History (All participants)', $aRecord->getName());
5556
$this->assertTrue($aRecord->isPublished());
5657
$this->assertEquals('published', $aRecord->getState());
5758
$this->assertEquals(1462980100026, $aRecord->getStartTime());
5859
$this->assertEquals(1462986640649, $aRecord->getEndTime());
60+
$this->assertEquals(6, $aRecord->getParticipants());
61+
$this->assertEquals(7219530, $aRecord->getRawSize());
5962
$this->assertEquals('presentation', $aRecord->getPlaybackType());
6063
$this->assertEquals('https://test-install.blindsidenetworks.com/playback/presentation/0.9.0/playback.html?meetingId=f71d810b6e90a4a34ae02b8c7143e8733178578e-1462980100026', $aRecord->getPlaybackUrl());
6164
$this->assertEquals(86, $aRecord->getPlaybackLength());

tests/fixtures/responses/get_recordings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,14 @@
128128
<recording>
129129
<recordID>f71d810b6e90a4a34ae02b8c7143e8733178578e-1462980100026</recordID>
130130
<meetingID>9d287cf50490ca856ca5273bd303a7e321df6051-4-119[0]</meetingID>
131+
<internalMeetingID>f71d810b6e90a4a34ae02b8c7143e8733178578e-1462980100026</internalMeetingID>
131132
<name><![CDATA[SAT- Writing Section- Social Science and History (All participants)]]></name>
132133
<published>true</published>
133134
<state>published</state>
134135
<startTime>1462980100026</startTime>
135136
<endTime>1462986640649</endTime>
137+
<participants>6</participants>
138+
<rawSize>7219530</rawSize>
136139
<metadata>
137140
<bbb-context><![CDATA[SAT Score Booster Program-Main]]></bbb-context>
138141
<bbb-origin-version><![CDATA[2.7.7+ (Build: 20150319)]]></bbb-origin-version>

0 commit comments

Comments
 (0)