API/Endpoint/Gallery.pm untested

filter: Statementstmt 0.0% 0 / 86 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 27 Podpod 0.0% 0 / 25 totaltotal 0.0% 0 / 138 CC 1 SCAR 6.9
CC
1
Cov
0%
get
2.0
memeSubgallery
2.0
memeSubgalleryImage
2.0
CRAP 2.0
1 package Imgur::API::Endpoint::Gallery;
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/gallery",[],['section','sort','page'],\%p),
12 'get',
13 \%p
14 );
15 }
16  
17 sub memeSubgallery {
18 my ($this,%p) = @_;
19  
20 return $this->dispatcher->request(
21 $this->path("3/g/memes",[],['sort','page'],\%p),
22 'get',
23 \%p
24 );
25 }
26  
27 sub memeSubgalleryImage {
28 my ($this,%p) = @_;
29  
30 return $this->dispatcher->request(
31 $this->path("3/g/memes/%s",['image_id'],[],\%p),
32 'get',
33 \%p
34 );
35 }
36  
37 sub subreddit {
38 my ($this,%p) = @_;
39  
40 return $this->dispatcher->request(
41 $this->path("3/gallery/r/%s",['subreddit'],['sort','page'],\%p),
42 'get',
43 \%p
44 );
45 }
46  
47 sub subredditImage {
48 my ($this,%p) = @_;
49  
50 return $this->dispatcher->request(
51 $this->path("3/gallery/r/%s/%s",['subreddit','image_id'],[],\%p),
52 'get',
53 \%p
54 );
55 }
56  
57 sub tag {
58 my ($this,%p) = @_;
59  
60 return $this->dispatcher->request(
61 $this->path("3/gallery/t/%s",['t_name'],['sort','page'],\%p),
62 'get',
63 \%p
64 );
65 }
66  
67 sub tagImage {
68 my ($this,%p) = @_;
69  
70 return $this->dispatcher->request(
71 $this->path("3/gallery/t/%s/%s",['t_name','image_id'],[],\%p),
72 'get',
73 \%p
74 );
75 }
76  
77 sub itemTags {
78 my ($this,%p) = @_;
79  
80 return $this->dispatcher->request(
81 $this->path("3/gallery/image/%s/tags",['gallery'],[],\%p),
82 'get',
83 \%p
84 );
85 }
86  
87 sub tagVote {
88 my ($this,%p) = @_;
89  
90 return $this->dispatcher->request(
91 $this->path("3/gallery/%s/vote/tag/%s/%s",['gallery','t_name','vote'],[],\%p),
92 'post',
93 \%p
94 );
95 }
96  
97 sub updateGalleryTags {
98 my ($this,%p) = @_;
99  
100 return $this->dispatcher->request(
101 $this->path("3/gallery/tags/%s",['gallery'],[],\%p),
102 'post',
103 \%p
104 );
105 }
106  
107 sub search {
108 my ($this,%p) = @_;
109  
110 return $this->dispatcher->request(
111 $this->path("3/gallery/search",[],['sort','window','page'],\%p),
112 'get',
113 \%p
114 );
115 }
116  
117 sub random {
118 my ($this,%p) = @_;
119  
120 return $this->dispatcher->request(
121 $this->path("3/gallery/random/random",[],['page'],\%p),
122 'get',
123 \%p
124 );
125 }
126  
127 sub toGallery {
128 my ($this,%p) = @_;
129  
130 return $this->dispatcher->request(
131 $this->path("3/gallery/%s",['gallery'],[],\%p),
132 'post | put',
133 \%p
134 );
135 }
136  
137 sub fromGallery {
138 my ($this,%p) = @_;
139  
140 return $this->dispatcher->request(
141 $this->path("3/gallery/%s",['gallery'],[],\%p),
142 'delete',
143 \%p
144 );
145 }
146  
147 sub album {
148 my ($this,%p) = @_;
149  
150 return $this->dispatcher->request(
151 $this->path("3/gallery/album/%s",['gallery'],[],\%p),
152 'get',
153 \%p
154 );
155 }
156  
157 sub image {
158 my ($this,%p) = @_;
159  
160 return $this->dispatcher->request(
161 $this->path("3/gallery/image/%s",['gallery'],[],\%p),
162 'get',
163 \%p
164 );
165 }
166  
167 sub reporting {
168 my ($this,%p) = @_;
169  
170 return $this->dispatcher->request(
171 $this->path("",[],[],\%p),
172 'post',
173 \%p
174 );
175 }
176  
177 sub votes {
178 my ($this,%p) = @_;
179  
180 return $this->dispatcher->request(
181 $this->path("3/gallery/%s/votes",['gallery'],[],\%p),
182 'get',
183 \%p
184 );
185 }
186  
187 sub voting {
188 my ($this,%p) = @_;
189  
190 return $this->dispatcher->request(
191 $this->path("3/gallery/%s/vote/%s",['gallery','vote'],[],\%p),
192 'post',
193 \%p
194 );
195 }
196  
197 sub comments {
198 my ($this,%p) = @_;
199  
200 return $this->dispatcher->request(
201 $this->path("3/gallery/%s/comments",['gallery'],['sort'],\%p),
202 'get',
203 \%p
204 );
205 }
206  
207 sub comment {
208 my ($this,%p) = @_;
209  
210 return $this->dispatcher->request(
211 $this->path("3/gallery/%s/comment/%s",['gallery','comment'],[],\%p),
212 'get',
213 \%p
214 );
215 }
216  
217 sub commentCreation {
218 my ($this,%p) = @_;
219  
220 return $this->dispatcher->request(
221 $this->path("3/gallery/%s/comment",['gallery'],[],\%p),
222 'post',
223 \%p
224 );
225 }
226  
227 sub commentReply {
228 my ($this,%p) = @_;
229  
230 return $this->dispatcher->request(
231 $this->path("3/gallery/%s/comment/%s",['gallery','commentReply'],[],\%p),
232 'post',
233 \%p
234 );
235 }
236  
237 sub commentIds {
238 my ($this,%p) = @_;
239  
240 return $this->dispatcher->request(
241 $this->path("3/gallery/%s/comments/ids",['gallery'],[],\%p),
242 'get',
243 \%p
244 );
245 }
246  
247 sub commentCount {
248 my ($this,%p) = @_;
249  
250 return $this->dispatcher->request(
251 $this->path("3/gallery/%s/comments/count",['gallery'],[],\%p),
252 'get',
253 \%p
254 );
255 }
256  
257  
258  
259 1;
260 __PACKAGE__->meta->make_immutable;
261