V2/Client/Methods.pm

filter: Statementstmt 10.8% 14 / 129 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 8.2% 5 / 61 Podpod 0.0% 0 / 58 totaltotal 7.4% 19 / 254 CC 4 SCAR 8.3
CC
4
Cov
10%
is_tag_following
6.0
is_user_following
6.0
is_stock
6.0
CRAP 2.3
« V2/Client/Base.pm ↑ Summary V2/Client.pm »
1 package WebService::Qiita::V2::Client::Methods;
2 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use parent 'WebService::Qiita::V2::Client::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # https://qiita.com/api/v2/docs#get-apiv2oauthauthorize
7 0 ▶sub authorize {
Subroutine authorize: not called CC=1 SCAR=6.9
Pod undocumented
8 0 my ($self, $params, $args) = @_;
9 0 $self->get("oauth/authorize", $params, $args);
10 }
11  
12 # https://qiita.com/api/v2/docs#post-apiv2access_tokens
13 0 ▶sub create_access_token {
Subroutine create_access_token: not called CC=1 SCAR=6.9
Pod undocumented
14 0 my ($self, $params, $args) = @_;
15 0 $self->post("access_tokens", $params, $args);
16 }
17  
18 # https://qiita.com/api/v2/docs#delete-apiv2access_tokensaccess_token
19 0 ▶sub delete_access_token {
Subroutine delete_access_token: not called CC=1 SCAR=6.9
Pod undocumented
20 0 my ($self, $token, $args) = @_;
21 0 $self->delete("access_tokens/$token", undef, $args);
22 }
23  
24 # https://qiita.com/api/v2/docs#delete-apiv2commentscomment_id
25 0 ▶sub delete_comment {
Subroutine delete_comment: not called CC=1 SCAR=6.9
Pod undocumented
26 0 my ($self, $comment_id, $args) = @_;
27 0 $self->delete("comments/$comment_id", undef, $args);
28 }
29  
30 # https://qiita.com/api/v2/docs#get-apiv2commentscomment_id
31 0 ▶sub get_comment {
Subroutine get_comment: not called CC=1 SCAR=6.9
Pod undocumented
32 0 my ($self, $comment_id, $args) = @_;
33 0 $self->get("comments/$comment_id", undef, $args);
34 }
35  
36 # https://qiita.com/api/v2/docs#patch-apiv2commentscomment_id
37 0 ▶sub update_comment {
Subroutine update_comment: not called CC=1 SCAR=6.9
Pod undocumented
38 0 my ($self, $comment_id, $comment, $args) = @_;
39 0 $self->patch("comments/$comment_id", { body => $comment }, $args);
40 }
41  
42 # https://qiita.com/api/v2/docs#get-apiv2itemsitem_idcomments
43 0 ▶sub get_item_comments {
Subroutine get_item_comments: not called CC=1 SCAR=6.9
Pod undocumented
44 0 my ($self, $item_id, $args) = @_;
45 0 $self->get("items/$item_id/comments", undef, $args);
46 }
47  
48 # https://qiita.com/api/v2/docs#post-apiv2itemsitem_idcomments
49 0 ▶sub add_comment {
Subroutine add_comment: not called CC=1 SCAR=6.9
Pod undocumented
50 0 my ($self, $item_id, $comment, $args) = @_;
51 0 $self->post("items/$item_id/comments", { body => $comment }, $args);
52 }
53  
54 # https://qiita.com/api/v2/docs#post-apiv2itemsitem_idtaggings
55 0 ▶sub add_tag {
Subroutine add_tag: not called CC=1 SCAR=6.9
Pod undocumented
56 0 my ($self, $item_id, $params, $args) = @_;
57 0 $self->post("items/$item_id/taggings", $params, $args);
58 }
59  
60 # https://qiita.com/api/v2/docs#delete-apiv2itemsitem_idtaggingstagging_id
61 0 ▶sub delete_tag {
Subroutine delete_tag: not called CC=1 SCAR=6.9
Pod undocumented
62 0 my ($self, $item_id, $tagging_id, $args) = @_;
63 0 $self->delete("items/$item_id/taggings/$tagging_id", undef, $args);
64 }
65  
66 # https://qiita.com/api/v2/docs#get-apiv2tags
67 0 ▶sub get_tags {
Subroutine get_tags: not called CC=1 SCAR=6.9
Pod undocumented
68 0 my ($self, $params, $args) = @_;
69 0 $self->get("tags", $params, $args);
70 }
71  
72 # https://qiita.com/api/v2/docs#get-apiv2tagstag_id
73 0 ▶sub get_tag {
Subroutine get_tag: not called CC=1 SCAR=6.9
Pod undocumented
74 0 my ($self, $tag_id, $args) = @_;
75 0 $self->get("tags/$tag_id", undef, $args);
76 }
77  
78 # https://qiita.com/api/v2/docs#get-apiv2usersuser_idfollowing_tags
79 0 ▶sub get_following_tags {
Subroutine get_following_tags: not called CC=1 SCAR=6.9
Pod undocumented
80 0 my ($self, $user_id, $params, $args) = @_;
81 0 $self->get("users/$user_id/following_tags", $params, $args);
82 }
83  
84 # https://qiita.com/api/v2/docs#delete-apiv2tagstag_idfollowing
85 0 ▶sub unfollow_tag {
Subroutine unfollow_tag: not called CC=1 SCAR=6.9
Pod undocumented
86 0 my ($self, $tag_id, $args) = @_;
87 0 $self->delete("tags/$tag_id/following", undef, $args);
88 }
89  
90 # https://qiita.com/api/v2/docs#get-apiv2tagstag_idfollowing
91 0 ▶sub is_tag_following {
Subroutine is_tag_following: not called CC=2 SCAR=17.9
Pod undocumented
92 0 my ($self, $tag_id, $args) = @_;
93 0 my $code = $self->get_response_code("tags/$tag_id/following", undef, $args);
94 0 ▶ return $code == 204 ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$code == 204 ? : 0 0 0
95 }
96  
97 # https://qiita.com/api/v2/docs#put-apiv2tagstag_idfollowing
98 0 ▶sub follow_tag {
Subroutine follow_tag: not called CC=1 SCAR=6.9
Pod undocumented
99 0 my ($self, $tag_id, $args) = @_;
100 0 $self->put("tags/$tag_id/following", undef, $args);
101 }
102  
103 # https://qiita.com/api/v2/docs#get-apiv2teams
104 0 ▶sub get_teams {
Subroutine get_teams: not called CC=1 SCAR=6.9
Pod undocumented
105 0 my ($self, $args) = @_;
106 0 $self->get("teams", undef, $args);
107 }
108  
109 # https://qiita.com/api/v2/docs#get-apiv2templates
110 0 ▶sub get_templates {
Subroutine get_templates: not called CC=1 SCAR=6.9
Pod undocumented
111 0 my ($self, $params, $args) = @_;
112 0 $self->get("templates", $params, $args);
113 }
114  
115 # https://qiita.com/api/v2/docs#delete-apiv2templatestemplate_id
116 0 ▶sub delete_template {
Subroutine delete_template: not called CC=1 SCAR=6.9
Pod undocumented
117 0 my ($self, $template_id, $args) = @_;
118 0 $self->delete("templates/$template_id", undef, $args);
119 }
120  
121 # https://qiita.com/api/v2/docs#get-apiv2templatestemplate_id
122 0 ▶sub get_template {
Subroutine get_template: not called CC=1 SCAR=6.9
Pod undocumented
123 0 my ($self, $template_id, $args) = @_;
124 0 $self->get("templates/$template_id", undef, $args);
125 }
126  
127 # https://qiita.com/api/v2/docs#post-apiv2templates
128 0 ▶sub add_template {
Subroutine add_template: not called CC=1 SCAR=6.9
Pod undocumented
129 0 my ($self, $params, $args) = @_;
130 0 $self->post("templates", $params, $args);
131 }
132  
133 # https://qiita.com/api/v2/docs#patch-apiv2templatestemplate_id
134 0 ▶sub update_template {
Subroutine update_template: not called CC=1 SCAR=6.9
Pod undocumented
135 0 my ($self, $template_id, $params, $args) = @_;
136 0 $self->patch("templates/$template_id", $params, $args);
137 }
138  
139 # https://qiita.com/api/v2/docs#get-apiv2projects
140 0 ▶sub get_projects {
Subroutine get_projects: not called CC=1 SCAR=6.9
Pod undocumented
141 0 my ($self, $params, $args) = @_;
142 0 $self->get("projects", $params, $args);
143 }
144  
145 # https://qiita.com/api/v2/docs#post-apiv2projects
146 0 ▶sub add_project {
Subroutine add_project: not called CC=1 SCAR=6.9
Pod undocumented
147 0 my ($self, $params, $args) = @_;
148 0 $self->post("projects", $params, $args);
149 }
150  
151 # https://qiita.com/api/v2/docs#delete-apiv2projectsproject_id
152 0 ▶sub delete_project {
Subroutine delete_project: not called CC=1 SCAR=6.9
Pod undocumented
153 0 my ($self, $project_id, $args) = @_;
154 0 $self->delete("projects/$project_id", undef, $args);
155 }
156  
157 # https://qiita.com/api/v2/docs#get-apiv2projectsproject_id
158 0 ▶sub get_project {
Subroutine get_project: not called CC=1 SCAR=6.9
Pod undocumented
159 0 my ($self, $project_id, $args) = @_;
160 0 $self->get("projects/$project_id", undef, $args);
161 }
162  
163 # https://qiita.com/api/v2/docs#patch-apiv2projectsproject_id
164 0 ▶sub update_project {
Subroutine update_project: not called CC=1 SCAR=6.9
Pod undocumented
165 0 my ($self, $project_id, $params, $args) = @_;
166 0 $self->patch("projects/$project_id", $params, $args);
167 }
168  
169 # https://qiita.com/api/v2/docs#get-apiv2itemsitem_idstockers
170 0 ▶sub get_item_stockers {
Subroutine get_item_stockers: not called CC=1 SCAR=6.9
Pod undocumented
171 0 my ($self, $item_id, $params, $args) = @_;
172 0 $self->get("items/$item_id/stockers", $params, $args);
173 }
174  
175 # https://qiita.com/api/v2/docs#get-apiv2users
176 0 ▶sub get_users {
Subroutine get_users: not called CC=1 SCAR=6.9
Pod undocumented
177 0 my ($self, $params, $args) = @_;
178 0 $self->get("users", $params, $args);
179 }
180  
181 # https://qiita.com/api/v2/docs#get-apiv2usersuser_id
182 1 ▶sub get_user {
Subroutine get_user: called CC=1 SCAR=0.0
Pod undocumented
183 1 my ($self, $user_id, $args) = @_;
184 1 $self->get("users/$user_id", undef, $args);
185 }
186  
187 # https://qiita.com/api/v2/docs#get-apiv2usersuser_idfollowees
188 0 ▶sub get_followees {
Subroutine get_followees: not called CC=1 SCAR=6.9
Pod undocumented
189 0 my ($self, $user_id, $params, $args) = @_;
190 0 $self->get("users/$user_id/followees", $params, $args);
191 }
192  
193 # https://qiita.com/api/v2/docs#get-apiv2usersuser_idfollowers
194 0 ▶sub get_followers {
Subroutine get_followers: not called CC=1 SCAR=6.9
Pod undocumented
195 0 my ($self, $user_id, $params, $args) = @_;
196 0 $self->get("users/$user_id/followers", $params, $args);
197 }
198  
199 # https://qiita.com/api/v2/docs#delete-apiv2usersuser_idfollowing
200 0 ▶sub unfollow_user {
Subroutine unfollow_user: not called CC=1 SCAR=6.9
Pod undocumented
201 0 my ($self, $user_id, $args) = @_;
202 0 $self->delete("users/$user_id/following", undef, $args);
203 }
204  
205 # https://qiita.com/api/v2/docs#get-apiv2usersuser_idfollowing
206 0 ▶sub is_user_following {
Subroutine is_user_following: not called CC=2 SCAR=17.9
Pod undocumented
207 0 my ($self, $user_id, $args) = @_;
208 0 my $code = $self->get_response_code("users/$user_id/following", undef, $args);
209 0 ▶ return $code == 204 ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$code == 204 ? : 0 0 0
210 }
211  
212 # https://qiita.com/api/v2/docs#put-apiv2usersuser_idfollowing
213 0 ▶sub follow_user {
Subroutine follow_user: not called CC=1 SCAR=6.9
Pod undocumented
214 0 my ($self, $user_id, $args) = @_;
215 0 $self->put("users/$user_id/following", undef, $args);
216 }
217  
218 # https://qiita.com/api/v2/docs#post-apiv2expanded_templates
219 0 ▶sub expanded_templates {
Subroutine expanded_templates: not called CC=1 SCAR=6.9
Pod undocumented
220 0 my ($self, $params, $args) = @_;
221 0 $self->post("expanded_templates", $params, $args);
222 }
223  
224 # https://qiita.com/api/v2/docs#get-apiv2authenticated_useritems
225 0 ▶sub get_authenticated_user_items {
Subroutine get_authenticated_user_items: not called CC=1 SCAR=6.9
Pod undocumented
226 0 my ($self, $params, $args) = @_;
227 0 $self->get("authenticated_user/items", $params, $args);
228 }
229  
230 # https://qiita.com/api/v2/docs#get-apiv2items
231 0 ▶sub get_items {
Subroutine get_items: not called CC=1 SCAR=6.9
Pod undocumented
232 0 my ($self, $params, $args) = @_;
233 0 $self->get("items", $params, $args);
234 }
235  
236 # https://qiita.com/api/v2/docs#post-apiv2items
237 0 ▶sub add_item {
Subroutine add_item: not called CC=1 SCAR=6.9
Pod undocumented
238 0 my ($self, $params, $args) = @_;
239 0 $self->post("items", $params, $args);
240 }
241  
242 # https://qiita.com/api/v2/docs#delete-apiv2itemsitem_id
243 0 ▶sub delete_item {
Subroutine delete_item: not called CC=1 SCAR=6.9
Pod undocumented
244 0 my ($self, $item_id, $args) = @_;
245 0 $self->delete("items/$item_id", undef, $args);
246 }
247  
248 # https://qiita.com/api/v2/docs#get-apiv2itemsitem_id
249 0 ▶sub get_item {
Subroutine get_item: not called CC=1 SCAR=6.9
Pod undocumented
250 0 my ($self, $item_id, $args) = @_;
251 0 $self->get("items/$item_id", undef, $args);
252 }
253  
254 # https://qiita.com/api/v2/docs#patch-apiv2itemsitem_id
255 0 ▶sub update_item {
Subroutine update_item: not called CC=1 SCAR=6.9
Pod undocumented
256 0 my ($self, $item_id, $params, $args) = @_;
257 0 $self->patch("items/$item_id", $params, $args);
258 }
259  
260 # https://qiita.com/api/v2/docs#put-apiv2itemsitem_idstock
261 0 ▶sub stock {
Subroutine stock: not called CC=1 SCAR=6.9
Pod undocumented
262 0 my ($self, $item_id, $args) = @_;
263 0 $self->put("items/$item_id/stock", undef, $args);
264 }
265  
266 # https://qiita.com/api/v2/docs#delete-apiv2itemsitem_idstock
267 0 ▶sub unstock {
Subroutine unstock: not called CC=1 SCAR=6.9
Pod undocumented
268 0 my ($self, $item_id, $args) = @_;
269 0 $self->delete("items/$item_id/stock", undef, $args);
270 }
271 # https://qiita.com/api/v2/docs#get-apiv2itemsitem_idstock
272 0 ▶sub is_stock {
Subroutine is_stock: not called CC=2 SCAR=17.9
Pod undocumented
273 0 my ($self, $item_id, $args) = @_;
274 0 my $code = $self->get_response_code("items/$item_id/stock", undef, $args);
275 0 ▶ return $code == 204 ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$code == 204 ? : 0 0 0
276 }
277  
278 # https://qiita.com/api/v2/docs#get-apiv2tagstag_iditems
279 0 ▶sub get_tagged_items {
Subroutine get_tagged_items: not called CC=1 SCAR=6.9
Pod undocumented
280 0 my ($self, $tag_id, $params, $args) = @_;
281 0 $self->get("tags/$tag_id/items", $params, $args);
282 }
283  
284 # https://qiita.com/api/v2/docs#get-apiv2usersuser_iditems
285 0 ▶sub get_user_items {
Subroutine get_user_items: not called CC=1 SCAR=6.9
Pod undocumented
286 0 my ($self, $user_id, $params, $args) = @_;
287 0 $self->get("users/$user_id/items", $params, $args);
288 }
289  
290 # https://qiita.com/api/v2/docs#get-apiv2usersuser_idstocks
291 0 ▶sub get_user_stocks {
Subroutine get_user_stocks: not called CC=1 SCAR=6.9
Pod undocumented
292 0 my ($self, $user_id, $params, $args) = @_;
293 0 $self->get("users/$user_id/stocks", $params, $args);
294 }
295  
296 # https://qiita.com/api/v2/docs#post-apiv2commentscomment_idreactions
297 0 ▶sub add_reaction_to_comment {
Subroutine add_reaction_to_comment: not called CC=1 SCAR=6.9
Pod undocumented
298 0 my ($self, $comment_id, $params, $args) = @_;
299 0 $self->post("comments/$comment_id/reactions", $params, $args);
300 }
301  
302 # https://qiita.com/api/v2/docs#post-apiv2itemsitem_idreactions
303 0 ▶sub add_reaction_to_item {
Subroutine add_reaction_to_item: not called CC=1 SCAR=6.9
Pod undocumented
304 0 my ($self, $item_id, $params, $args) = @_;
305 0 $self->post("items/$item_id/reactions", $params, $args);
306 }
307  
308 # https://qiita.com/api/v2/docs#post-apiv2projectsproject_idreactions
309 0 ▶sub add_reaction_to_project {
Subroutine add_reaction_to_project: not called CC=1 SCAR=6.9
Pod undocumented
310 0 my ($self, $project_id, $params, $args) = @_;
311 0 $self->post("projects/$project_id/reactions", $params, $args);
312 }
313  
314 # https://qiita.com/api/v2/docs#delete-apiv2commentscomment_idreactionsreaction_name
315 0 ▶sub remove_reaction_from_comment {
Subroutine remove_reaction_from_comment: not called CC=1 SCAR=6.9
Pod undocumented
316 0 my ($self, $comment_id, $reaction_name, $args) = @_;
317 0 $self->delete("comments/$comment_id/reactions/$reaction_name", undef, $args);
318 }
319  
320 # https://qiita.com/api/v2/docs#delete-apiv2itemsitem_idreactionsreaction_name
321 0 ▶sub remove_reaction_from_item {
Subroutine remove_reaction_from_item: not called CC=1 SCAR=6.9
Pod undocumented
322 0 my ($self, $item_id, $reaction_name, $args) = @_;
323 0 $self->delete("items/$item_id/reactions/$reaction_name", undef, $args);
324 }
325  
326 # https://qiita.com/api/v2/docs#delete-apiv2projectsproject_idreactionsreaction_name
327 0 ▶sub remove_reaction_from_project {
Subroutine remove_reaction_from_project: not called CC=1 SCAR=6.9
Pod undocumented
328 0 my ($self, $project_id, $reaction_name, $args) = @_;
329 0 $self->delete("projects/$project_id/reactions/$reaction_name", undef, $args);
330 }
331  
332 # https://qiita.com/api/v2/docs#get-apiv2commentscomment_idreactions
333 0 ▶sub get_reactions_of_comment {
Subroutine get_reactions_of_comment: not called CC=1 SCAR=6.9
Pod undocumented
334 0 my ($self, $comment_id, $args) = @_;
335 0 $self->get("comments/$comment_id/reactions", undef, $args);
336 }
337  
338 # https://qiita.com/api/v2/docs#get-apiv2itemsitem_idreactions
339 0 ▶sub get_reactions_of_item {
Subroutine get_reactions_of_item: not called CC=1 SCAR=6.9
Pod undocumented
340 0 my ($self, $item_id, $args) = @_;
341 0 $self->get("items/$item_id/reactions", undef, $args);
342 }
343  
344 # https://qiita.com/api/v2/docs#get-apiv2projectsproject_idreactions
345 0 ▶sub get_reactions_of_project {
Subroutine get_reactions_of_project: not called CC=1 SCAR=6.9
Pod undocumented
346 0 my ($self, $project_id, $args) = @_;
347 0 $self->get("projects/$project_id/reactions", undef, $args);
348 }
349  
350 # https://qiita.com/api/v2/docs#get-apiv2authenticated_user
351 3 ▶sub get_authenticated_user {
Subroutine get_authenticated_user: called CC=1 SCAR=0.0
Pod undocumented
352 3 my ($self, $args) = @_;
353 3 $self->get("authenticated_user", undef, $args);
354 }
355  
356 5 1;
« V2/Client/Base.pm ↑ Summary V2/Client.pm »