« blib/lib/SignalWire/REST/Namespaces/Logs.pm
↑ Summary
blib/lib/SignalWire/Skills/Builtin/InfoGatherer.pm »
| 1 | package SignalWire::REST::Namespaces::Video; | ||||||||||
| 2 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # --- VideoRooms --- | ||||||||||
| 7 | package SignalWire::REST::Namespaces::Video::Rooms; | ||||||||||
| 8 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 6 | extends 'SignalWire::REST::Namespaces::CrudResource'; | |||||||||
| 10 | 2 | ▶ | has '+_update_method' => ( default => sub { 'PUT' } ); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub list_streams { | ||||||||
|
Subroutine
list_streams: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 13 | 0 | my ($self, $room_id, %params) = @_; | |||||||||
| 14 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 0 | return $self->_http->get($self->_path($room_id, 'streams'), params => $p); | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | sub create_stream { | ||||||||
|
Subroutine
create_stream: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 19 | 0 | my ($self, $room_id, %kwargs) = @_; | |||||||||
| 20 | 0 | return $self->_http->post($self->_path($room_id, 'streams'), body => \%kwargs); | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | # --- VideoRoomTokens --- | ||||||||||
| 24 | package SignalWire::REST::Namespaces::Video::RoomTokens; | ||||||||||
| 25 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 6 | extends 'SignalWire::REST::Namespaces::Base'; | |||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub create { | ||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 29 | 0 | my ($self, %kwargs) = @_; | |||||||||
| 30 | 0 | return $self->_http->post($self->_base_path, body => \%kwargs); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | # --- VideoRoomSessions --- | ||||||||||
| 34 | package SignalWire::REST::Namespaces::Video::RoomSessions; | ||||||||||
| 35 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 36 | 6 | extends 'SignalWire::REST::Namespaces::Base'; | |||||||||
| 37 | |||||||||||
| 38 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 39 | 0 | my ($self, %params) = @_; | |||||||||
| 40 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | 0 | return $self->_http->get($self->_base_path, params => $p); | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 45 | 0 | my ($self, $session_id) = @_; | |||||||||
| 46 | 0 | return $self->_http->get($self->_path($session_id)); | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 0 | ▶ | sub list_events { | ||||||||
|
Subroutine
list_events: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 50 | 0 | my ($self, $session_id, %params) = @_; | |||||||||
| 51 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 52 | 0 | return $self->_http->get($self->_path($session_id, 'events'), params => $p); | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 0 | ▶ | sub list_members { | ||||||||
|
Subroutine
list_members: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 56 | 0 | my ($self, $session_id, %params) = @_; | |||||||||
| 57 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 58 | 0 | return $self->_http->get($self->_path($session_id, 'members'), params => $p); | |||||||||
| 59 | } | ||||||||||
| 60 | |||||||||||
| 61 | 0 | ▶ | sub list_recordings { | ||||||||
|
Subroutine
list_recordings: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 62 | 0 | my ($self, $session_id, %params) = @_; | |||||||||
| 63 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 64 | 0 | return $self->_http->get($self->_path($session_id, 'recordings'), params => $p); | |||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | # --- VideoRoomRecordings --- | ||||||||||
| 68 | package SignalWire::REST::Namespaces::Video::RoomRecordings; | ||||||||||
| 69 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 70 | 6 | extends 'SignalWire::REST::Namespaces::Base'; | |||||||||
| 71 | |||||||||||
| 72 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 73 | 0 | my ($self, %params) = @_; | |||||||||
| 74 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 75 | 0 | return $self->_http->get($self->_base_path, params => $p); | |||||||||
| 76 | } | ||||||||||
| 77 | |||||||||||
| 78 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 79 | 0 | my ($self, $recording_id) = @_; | |||||||||
| 80 | 0 | return $self->_http->get($self->_path($recording_id)); | |||||||||
| 81 | } | ||||||||||
| 82 | |||||||||||
| 83 | 0 | ▶ | sub delete_recording { | ||||||||
|
Subroutine
delete_recording: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 84 | 0 | my ($self, $recording_id) = @_; | |||||||||
| 85 | 0 | return $self->_http->delete_request($self->_path($recording_id)); | |||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | # Python parity alias. | ||||||||||
| 89 | 0 | ▶ | sub delete { | ||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 90 | 0 | my ($self, $recording_id) = @_; | |||||||||
| 91 | 0 | return $self->_http->delete_request($self->_path($recording_id)); | |||||||||
| 92 | } | ||||||||||
| 93 | |||||||||||
| 94 | 0 | ▶ | sub list_events { | ||||||||
|
Subroutine
list_events: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 95 | 0 | my ($self, $recording_id, %params) = @_; | |||||||||
| 96 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 97 | 0 | return $self->_http->get($self->_path($recording_id, 'events'), params => $p); | |||||||||
| 98 | } | ||||||||||
| 99 | |||||||||||
| 100 | # --- VideoConferences --- | ||||||||||
| 101 | package SignalWire::REST::Namespaces::Video::Conferences; | ||||||||||
| 102 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 103 | 6 | extends 'SignalWire::REST::Namespaces::CrudResource'; | |||||||||
| 104 | 2 | ▶ | has '+_update_method' => ( default => sub { 'PUT' } ); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 105 | |||||||||||
| 106 | 0 | ▶ | sub list_conference_tokens { | ||||||||
|
Subroutine
list_conference_tokens: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 107 | 0 | my ($self, $conference_id, %params) = @_; | |||||||||
| 108 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 109 | 0 | return $self->_http->get($self->_path($conference_id, 'conference_tokens'), params => $p); | |||||||||
| 110 | } | ||||||||||
| 111 | |||||||||||
| 112 | 0 | ▶ | sub list_streams { | ||||||||
|
Subroutine
list_streams: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 113 | 0 | my ($self, $conference_id, %params) = @_; | |||||||||
| 114 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 115 | 0 | return $self->_http->get($self->_path($conference_id, 'streams'), params => $p); | |||||||||
| 116 | } | ||||||||||
| 117 | |||||||||||
| 118 | 0 | ▶ | sub create_stream { | ||||||||
|
Subroutine
create_stream: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 119 | 0 | my ($self, $conference_id, %kwargs) = @_; | |||||||||
| 120 | 0 | return $self->_http->post($self->_path($conference_id, 'streams'), body => \%kwargs); | |||||||||
| 121 | } | ||||||||||
| 122 | |||||||||||
| 123 | # --- VideoConferenceTokens --- | ||||||||||
| 124 | package SignalWire::REST::Namespaces::Video::ConferenceTokens; | ||||||||||
| 125 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 126 | 6 | extends 'SignalWire::REST::Namespaces::Base'; | |||||||||
| 127 | |||||||||||
| 128 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 129 | 0 | my ($self, $token_id) = @_; | |||||||||
| 130 | 0 | return $self->_http->get($self->_path($token_id)); | |||||||||
| 131 | } | ||||||||||
| 132 | |||||||||||
| 133 | 0 | ▶ | sub reset { | ||||||||
|
Subroutine
reset: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 134 | 0 | my ($self, $token_id) = @_; | |||||||||
| 135 | 0 | return $self->_http->post($self->_path($token_id, 'reset')); | |||||||||
| 136 | } | ||||||||||
| 137 | |||||||||||
| 138 | # --- VideoStreams --- | ||||||||||
| 139 | package SignalWire::REST::Namespaces::Video::Streams; | ||||||||||
| 140 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 141 | 6 | extends 'SignalWire::REST::Namespaces::Base'; | |||||||||
| 142 | |||||||||||
| 143 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 144 | 0 | my ($self, $stream_id) = @_; | |||||||||
| 145 | 0 | return $self->_http->get($self->_path($stream_id)); | |||||||||
| 146 | } | ||||||||||
| 147 | |||||||||||
| 148 | 0 | ▶ | sub update { | ||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 149 | 0 | my ($self, $stream_id, %kwargs) = @_; | |||||||||
| 150 | 0 | return $self->_http->put($self->_path($stream_id), body => \%kwargs); | |||||||||
| 151 | } | ||||||||||
| 152 | |||||||||||
| 153 | 0 | ▶ | sub delete_stream { | ||||||||
|
Subroutine
delete_stream: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 154 | 0 | my ($self, $stream_id) = @_; | |||||||||
| 155 | 0 | return $self->_http->delete_request($self->_path($stream_id)); | |||||||||
| 156 | } | ||||||||||
| 157 | |||||||||||
| 158 | # Python parity alias. | ||||||||||
| 159 | 0 | ▶ | sub delete { | ||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 160 | 0 | my ($self, $stream_id) = @_; | |||||||||
| 161 | 0 | return $self->_http->delete_request($self->_path($stream_id)); | |||||||||
| 162 | } | ||||||||||
| 163 | |||||||||||
| 164 | # --- VideoNamespace --- | ||||||||||
| 165 | package SignalWire::REST::Namespaces::Video; | ||||||||||
| 166 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 167 | |||||||||||
| 168 | 6 | has '_http' => ( is => 'ro', required => 1 ); | |||||||||
| 169 | 6 | has 'rooms' => ( is => 'lazy' ); | |||||||||
| 170 | 6 | has 'room_tokens' => ( is => 'lazy' ); | |||||||||
| 171 | 6 | has 'room_sessions' => ( is => 'lazy' ); | |||||||||
| 172 | 6 | has 'room_recordings' => ( is => 'lazy' ); | |||||||||
| 173 | 6 | has 'conferences' => ( is => 'lazy' ); | |||||||||
| 174 | 6 | has 'conference_tokens' => ( is => 'lazy' ); | |||||||||
| 175 | 6 | has 'streams' => ( is => 'lazy' ); | |||||||||
| 176 | |||||||||||
| 177 | 6 | my $base = '/api/video'; | |||||||||
| 178 | |||||||||||
| 179 | 2 | ▶ | sub _build_rooms { SignalWire::REST::Namespaces::Video::Rooms->new(_http => $_[0]->_http, _base_path => "$base/rooms") } | ||||||||
|
Subroutine
_build_rooms: called CC=1 SCAR=0.0
| |||||||||||
| 180 | 2 | ▶ | sub _build_room_tokens { SignalWire::REST::Namespaces::Video::RoomTokens->new(_http => $_[0]->_http, _base_path => "$base/room_tokens") } | ||||||||
|
Subroutine
_build_room_tokens: called CC=1 SCAR=0.0
| |||||||||||
| 181 | 2 | ▶ | sub _build_room_sessions { SignalWire::REST::Namespaces::Video::RoomSessions->new(_http => $_[0]->_http, _base_path => "$base/room_sessions") } | ||||||||
|
Subroutine
_build_room_sessions: called CC=1 SCAR=0.0
| |||||||||||
| 182 | 2 | ▶ | sub _build_room_recordings { SignalWire::REST::Namespaces::Video::RoomRecordings->new(_http => $_[0]->_http, _base_path => "$base/room_recordings") } | ||||||||
|
Subroutine
_build_room_recordings: called CC=1 SCAR=0.0
| |||||||||||
| 183 | 2 | ▶ | sub _build_conferences { SignalWire::REST::Namespaces::Video::Conferences->new(_http => $_[0]->_http, _base_path => "$base/conferences") } | ||||||||
|
Subroutine
_build_conferences: called CC=1 SCAR=0.0
| |||||||||||
| 184 | 2 | ▶ | sub _build_conference_tokens { SignalWire::REST::Namespaces::Video::ConferenceTokens->new(_http => $_[0]->_http, _base_path => "$base/conference_tokens") } | ||||||||
|
Subroutine
_build_conference_tokens: called CC=1 SCAR=0.0
| |||||||||||
| 185 | 2 | ▶ | sub _build_streams { SignalWire::REST::Namespaces::Video::Streams->new(_http => $_[0]->_http, _base_path => "$base/streams") } | ||||||||
|
Subroutine
_build_streams: called CC=1 SCAR=0.0
| |||||||||||
| 186 | |||||||||||
| 187 | 6 | 1; | |||||||||