Skip to content

Commit

Permalink
Release Library 5.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jingming committed May 23, 2017
1 parent 28d2e9c commit 6749f4c
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 40 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
twilio-php Changelog
====================

[2017-05-22] Version 5.9.1
--------------------------
- Rename `Recordings` to `RoomRecordings` in Twilio Video

[2017-05-19] Version 5.9.0
--------------------------
- Add support for video.twilio.com.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
use Twilio\Values;
use Twilio\Version;

class RecordingContext extends InstanceContext {
class RoomRecordingContext extends InstanceContext {
/**
* Initialize the RecordingContext
* Initialize the RoomRecordingContext
*
* @param \Twilio\Version $version Version that contains the resource
* @param string $roomSid The room_sid
* @param string $sid The sid
* @return \Twilio\Rest\Video\V1\Room\RecordingContext
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingContext
*/
public function __construct(Version $version, $roomSid, $sid) {
parent::__construct($version);
Expand All @@ -35,9 +35,9 @@ public function __construct(Version $version, $roomSid, $sid) {
}

/**
* Fetch a RecordingInstance
* Fetch a RoomRecordingInstance
*
* @return RecordingInstance Fetched RecordingInstance
* @return RoomRecordingInstance Fetched RoomRecordingInstance
*/
public function fetch() {
$params = Values::of(array());
Expand All @@ -48,7 +48,7 @@ public function fetch() {
$params
);

return new RecordingInstance(
return new RoomRecordingInstance(
$this->version,
$payload,
$this->solution['roomSid'],
Expand All @@ -66,6 +66,6 @@ public function __toString() {
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RecordingContext ' . implode(' ', $context) . ']';
return '[Twilio.Video.V1.RoomRecordingContext ' . implode(' ', $context) . ']';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
* @property string url
* @property array links
*/
class RecordingInstance extends InstanceResource {
class RoomRecordingInstance extends InstanceResource {
/**
* Initialize the RecordingInstance
* Initialize the RoomRecordingInstance
*
* @param \Twilio\Version $version Version that contains the resource
* @param mixed[] $payload The response payload
* @param string $roomSid The room_sid
* @param string $sid The sid
* @return \Twilio\Rest\Video\V1\Room\RecordingInstance
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingInstance
*/
public function __construct(Version $version, array $payload, $roomSid, $sid = null) {
parent::__construct($version);
Expand Down Expand Up @@ -72,12 +72,12 @@ public function __construct(Version $version, array $payload, $roomSid, $sid = n
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
* @return \Twilio\Rest\Video\V1\Room\RecordingContext Context for this
* RecordingInstance
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingContext Context for this
* RoomRecordingInstance
*/
protected function proxy() {
if (!$this->context) {
$this->context = new RecordingContext(
$this->context = new RoomRecordingContext(
$this->version,
$this->solution['roomSid'],
$this->solution['sid']
Expand All @@ -88,9 +88,9 @@ protected function proxy() {
}

/**
* Fetch a RecordingInstance
* Fetch a RoomRecordingInstance
*
* @return RecordingInstance Fetched RecordingInstance
* @return RoomRecordingInstance Fetched RoomRecordingInstance
*/
public function fetch() {
return $this->proxy()->fetch();
Expand Down Expand Up @@ -126,6 +126,6 @@ public function __toString() {
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RecordingInstance ' . implode(' ', $context) . ']';
return '[Twilio.Video.V1.RoomRecordingInstance ' . implode(' ', $context) . ']';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
use Twilio\Values;
use Twilio\Version;

class RecordingList extends ListResource {
class RoomRecordingList extends ListResource {
/**
* Construct the RecordingList
* Construct the RoomRecordingList
*
* @param Version $version Version that contains the resource
* @param string $roomSid The room_sid
* @return \Twilio\Rest\Video\V1\Room\RecordingList
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingList
*/
public function __construct(Version $version, $roomSid) {
parent::__construct($version);
Expand All @@ -33,7 +33,7 @@ public function __construct(Version $version, $roomSid) {
}

/**
* Streams RecordingInstance records from the API as a generator stream.
* Streams RoomRecordingInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
Expand All @@ -59,7 +59,7 @@ public function stream($limit = null, $pageSize = null) {
}

/**
* Reads RecordingInstance records from the API as a list.
* Reads RoomRecordingInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
* memory before returning.
*
Expand All @@ -71,20 +71,20 @@ public function stream($limit = null, $pageSize = null) {
* page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
* @return RecordingInstance[] Array of results
* @return RoomRecordingInstance[] Array of results
*/
public function read($limit = null, $pageSize = null) {
return iterator_to_array($this->stream($limit, $pageSize), false);
}

/**
* Retrieve a single page of RecordingInstance records from the API.
* Retrieve a single page of RoomRecordingInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
* @return \Twilio\Page Page of RecordingInstance
* @return \Twilio\Page Page of RoomRecordingInstance
*/
public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE) {
$params = Values::of(array(
Expand All @@ -99,17 +99,17 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
$params
);

return new RecordingPage($this->version, $response, $this->solution);
return new RoomRecordingPage($this->version, $response, $this->solution);
}

/**
* Constructs a RecordingContext
* Constructs a RoomRecordingContext
*
* @param string $sid The sid
* @return \Twilio\Rest\Video\V1\Room\RecordingContext
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingContext
*/
public function getContext($sid) {
return new RecordingContext(
return new RoomRecordingContext(
$this->version,
$this->solution['roomSid'],
$sid
Expand All @@ -122,6 +122,6 @@ public function getContext($sid) {
* @return string Machine friendly representation
*/
public function __toString() {
return '[Twilio.Video.V1.RecordingList]';
return '[Twilio.Video.V1.RoomRecordingList]';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

use Twilio\Page;

class RecordingPage extends Page {
class RoomRecordingPage extends Page {
public function __construct($version, $response, $solution) {
parent::__construct($version, $response);

Expand All @@ -20,7 +20,7 @@ public function __construct($version, $response, $solution) {
}

public function buildInstance(array $payload) {
return new RecordingInstance(
return new RoomRecordingInstance(
$this->version,
$payload,
$this->solution['roomSid']
Expand All @@ -33,6 +33,6 @@ public function buildInstance(array $payload) {
* @return string Machine friendly representation
*/
public function __toString() {
return '[Twilio.Video.V1.RecordingPage]';
return '[Twilio.Video.V1.RoomRecordingPage]';
}
}
10 changes: 5 additions & 5 deletions Twilio/Rest/Video/V1/RoomContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

use Twilio\Exceptions\TwilioException;
use Twilio\InstanceContext;
use Twilio\Rest\Video\V1\Room\RecordingList;
use Twilio\Rest\Video\V1\Room\RoomRecordingList;
use Twilio\Values;
use Twilio\Version;

/**
* @property \Twilio\Rest\Video\V1\Room\RecordingList recordings
* @method \Twilio\Rest\Video\V1\Room\RecordingContext recordings(string $sid)
* @property \Twilio\Rest\Video\V1\Room\RoomRecordingList recordings
* @method \Twilio\Rest\Video\V1\Room\RoomRecordingContext recordings(string $sid)
*/
class RoomContext extends InstanceContext {
protected $_recordings = null;
Expand Down Expand Up @@ -89,11 +89,11 @@ public function update($status) {
/**
* Access the recordings
*
* @return \Twilio\Rest\Video\V1\Room\RecordingList
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingList
*/
protected function getRecordings() {
if (!$this->_recordings) {
$this->_recordings = new RecordingList(
$this->_recordings = new RoomRecordingList(
$this->version,
$this->solution['sid']
);
Expand Down
2 changes: 1 addition & 1 deletion Twilio/Rest/Video/V1/RoomInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function update($status) {
/**
* Access the recordings
*
* @return \Twilio\Rest\Video\V1\Room\RecordingList
* @return \Twilio\Rest\Video\V1\Room\RoomRecordingList
*/
protected function getRecordings() {
return $this->proxy()->recordings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Twilio\Tests\HolodeckTestCase;
use Twilio\Tests\Request;

class RecordingTest extends HolodeckTestCase {
class RoomRecordingTest extends HolodeckTestCase {
public function testFetchRequest() {
$this->holodeck->mock(new Response(500, ''));

Expand Down
2 changes: 1 addition & 1 deletion Twilio/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class VersionInfo {
const MAJOR = 5;
const MINOR = 9;
const PATCH = 0;
const PATCH = 1;

public static function string() {
return implode('.', array(self::MAJOR, self::MINOR, self::PATCH));
Expand Down

0 comments on commit 6749f4c

Please sign in to comment.