API/REST.pm

filter: Statementstmt 100% 37 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 14 / 14 Podpod 100% 6 / 6 totaltotal 100% 57 / 57 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
update_or_create_objects
1.0
CRAP 1.0
« API/Types.pm ↑ Summary API/RPC.pm »
1 package Catalyst::Controller::DBIC::API::REST;
2 16 $Catalyst::Controller::DBIC::API::REST::VERSION = '2.009000';
3 #ABSTRACT: Provides a REST interface to DBIx::Class
4 16 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 16 ▶BEGIN { extends 'Catalyst::Controller::DBIC::API'; }
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 16 __PACKAGE__->config(
8 'default' => 'application/json',
9 'stash_key' => 'response',
10 'map' => {
11 'application/x-www-form-urlencoded' => 'JSON',
12 'application/json' => 'JSON',
13 }
14 );
15  
16  
17 7 ▶sub update_or_create_objects : POST PUT Chained('objects_no_id') PathPart('')
Subroutine update_or_create_objects: called CC=1 SCAR=0.0
Pod documented
18 Args(0) {
19 7 my ( $self, $c ) = @_;
20 7 $self->update_or_create($c);
21 16 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23  
24 1 ▶sub delete_many_objects : DELETE Chained('objects_no_id') PathPart('')
Subroutine delete_many_objects: called CC=1 SCAR=0.0
Pod documented
25 Args(0) {
26 1 my ( $self, $c ) = @_;
27 1 $self->delete($c);
28 16 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30  
31 24 ▶sub list_objects : GET Chained('objects_no_id') PathPart('') Args(0) {
Subroutine list_objects: called CC=1 SCAR=0.0
Pod documented
32 24 my ( $self, $c ) = @_;
33 24 $self->list($c);
34 16 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36  
37 3 ▶sub update_or_create_one_object : POST PUT Chained('object_with_id')
Subroutine update_or_create_one_object: called CC=1 SCAR=0.0
Pod documented
38 PathPart('') Args(0) {
39 3 my ( $self, $c ) = @_;
40 3 $self->update_or_create($c);
41 16 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43  
44 1 ▶sub delete_one_object : DELETE Chained('object_with_id') PathPart('') Args(0)
Subroutine delete_one_object: called CC=1 SCAR=0.0
Pod documented
45 {
46 1 my ( $self, $c ) = @_;
47 1 $self->delete($c);
48 16 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
49  
50  
51 2 ▶sub list_one_object : GET Chained('object_with_id') PathPart('') Args(0) {
Subroutine list_one_object: called CC=1 SCAR=0.0
Pod documented
52 2 my ( $self, $c ) = @_;
53 2 $self->item($c);
54 16 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
55  
56 16 1;
57  
58 __END__
« API/Types.pm ↑ Summary API/RPC.pm »