qiita 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 635619c25deb32bd52e9a4edb75d258892e96d5b
4
- data.tar.gz: d40ac99991080f59fedc478eb2820364fef00907
3
+ metadata.gz: ff54dab5582ad203e37a3941ca047a93562cda6b
4
+ data.tar.gz: c86302b6d2f9d01ef2963b5f791218a8c2d4e453
5
5
  SHA512:
6
- metadata.gz: c310f3e853506827d6c5cd903d068d6a638d357fcbe03b4ecd9cfe441cac35f7422a05fccb45768a1c863ff149dd8bceae28612bdb657574f91182bd25df690d
7
- data.tar.gz: e6b31c825fdf7eb50a4f3319d3efa2631ea81c63b6dd24fa6e6922c77a5cfa947c9638ab5920bfd0b83ec3636e5a83aaea4e7ef64efec975c392b3723b21e08c
6
+ metadata.gz: fa97be1ed70a2b5f6fa48e6bcb10d898065ed9d16d9249322b8f29b9c7d412f7a5dc94db798eac802b7fa81e6ebb2c9744a7b9b3fa81d70e3abf0adacf0d7b43
7
+ data.tar.gz: 6d7cc4a106549fc92cb5e64b0e3773fe66c27ae652013d01b208d917e0a63090e613b939c36bb778640a280b8dd651d7747cbf4304df7151ba893e8e0ba35930
@@ -1,3 +1,6 @@
1
+ ## 1.3.2
2
+ - Fix broken client methods (thx @kmrshntr)
3
+
1
4
  ## 1.3.1
2
5
  - Fix client methods that have templated path (#12, thx @mzp)
3
6
 
@@ -7,10 +7,10 @@ module Qiita
7
7
  post("/api/v2/access_tokens", params, headers)
8
8
  end
9
9
 
10
- # ### Qiita::Client#delete_access_token(params = nil, headers = nil)
10
+ # ### Qiita::Client#delete_access_token(access_token, params = nil, headers = nil)
11
11
  # Deactivate an access token.
12
12
  #
13
- def delete_access_token(params = nil, headers = nil)
13
+ def delete_access_token(access_token, params = nil, headers = nil)
14
14
  delete("/api/v2/access_tokens/#{access_token}", params, headers)
15
15
  end
16
16
 
@@ -21,52 +21,52 @@ module Qiita
21
21
  get("/api/v2/authenticated_user", params, headers)
22
22
  end
23
23
 
24
- # ### Qiita::Client#delete_comment(params = nil, headers = nil)
24
+ # ### Qiita::Client#delete_comment(comment_id, params = nil, headers = nil)
25
25
  # Delete a comment.
26
26
  #
27
- def delete_comment(params = nil, headers = nil)
27
+ def delete_comment(comment_id, params = nil, headers = nil)
28
28
  delete("/api/v2/comments/#{comment_id}", params, headers)
29
29
  end
30
30
 
31
- # ### Qiita::Client#get_comment(params = nil, headers = nil)
31
+ # ### Qiita::Client#get_comment(comment_id, params = nil, headers = nil)
32
32
  # Get a comment.
33
33
  #
34
- def get_comment(params = nil, headers = nil)
34
+ def get_comment(comment_id, params = nil, headers = nil)
35
35
  get("/api/v2/comments/#{comment_id}", params, headers)
36
36
  end
37
37
 
38
- # ### Qiita::Client#update_comment(params = nil, headers = nil)
38
+ # ### Qiita::Client#update_comment(comment_id, params = nil, headers = nil)
39
39
  # Update a comment.
40
40
  #
41
- def update_comment(params = nil, headers = nil)
41
+ def update_comment(comment_id, params = nil, headers = nil)
42
42
  patch("/api/v2/comments/#{comment_id}", params, headers)
43
43
  end
44
44
 
45
- # ### Qiita::Client#unthank_comment(params = nil, headers = nil)
45
+ # ### Qiita::Client#unthank_comment(comment_id, params = nil, headers = nil)
46
46
  # Delete a thank from a comment.
47
47
  #
48
- def unthank_comment(params = nil, headers = nil)
48
+ def unthank_comment(comment_id, params = nil, headers = nil)
49
49
  delete("/api/v2/comments/#{comment_id}/thank", params, headers)
50
50
  end
51
51
 
52
- # ### Qiita::Client#thank_comment(params = nil, headers = nil)
52
+ # ### Qiita::Client#thank_comment(comment_id, params = nil, headers = nil)
53
53
  # Send a thank to a comment.
54
54
  #
55
- def thank_comment(params = nil, headers = nil)
55
+ def thank_comment(comment_id, params = nil, headers = nil)
56
56
  put("/api/v2/comments/#{comment_id}/thank", params, headers)
57
57
  end
58
58
 
59
- # ### Qiita::Client#list_item_comments(params = nil, headers = nil)
59
+ # ### Qiita::Client#list_item_comments(item_id, params = nil, headers = nil)
60
60
  # List comments on an item in newest order.
61
61
  #
62
- def list_item_comments(params = nil, headers = nil)
62
+ def list_item_comments(item_id, params = nil, headers = nil)
63
63
  get("/api/v2/items/#{item_id}/comments", params, headers)
64
64
  end
65
65
 
66
- # ### Qiita::Client#create_item_comment(params = nil, headers = nil)
66
+ # ### Qiita::Client#create_item_comment(item_id, params = nil, headers = nil)
67
67
  # Post a comment on an item.
68
68
  #
69
- def create_item_comment(params = nil, headers = nil)
69
+ def create_item_comment(item_id, params = nil, headers = nil)
70
70
  post("/api/v2/items/#{item_id}/comments", params, headers)
71
71
  end
72
72
 
@@ -98,87 +98,87 @@ module Qiita
98
98
  post("/api/v2/items", params, headers)
99
99
  end
100
100
 
101
- # ### Qiita::Client#delete_item(params = nil, headers = nil)
101
+ # ### Qiita::Client#delete_item(item_id, params = nil, headers = nil)
102
102
  # Delete an item.
103
103
  #
104
- def delete_item(params = nil, headers = nil)
104
+ def delete_item(item_id, params = nil, headers = nil)
105
105
  get("/api/v2/items/#{item_id}", params, headers)
106
106
  end
107
107
 
108
- # ### Qiita::Client#get_item(params = nil, headers = nil)
108
+ # ### Qiita::Client#get_item(item_id, params = nil, headers = nil)
109
109
  # Get an item.
110
110
  #
111
- def get_item(params = nil, headers = nil)
111
+ def get_item(item_id, params = nil, headers = nil)
112
112
  get("/api/v2/items/#{item_id}", params, headers)
113
113
  end
114
114
 
115
- # ### Qiita::Client#update_item(params = nil, headers = nil)
115
+ # ### Qiita::Client#update_item(item_id, params = nil, headers = nil)
116
116
  # Update an item.
117
117
  #
118
- def update_item(params = nil, headers = nil)
118
+ def update_item(item_id, params = nil, headers = nil)
119
119
  patch("/api/v2/items/#{item_id}", params, headers)
120
120
  end
121
121
 
122
- # ### Qiita::Client#unlike_item(params = nil, headers = nil)
122
+ # ### Qiita::Client#unlike_item(item_id, params = nil, headers = nil)
123
123
  # Unlike an item (only available on Qiita:Team).
124
124
  #
125
- def unlike_item(params = nil, headers = nil)
125
+ def unlike_item(item_id, params = nil, headers = nil)
126
126
  delete("/api/v2/items/#{item_id}/like", params, headers)
127
127
  end
128
128
 
129
- # ### Qiita::Client#like_item(params = nil, headers = nil)
129
+ # ### Qiita::Client#like_item(item_id, params = nil, headers = nil)
130
130
  # Like an item (only available on Qiita:Team).
131
131
  #
132
- def like_item(params = nil, headers = nil)
132
+ def like_item(item_id, params = nil, headers = nil)
133
133
  put("/api/v2/items/#{item_id}/like", params, headers)
134
134
  end
135
135
 
136
- # ### Qiita::Client#unstock_item(params = nil, headers = nil)
136
+ # ### Qiita::Client#unstock_item(item_id, params = nil, headers = nil)
137
137
  # Unstock an item.
138
138
  #
139
- def unstock_item(params = nil, headers = nil)
139
+ def unstock_item(item_id, params = nil, headers = nil)
140
140
  delete("/api/v2/items/#{item_id}/stock", params, headers)
141
141
  end
142
142
 
143
- # ### Qiita::Client#get_item_stock(params = nil, headers = nil)
143
+ # ### Qiita::Client#get_item_stock(item_id, params = nil, headers = nil)
144
144
  # Check if you stocked an item.
145
145
  #
146
- def get_item_stock(params = nil, headers = nil)
146
+ def get_item_stock(item_id, params = nil, headers = nil)
147
147
  get("/api/v2/items/#{item_id}/stock", params, headers)
148
148
  end
149
149
 
150
- # ### Qiita::Client#stock_item(params = nil, headers = nil)
150
+ # ### Qiita::Client#stock_item(item_id, params = nil, headers = nil)
151
151
  # Stock an item.
152
152
  #
153
- def stock_item(params = nil, headers = nil)
153
+ def stock_item(item_id, params = nil, headers = nil)
154
154
  put("/api/v2/items/#{item_id}/stock", params, headers)
155
155
  end
156
156
 
157
- # ### Qiita::Client#stock_item(params = nil, headers = nil)
157
+ # ### Qiita::Client#stock_item(item_id, params = nil, headers = nil)
158
158
  # Stock an item.
159
159
  #
160
- def stock_item(params = nil, headers = nil)
160
+ def stock_item(item_id, params = nil, headers = nil)
161
161
  put("/api/v2/items/#{item_id}/stock", params, headers)
162
162
  end
163
163
 
164
- # ### Qiita::Client#list_tag_items(params = nil, headers = nil)
164
+ # ### Qiita::Client#list_tag_items(tag_id, params = nil, headers = nil)
165
165
  # List tagged items in recently-tagged order.
166
166
  #
167
- def list_tag_items(params = nil, headers = nil)
167
+ def list_tag_items(tag_id, params = nil, headers = nil)
168
168
  get("/api/v2/tags/#{tag_id}/items", params, headers)
169
169
  end
170
170
 
171
- # ### Qiita::Client#list_user_items(params = nil, headers = nil)
171
+ # ### Qiita::Client#list_user_items(user_id, params = nil, headers = nil)
172
172
  # List a user's items in newest order.
173
173
  #
174
- def list_user_items(params = nil, headers = nil)
174
+ def list_user_items(user_id, params = nil, headers = nil)
175
175
  get("/api/v2/users/#{user_id}/items", params, headers)
176
176
  end
177
177
 
178
- # ### Qiita::Client#list_user_stocks(params = nil, headers = nil)
178
+ # ### Qiita::Client#list_user_stocks(user_id, params = nil, headers = nil)
179
179
  # List a user's stocked items in recently-stocked order.
180
180
  #
181
- def list_user_stocks(params = nil, headers = nil)
181
+ def list_user_stocks(user_id, params = nil, headers = nil)
182
182
  get("/api/v2/users/#{user_id}/stocks", params, headers)
183
183
  end
184
184
 
@@ -196,24 +196,24 @@ module Qiita
196
196
  post("/api/v2/projects", params, headers)
197
197
  end
198
198
 
199
- # ### Qiita::Client#delete_project(params = nil, headers = nil)
199
+ # ### Qiita::Client#delete_project(project_id, params = nil, headers = nil)
200
200
  # Delete a project.
201
201
  #
202
- def delete_project(params = nil, headers = nil)
202
+ def delete_project(project_id, params = nil, headers = nil)
203
203
  delete("/api/v2/projects/#{project_id}", params, headers)
204
204
  end
205
205
 
206
- # ### Qiita::Client#get_project(params = nil, headers = nil)
206
+ # ### Qiita::Client#get_project(project_id, params = nil, headers = nil)
207
207
  # Get a project.
208
208
  #
209
- def get_project(params = nil, headers = nil)
209
+ def get_project(project_id, params = nil, headers = nil)
210
210
  get("/api/v2/projects/#{project_id}", params, headers)
211
211
  end
212
212
 
213
- # ### Qiita::Client#patch_project(params = nil, headers = nil)
213
+ # ### Qiita::Client#patch_project(project_id, params = nil, headers = nil)
214
214
  # Update a project
215
215
  #
216
- def patch_project(params = nil, headers = nil)
216
+ def patch_project(project_id, params = nil, headers = nil)
217
217
  patch("/api/v2/projects/#{project_id}", params, headers)
218
218
  end
219
219
 
@@ -224,52 +224,52 @@ module Qiita
224
224
  get("/api/v2/tags", params, headers)
225
225
  end
226
226
 
227
- # ### Qiita::Client#get_tag(params = nil, headers = nil)
227
+ # ### Qiita::Client#get_tag(tag_id, params = nil, headers = nil)
228
228
  # Get a tag.
229
229
  #
230
- def get_tag(params = nil, headers = nil)
230
+ def get_tag(tag_id, params = nil, headers = nil)
231
231
  get("/api/v2/tags/#{tag_id}", params, headers)
232
232
  end
233
233
 
234
- # ### Qiita::Client#list_user_following_tags(params = nil, headers = nil)
234
+ # ### Qiita::Client#list_user_following_tags(user_id, params = nil, headers = nil)
235
235
  # List tags a user is following to in recently-tagged order.
236
236
  #
237
- def list_user_following_tags(params = nil, headers = nil)
237
+ def list_user_following_tags(user_id, params = nil, headers = nil)
238
238
  get("/api/v2/users/#{user_id}/following_tags", params, headers)
239
239
  end
240
240
 
241
- # ### Qiita::Client#unfollow_tag(params = nil, headers = nil)
241
+ # ### Qiita::Client#unfollow_tag(tag_id, params = nil, headers = nil)
242
242
  # Unfollow a tag.
243
243
  #
244
- def unfollow_tag(params = nil, headers = nil)
244
+ def unfollow_tag(tag_id, params = nil, headers = nil)
245
245
  delete("/api/v2/tags/#{tag_id}/following", params, headers)
246
246
  end
247
247
 
248
- # ### Qiita::Client#get_tag_following(params = nil, headers = nil)
248
+ # ### Qiita::Client#get_tag_following(tag_id, params = nil, headers = nil)
249
249
  # Check if you are following a tag or not.
250
250
  #
251
- def get_tag_following(params = nil, headers = nil)
251
+ def get_tag_following(tag_id, params = nil, headers = nil)
252
252
  get("/api/v2/tags/#{tag_id}/following", params, headers)
253
253
  end
254
254
 
255
- # ### Qiita::Client#follow_tag(params = nil, headers = nil)
255
+ # ### Qiita::Client#follow_tag(tag_id, params = nil, headers = nil)
256
256
  # Follow a tag.
257
257
  #
258
- def follow_tag(params = nil, headers = nil)
258
+ def follow_tag(tag_id, params = nil, headers = nil)
259
259
  put("/api/v2/tags/#{tag_id}/following", params, headers)
260
260
  end
261
261
 
262
- # ### Qiita::Client#create_tagging(params = nil, headers = nil)
262
+ # ### Qiita::Client#create_tagging(item_id, params = nil, headers = nil)
263
263
  # Add a tag to an item (only available on Qiita:Team)
264
264
  #
265
- def create_tagging(params = nil, headers = nil)
265
+ def create_tagging(item_id, params = nil, headers = nil)
266
266
  post("/api/v2/items/#{item_id}/taggings", params, headers)
267
267
  end
268
268
 
269
- # ### Qiita::Client#delete_tagging(params = nil, headers = nil)
269
+ # ### Qiita::Client#delete_tagging(item_id, tagging_id, params = nil, headers = nil)
270
270
  # Remove a tag from an item (only available on Qiita:Team)
271
271
  #
272
- def delete_tagging(params = nil, headers = nil)
272
+ def delete_tagging(item_id, tagging_id, params = nil, headers = nil)
273
273
  delete("/api/v2/items/#{item_id}/taggings/#{tagging_id}", params, headers)
274
274
  end
275
275
 
@@ -287,17 +287,17 @@ module Qiita
287
287
  get("/api/v2/templates", params, headers)
288
288
  end
289
289
 
290
- # ### Qiita::Client#delete_template(params = nil, headers = nil)
290
+ # ### Qiita::Client#delete_template(template_id, params = nil, headers = nil)
291
291
  # Delete a template.
292
292
  #
293
- def delete_template(params = nil, headers = nil)
293
+ def delete_template(template_id, params = nil, headers = nil)
294
294
  delete("/api/v2/templates/#{template_id}", params, headers)
295
295
  end
296
296
 
297
- # ### Qiita::Client#get_template(params = nil, headers = nil)
297
+ # ### Qiita::Client#get_template(template_id, params = nil, headers = nil)
298
298
  # Get a template.
299
299
  #
300
- def get_template(params = nil, headers = nil)
300
+ def get_template(template_id, params = nil, headers = nil)
301
301
  get("/api/v2/templates/#{template_id}", params, headers)
302
302
  end
303
303
 
@@ -308,17 +308,17 @@ module Qiita
308
308
  post("/api/v2/templates", params, headers)
309
309
  end
310
310
 
311
- # ### Qiita::Client#update_template(params = nil, headers = nil)
311
+ # ### Qiita::Client#update_template(template_id, params = nil, headers = nil)
312
312
  # Update a template.
313
313
  #
314
- def update_template(params = nil, headers = nil)
314
+ def update_template(template_id, params = nil, headers = nil)
315
315
  patch("/api/v2/templates/#{template_id}", params, headers)
316
316
  end
317
317
 
318
- # ### Qiita::Client#list_item_stockers(params = nil, headers = nil)
318
+ # ### Qiita::Client#list_item_stockers(item_id, params = nil, headers = nil)
319
319
  # List users who stocked an item in recent-stocked order.
320
320
  #
321
- def list_item_stockers(params = nil, headers = nil)
321
+ def list_item_stockers(item_id, params = nil, headers = nil)
322
322
  get("/api/v2/items/#{item_id}/stockers", params, headers)
323
323
  end
324
324
 
@@ -329,45 +329,45 @@ module Qiita
329
329
  get("/api/v2/users", params, headers)
330
330
  end
331
331
 
332
- # ### Qiita::Client#get_user(params = nil, headers = nil)
332
+ # ### Qiita::Client#get_user(user_id, params = nil, headers = nil)
333
333
  # Get a user.
334
334
  #
335
- def get_user(params = nil, headers = nil)
335
+ def get_user(user_id, params = nil, headers = nil)
336
336
  get("/api/v2/users/#{user_id}", params, headers)
337
337
  end
338
338
 
339
- # ### Qiita::Client#list_user_followees(params = nil, headers = nil)
339
+ # ### Qiita::Client#list_user_followees(user_id, params = nil, headers = nil)
340
340
  # List users a user is following.
341
341
  #
342
- def list_user_followees(params = nil, headers = nil)
342
+ def list_user_followees(user_id, params = nil, headers = nil)
343
343
  get("/api/v2/users/#{user_id}/followees", params, headers)
344
344
  end
345
345
 
346
- # ### Qiita::Client#list_user_followers(params = nil, headers = nil)
346
+ # ### Qiita::Client#list_user_followers(user_id, params = nil, headers = nil)
347
347
  # List users who are following a user.
348
348
  #
349
- def list_user_followers(params = nil, headers = nil)
349
+ def list_user_followers(user_id, params = nil, headers = nil)
350
350
  get("/api/v2/users/#{user_id}/followers", params, headers)
351
351
  end
352
352
 
353
- # ### Qiita::Client#unfollow_user(params = nil, headers = nil)
353
+ # ### Qiita::Client#unfollow_user(user_id, params = nil, headers = nil)
354
354
  # Unfollow a user.
355
355
  #
356
- def unfollow_user(params = nil, headers = nil)
356
+ def unfollow_user(user_id, params = nil, headers = nil)
357
357
  delete("/api/v2/users/#{user_id}/following", params, headers)
358
358
  end
359
359
 
360
- # ### Qiita::Client#get_user_following(params = nil, headers = nil)
360
+ # ### Qiita::Client#get_user_following(user_id, params = nil, headers = nil)
361
361
  # Check if the current user is following a user.
362
362
  #
363
- def get_user_following(params = nil, headers = nil)
363
+ def get_user_following(user_id, params = nil, headers = nil)
364
364
  get("/api/v2/users/#{user_id}/following", params, headers)
365
365
  end
366
366
 
367
- # ### Qiita::Client#follow_user(params = nil, headers = nil)
367
+ # ### Qiita::Client#follow_user(user_id, params = nil, headers = nil)
368
368
  # Follow a user.
369
369
  #
370
- def follow_user(params = nil, headers = nil)
370
+ def follow_user(user_id, params = nil, headers = nil)
371
371
  put("/api/v2/users/#{user_id}/following", params, headers)
372
372
  end
373
373
  end
@@ -1,3 +1,3 @@
1
1
  module Qiita
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -61,7 +61,7 @@ methods = links.map do |link|
61
61
  href: link.href,
62
62
  method_name: link.title,
63
63
  request_method: link.method.downcase,
64
- required_argument_names: link.href.scan(%r<{\((.+?)\)}>).flatten.map do |element|
64
+ required_argument_names: link.href.scan(%r<:([^/]+)>).flatten.map do |element|
65
65
  element.split("/").last
66
66
  end,
67
67
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-08 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport