Video.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php
  2. /**
  3. * This code was generated by
  4. * \ / _ _ _| _ _
  5. * | (_)\/(_)(_|\/| |(/_ v1.0.0
  6. * / /
  7. */
  8. namespace Twilio\Rest;
  9. use Twilio\Domain;
  10. use Twilio\Exceptions\TwilioException;
  11. use Twilio\Rest\Video\V1;
  12. /**
  13. * @property \Twilio\Rest\Video\V1 v1
  14. * @property \Twilio\Rest\Video\V1\CompositionSettingsList compositionSettings
  15. * @property \Twilio\Rest\Video\V1\RecordingList recordings
  16. * @property \Twilio\Rest\Video\V1\RecordingSettingsList recordingSettings
  17. * @property \Twilio\Rest\Video\V1\CompositionList compositions
  18. * @property \Twilio\Rest\Video\V1\RoomList rooms
  19. * @method \Twilio\Rest\Video\V1\CompositionSettingsContext compositionSettings()
  20. * @method \Twilio\Rest\Video\V1\RecordingContext recordings(string $sid)
  21. * @method \Twilio\Rest\Video\V1\RecordingSettingsContext recordingSettings()
  22. * @method \Twilio\Rest\Video\V1\CompositionContext compositions(string $sid)
  23. * @method \Twilio\Rest\Video\V1\RoomContext rooms(string $sid)
  24. */
  25. class Video extends Domain {
  26. protected $_v1 = null;
  27. /**
  28. * Construct the Video Domain
  29. *
  30. * @param \Twilio\Rest\Client $client Twilio\Rest\Client to communicate with
  31. * Twilio
  32. * @return \Twilio\Rest\Video Domain for Video
  33. */
  34. public function __construct(Client $client) {
  35. parent::__construct($client);
  36. $this->baseUrl = 'https://video.twilio.com';
  37. }
  38. /**
  39. * @return \Twilio\Rest\Video\V1 Version v1 of video
  40. */
  41. protected function getV1() {
  42. if (!$this->_v1) {
  43. $this->_v1 = new V1($this);
  44. }
  45. return $this->_v1;
  46. }
  47. /**
  48. * Magic getter to lazy load version
  49. *
  50. * @param string $name Version to return
  51. * @return \Twilio\Version The requested version
  52. * @throws \Twilio\Exceptions\TwilioException For unknown versions
  53. */
  54. public function __get($name) {
  55. $method = 'get' . ucfirst($name);
  56. if (method_exists($this, $method)) {
  57. return $this->$method();
  58. }
  59. throw new TwilioException('Unknown version ' . $name);
  60. }
  61. /**
  62. * Magic caller to get resource contexts
  63. *
  64. * @param string $name Resource to return
  65. * @param array $arguments Context parameters
  66. * @return \Twilio\InstanceContext The requested resource context
  67. * @throws \Twilio\Exceptions\TwilioException For unknown resource
  68. */
  69. public function __call($name, $arguments) {
  70. $method = 'context' . ucfirst($name);
  71. if (method_exists($this, $method)) {
  72. return call_user_func_array(array($this, $method), $arguments);
  73. }
  74. throw new TwilioException('Unknown context ' . $name);
  75. }
  76. /**
  77. * @return \Twilio\Rest\Video\V1\CompositionSettingsList
  78. */
  79. protected function getCompositionSettings() {
  80. return $this->v1->compositionSettings;
  81. }
  82. /**
  83. * @return \Twilio\Rest\Video\V1\CompositionSettingsContext
  84. */
  85. protected function contextCompositionSettings() {
  86. return $this->v1->compositionSettings();
  87. }
  88. /**
  89. * @return \Twilio\Rest\Video\V1\RecordingList
  90. */
  91. protected function getRecordings() {
  92. return $this->v1->recordings;
  93. }
  94. /**
  95. * @param string $sid The Recording Sid that uniquely identifies the Recording
  96. * to fetch.
  97. * @return \Twilio\Rest\Video\V1\RecordingContext
  98. */
  99. protected function contextRecordings($sid) {
  100. return $this->v1->recordings($sid);
  101. }
  102. /**
  103. * @return \Twilio\Rest\Video\V1\RecordingSettingsList
  104. */
  105. protected function getRecordingSettings() {
  106. return $this->v1->recordingSettings;
  107. }
  108. /**
  109. * @return \Twilio\Rest\Video\V1\RecordingSettingsContext
  110. */
  111. protected function contextRecordingSettings() {
  112. return $this->v1->recordingSettings();
  113. }
  114. /**
  115. * @return \Twilio\Rest\Video\V1\CompositionList
  116. */
  117. protected function getCompositions() {
  118. return $this->v1->compositions;
  119. }
  120. /**
  121. * @param string $sid The Composition Sid that uniquely identifies the
  122. * Composition to fetch.
  123. * @return \Twilio\Rest\Video\V1\CompositionContext
  124. */
  125. protected function contextCompositions($sid) {
  126. return $this->v1->compositions($sid);
  127. }
  128. /**
  129. * @return \Twilio\Rest\Video\V1\RoomList
  130. */
  131. protected function getRooms() {
  132. return $this->v1->rooms;
  133. }
  134. /**
  135. * @param string $sid The sid
  136. * @return \Twilio\Rest\Video\V1\RoomContext
  137. */
  138. protected function contextRooms($sid) {
  139. return $this->v1->rooms($sid);
  140. }
  141. /**
  142. * Provide a friendly representation
  143. *
  144. * @return string Machine friendly representation
  145. */
  146. public function __toString() {
  147. return '[Twilio.Video]';
  148. }
  149. }