API/Endpoint/Album.pm untested

filter: Statementstmt 0.0% 0 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 10 totaltotal 0.0% 0 / 60 CC 1 SCAR 6.9
CC
1
Cov
0%
get
2.0
images
2.0
image
2.0
CRAP 2.0
1 package Imgur::API::Endpoint::Album;
2  
3 use strict;
4 use Mouse;
5 extends 'Imgur::API::Endpoint';
6  
7 sub get {
8 my ($this,%p) = @_;
9  
10 return $this->dispatcher->request(
11 $this->path("3/album/%s",['album'],[],\%p),
12 'get',
13 \%p
14 );
15 }
16  
17 sub images {
18 my ($this,%p) = @_;
19  
20 return $this->dispatcher->request(
21 $this->path("3/album/%s/images",['album'],[],\%p),
22 'get',
23 \%p
24 );
25 }
26  
27 sub image {
28 my ($this,%p) = @_;
29  
30 return $this->dispatcher->request(
31 $this->path("3/album/%s/image/%s",['album','image'],[],\%p),
32 'get',
33 \%p
34 );
35 }
36  
37 sub upload {
38 my ($this,%p) = @_;
39  
40 return $this->dispatcher->request(
41 $this->path("3/album",[],[],\%p),
42 'post',
43 \%p
44 );
45 }
46  
47 sub update {
48 my ($this,%p) = @_;
49  
50 return $this->dispatcher->request(
51 $this->path("3/album/%s",['album'],[],\%p),
52 'put',
53 \%p
54 );
55 }
56  
57 sub delete {
58 my ($this,%p) = @_;
59  
60 return $this->dispatcher->request(
61 $this->path("3/album/%s",['album'],[],\%p),
62 'delete',
63 \%p
64 );
65 }
66  
67 sub favorite {
68 my ($this,%p) = @_;
69  
70 return $this->dispatcher->request(
71 $this->path("3/album/%s/favorite",['album'],[],\%p),
72 'post',
73 \%p
74 );
75 }
76  
77 sub setTo {
78 my ($this,%p) = @_;
79  
80 return $this->dispatcher->request(
81 $this->path("3/album/%s",['album'],[],\%p),
82 'post',
83 \%p
84 );
85 }
86  
87 sub addTo {
88 my ($this,%p) = @_;
89  
90 return $this->dispatcher->request(
91 $this->path("3/album/%s/add",['album'],[],\%p),
92 'put',
93 \%p
94 );
95 }
96  
97 sub removeFrom {
98 my ($this,%p) = @_;
99  
100 return $this->dispatcher->request(
101 $this->path("3/album/%s/remove_images",['album'],[],\%p),
102 'delete',
103 \%p
104 );
105 }
106  
107  
108  
109 1;
110 __PACKAGE__->meta->make_immutable;
111