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

filter: Statementstmt 70.0% 21 / 30 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 6 / 10 Podpod 0.0% 0 / 4 totaltotal 58.7% 27 / 46 CC 2 SCAR 7.8
CC
2
Cov
66%
list_chunks
6.0
search
2.0
get_chunk
2.0
CRAP 2.2
« blib/lib/SignalWire/Skills/Builtin/Math.pm ↑ Summary blib/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm »
1 package SignalWire::REST::Namespaces::Datasphere;
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 # --- DatasphereDocuments ---
7 package SignalWire::REST::Namespaces::Datasphere::Documents;
8 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 extends 'SignalWire::REST::Namespaces::CrudResource';
10  
11 0 ▶sub search {
Subroutine search: not called CC=1 SCAR=6.9
Pod undocumented
12 0 my ($self, %kwargs) = @_;
13 0 return $self->_http->post($self->_path('search'), body => \%kwargs);
14 }
15  
16 0 ▶sub list_chunks {
Subroutine list_chunks: not called CC=2 SCAR=17.9
Pod undocumented
17 0 my ($self, $document_id, %params) = @_;
18 0 ▶ my $p = %params ? \%params : undef;
Branch: 1 branch
BranchTrueFalseTotal
%params ? : 0 0 0
19 0 return $self->_http->get($self->_path($document_id, 'chunks'), params => $p);
20 }
21  
22 0 ▶sub get_chunk {
Subroutine get_chunk: not called CC=1 SCAR=6.9
Pod undocumented
23 0 my ($self, $document_id, $chunk_id) = @_;
24 0 return $self->_http->get($self->_path($document_id, 'chunks', $chunk_id));
25 }
26  
27 0 ▶sub delete_chunk {
Subroutine delete_chunk: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my ($self, $document_id, $chunk_id) = @_;
29 0 return $self->_http->delete_request($self->_path($document_id, 'chunks', $chunk_id));
30 }
31  
32 # --- DatasphereNamespace ---
33 package SignalWire::REST::Namespaces::Datasphere;
34 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 6 has '_http' => ( is => 'ro', required => 1 );
37 6 has 'documents' => ( is => 'lazy' );
38  
39 2 ▶sub _build_documents {
Subroutine _build_documents: called CC=1 SCAR=0.0
40 2 my ($self) = @_;
41 2 return SignalWire::REST::Namespaces::Datasphere::Documents->new(
42 _http => $self->_http,
43 _base_path => '/api/datasphere/documents',
44 );
45 }
46  
47 6 1;
« blib/lib/SignalWire/Skills/Builtin/Math.pm ↑ Summary blib/lib/SignalWire/Skills/Builtin/DatasphereServerless.pm »