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

filter: Statementstmt 77.7% 21 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 0.0% 0 / 3 totaltotal 69.2% 27 / 39 CC 1 SCAR 2.9
CC
1
Cov
78%
create
2.0
update
2.0
delete_token
2.0
CRAP 1.3
« blib/lib/SignalWire/Agents/Skills/Builtin/Datasphere.pm ↑ Summary blib/lib/SignalWire/Agents/Skills/Builtin/ClaudeSkills.pm »
1 package SignalWire::Agents::REST::Namespaces::Project;
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # --- ProjectTokens ---
7 package SignalWire::Agents::REST::Namespaces::Project::Tokens;
8 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 4 extends 'SignalWire::Agents::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 # --- ProjectNamespace ---
27 package SignalWire::Agents::REST::Namespaces::Project;
28 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 4 has '_http' => ( is => 'ro', required => 1 );
31 4 has 'tokens' => ( is => 'lazy' );
32  
33 2 ▶sub _build_tokens {
Subroutine _build_tokens: called CC=1 SCAR=0.0
34 2 my ($self) = @_;
35 2 return SignalWire::Agents::REST::Namespaces::Project::Tokens->new(
36 _http => $self->_http,
37 _base_path => '/api/project/tokens',
38 );
39 }
40  
41 4 1;
« blib/lib/SignalWire/Agents/Skills/Builtin/Datasphere.pm ↑ Summary blib/lib/SignalWire/Agents/Skills/Builtin/ClaudeSkills.pm »