blib/lib/SignalWire/REST/Namespaces/Project.pm

filter: Statementstmt 72.4% 21 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 6 / 10 Podpod 0.0% 0 / 4 totaltotal 62.7% 27 / 43 CC 1 SCAR 3.4
CC
1
Cov
72%
create
2.0
update
2.0
delete_token
2.0
CRAP 1.4
« blib/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm ↑ Summary blib/lib/SignalWire/Skills/Builtin/Joke.pm »
1 package SignalWire::REST::Namespaces::Project;
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 # --- ProjectTokens ---
7 package SignalWire::REST::Namespaces::Project::Tokens;
8 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 extends 'SignalWire::REST::Namespaces::Base';
10  
11 0 ▶sub create {
Subroutine create: not called CC=1 SCAR=6.9
Pod undocumented
12 0 my ($self, %kwargs) = @_;
13 0 return $self->_http->post($self->_base_path, body => \%kwargs);
14 }
15  
16 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
Pod undocumented
17 0 my ($self, $token_id, %kwargs) = @_;
18 0 return $self->_http->patch($self->_path($token_id), body => \%kwargs);
19 }
20  
21 0 ▶sub delete_token {
Subroutine delete_token: not called CC=1 SCAR=6.9
Pod undocumented
22 0 my ($self, $token_id) = @_;
23 0 return $self->_http->delete_request($self->_path($token_id));
24 }
25  
26 # Python parity alias.
27 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my ($self, $token_id) = @_;
29 0 return $self->_http->delete_request($self->_path($token_id));
30 }
31  
32 # --- ProjectNamespace ---
33 package SignalWire::REST::Namespaces::Project;
34 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 6 has '_http' => ( is => 'ro', required => 1 );
37 6 has 'tokens' => ( is => 'lazy' );
38  
39 2 ▶sub _build_tokens {
Subroutine _build_tokens: called CC=1 SCAR=0.0
40 2 my ($self) = @_;
41 2 return SignalWire::REST::Namespaces::Project::Tokens->new(
42 _http => $self->_http,
43 _base_path => '/api/project/tokens',
44 );
45 }
46  
47 6 1;
« blib/lib/SignalWire/Skills/Builtin/NativeVectorSearch.pm ↑ Summary blib/lib/SignalWire/Skills/Builtin/Joke.pm »