API/Endpoint/Account.pm untested

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