qiita 1.2.0 → 1.3.0

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: 980bae33b5a17fd6c1792880d71cc373c7a6f9bb
4
- data.tar.gz: 5ebdee46ebfc76bbb5bc39f3acf378ce59083a02
3
+ metadata.gz: 431cb1a1e712d5bb51c7c7a1a6c4602057bdb518
4
+ data.tar.gz: 4ab2b183e3a7731b39f992048e933d57a13afd63
5
5
  SHA512:
6
- metadata.gz: 53133d45a063af7bd40568faa1f16b5df37aaed334e191a16e96466cd33c6aad22d446d7882bbbdb80b9f84c621f825c9f435e63fd68e2b60350f2f6c980125f
7
- data.tar.gz: 1df49fe34050f97991b4450526a782339ac3a5fbbe1ae68f1864a5b03c889896a61c80fd628281fbf54a05baa961fd5b63a4405bdc03871de6f67ccba42a3c57
6
+ metadata.gz: acf3cc38f3c1a6e64c8902584148c61a0d0371f2f33ecbe775906432af8db555879ef3815a37ca6d6848c05adde00736790a9994a797dba03690ee83d288e5ff
7
+ data.tar.gz: cc03517cc9d9296375852c1768f3923dcaa5cf06821090c47d401866e0ba59f620237ca4886fc3d46df990b550e85add94471d17dde2315bb388ac0b9f424dda
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.3.0
2
+ - Update methods and their descriptions
3
+
1
4
  ## 1.2.0
2
5
  - Update method names and docs about likes API
3
6
 
@@ -1,367 +1,374 @@
1
1
  module Qiita
2
2
  module ResourceBasedMethods
3
3
  # ### Qiita::Client#create_access_token(params = nil, headers = nil)
4
- # 与えられた認証情報をもとに新しいアクセストークンを発行します。
4
+ # Create a new access token.
5
5
  #
6
6
  def create_access_token(params = nil, headers = nil)
7
7
  post("/api/v2/access_tokens", params, headers)
8
8
  end
9
9
 
10
- # ### Qiita::Client#delete_access_token(token, params = nil, headers = nil)
11
- # 与えられたアクセストークンを失効させ、それ以降利用されないようにします。
10
+ # ### Qiita::Client#delete_access_token(params = nil, headers = nil)
11
+ # Deactivate an access token.
12
12
  #
13
- def delete_access_token(token, params = nil, headers = nil)
14
- delete("/api/v2/access_tokens/#{token}", params, headers)
13
+ def delete_access_token(params = nil, headers = nil)
14
+ delete("/api/v2/access_tokens/:access_token", params, headers)
15
15
  end
16
16
 
17
- # ### Qiita::Client#get_comment(id, params = nil, headers = nil)
18
- # 特定のコメントを返します。
17
+ # ### Qiita::Client#get_authenticated_user(params = nil, headers = nil)
18
+ # Get a user associated to the current access token.
19
19
  #
20
- def get_comment(id, params = nil, headers = nil)
21
- get("/api/v2/comments/#{id}", params, headers)
20
+ def get_authenticated_user(params = nil, headers = nil)
21
+ get("/api/v2/authenticated_user", params, headers)
22
22
  end
23
23
 
24
- # ### Qiita::Client#delete_comment(id, params = nil, headers = nil)
25
- # 特定のコメントを削除します。
24
+ # ### Qiita::Client#delete_comment(params = nil, headers = nil)
25
+ # Delete a comment.
26
26
  #
27
- def delete_comment(id, params = nil, headers = nil)
28
- delete("/api/v2/comments/#{id}", params, headers)
27
+ def delete_comment(params = nil, headers = nil)
28
+ delete("/api/v2/comments/:comment_id", params, headers)
29
29
  end
30
30
 
31
- # ### Qiita::Client#update_comment(id, params = nil, headers = nil)
32
- # 特定のコメントを更新します。
31
+ # ### Qiita::Client#get_comment(params = nil, headers = nil)
32
+ # Get a comment.
33
33
  #
34
- def update_comment(id, params = nil, headers = nil)
35
- patch("/api/v2/comments/#{id}", params, headers)
34
+ def get_comment(params = nil, headers = nil)
35
+ get("/api/v2/comments/:comment_id", params, headers)
36
36
  end
37
37
 
38
- # ### Qiita::Client#list_item_comments(item_id, params = nil, headers = nil)
39
- # 特定の投稿に寄せられたコメント一覧を作成日時の降順で返します。
38
+ # ### Qiita::Client#update_comment(params = nil, headers = nil)
39
+ # Update a comment.
40
40
  #
41
- def list_item_comments(item_id, params = nil, headers = nil)
42
- get("/api/v2/items/#{item_id}/comments", params, headers)
41
+ def update_comment(params = nil, headers = nil)
42
+ patch("/api/v2/comments/:comment_id", params, headers)
43
43
  end
44
44
 
45
- # ### Qiita::Client#create_item_comment(item_id, params = nil, headers = nil)
46
- # 特定の投稿にコメントを付けます。
45
+ # ### Qiita::Client#unthank_comment(params = nil, headers = nil)
46
+ # Delete a thank from a comment.
47
47
  #
48
- def create_item_comment(item_id, params = nil, headers = nil)
49
- post("/api/v2/items/#{item_id}/comments", params, headers)
48
+ def unthank_comment(params = nil, headers = nil)
49
+ delete("/api/v2/comments/:comment_id/thank", params, headers)
50
50
  end
51
51
 
52
- # ### Qiita::Client#thank_comment(comment_id, params = nil, headers = nil)
53
- # 特定のコメントにThankを付けます。
52
+ # ### Qiita::Client#thank_comment(params = nil, headers = nil)
53
+ # Send a thank to a comment.
54
54
  #
55
- def thank_comment(comment_id, params = nil, headers = nil)
56
- put("/api/v2/comments/#{comment_id}/thank", params, headers)
55
+ def thank_comment(params = nil, headers = nil)
56
+ put("/api/v2/comments/:comment_id/thank", params, headers)
57
57
  end
58
58
 
59
- # ### Qiita::Client#unthank_comment(comment_id, params = nil, headers = nil)
60
- # 特定のコメントからThankを外します。
59
+ # ### Qiita::Client#list_item_comments(params = nil, headers = nil)
60
+ # List comments on an item in newest order.
61
61
  #
62
- def unthank_comment(comment_id, params = nil, headers = nil)
63
- delete("/api/v2/comments/#{comment_id}/thank", params, headers)
62
+ def list_item_comments(params = nil, headers = nil)
63
+ post("/api/v2/items/:item_id/comments", params, headers)
64
64
  end
65
65
 
66
- # ### Qiita::Client#list_items(params = nil, headers = nil)
67
- # 投稿の一覧を作成日時の降順で返します。
66
+ # ### Qiita::Client#create_item_comment(params = nil, headers = nil)
67
+ # Post a comment on an item.
68
68
  #
69
- def list_items(params = nil, headers = nil)
70
- get("/api/v2/items", params, headers)
69
+ def create_item_comment(params = nil, headers = nil)
70
+ post("/api/v2/items/:item_id/comments", params, headers)
71
+ end
72
+
73
+ # ### Qiita::Client#create_expanded_template(params = nil, headers = nil)
74
+ # Get a template where its variables are expanded.
75
+ #
76
+ def create_expanded_template(params = nil, headers = nil)
77
+ post("/api/v2/expanded_templates", params, headers)
71
78
  end
72
79
 
73
80
  # ### Qiita::Client#list_authenticated_user_items(params = nil, headers = nil)
74
- # 認証中のユーザの投稿の一覧を作成日時の降順で返します。
81
+ # List the authenticated user's items in newest order
75
82
  #
76
83
  def list_authenticated_user_items(params = nil, headers = nil)
77
84
  get("/api/v2/authenticated_user/items", params, headers)
78
85
  end
79
86
 
87
+ # ### Qiita::Client#list_items(params = nil, headers = nil)
88
+ # List items.
89
+ #
90
+ def list_items(params = nil, headers = nil)
91
+ get("/api/v2/items", params, headers)
92
+ end
93
+
80
94
  # ### Qiita::Client#create_item(params = nil, headers = nil)
81
- # 新たに投稿を作成します。
95
+ # Create an item.
82
96
  #
83
97
  def create_item(params = nil, headers = nil)
84
98
  post("/api/v2/items", params, headers)
85
99
  end
86
100
 
87
- # ### Qiita::Client#get_item(id, params = nil, headers = nil)
88
- # 特定の投稿を返します。
101
+ # ### Qiita::Client#delete_item(params = nil, headers = nil)
102
+ # Delete an item.
89
103
  #
90
- def get_item(id, params = nil, headers = nil)
91
- get("/api/v2/items/#{id}", params, headers)
104
+ def delete_item(params = nil, headers = nil)
105
+ get("/api/v2/items/:item_id", params, headers)
92
106
  end
93
107
 
94
- # ### Qiita::Client#update_item(id, params = nil, headers = nil)
95
- # 特定の投稿を編集します。
108
+ # ### Qiita::Client#get_item(params = nil, headers = nil)
109
+ # Get an item.
96
110
  #
97
- def update_item(id, params = nil, headers = nil)
98
- patch("/api/v2/items/#{id}", params, headers)
111
+ def get_item(params = nil, headers = nil)
112
+ get("/api/v2/items/:item_id", params, headers)
99
113
  end
100
114
 
101
- # ### Qiita::Client#delete_item(id, params = nil, headers = nil)
102
- # 特定の投稿を削除します。
115
+ # ### Qiita::Client#update_item(params = nil, headers = nil)
116
+ # Update an item.
103
117
  #
104
- def delete_item(id, params = nil, headers = nil)
105
- delete("/api/v2/items/#{id}", params, headers)
118
+ def update_item(params = nil, headers = nil)
119
+ patch("/api/v2/items/:item_id", params, headers)
106
120
  end
107
121
 
108
- # ### Qiita::Client#list_tag_items(id, params = nil, headers = nil)
109
- # 特定のタグが付けられた投稿一覧を、タグを付けた日時の降順で返します。
122
+ # ### Qiita::Client#unlike_item(params = nil, headers = nil)
123
+ # Unlike an item (only available on Qiita:Team).
110
124
  #
111
- def list_tag_items(id, params = nil, headers = nil)
112
- get("/api/v2/tags/#{id}/items", params, headers)
125
+ def unlike_item(params = nil, headers = nil)
126
+ delete("/api/v2/items/:item_id/like", params, headers)
113
127
  end
114
128
 
115
- # ### Qiita::Client#list_user_items(user_id, params = nil, headers = nil)
116
- # 特定のユーザの投稿一覧を作成日時の降順で返します。
129
+ # ### Qiita::Client#like_item(params = nil, headers = nil)
130
+ # Like an item (only available on Qiita:Team).
117
131
  #
118
- def list_user_items(user_id, params = nil, headers = nil)
119
- get("/api/v2/users/#{user_id}/items", params, headers)
132
+ def like_item(params = nil, headers = nil)
133
+ put("/api/v2/items/:item_id/like", params, headers)
120
134
  end
121
135
 
122
- # ### Qiita::Client#list_user_stocks(user_id, params = nil, headers = nil)
123
- # 特定のユーザがストックした投稿一覧をストックした日時の降順で返します。
136
+ # ### Qiita::Client#unstock_item(params = nil, headers = nil)
137
+ # Unstock an item.
124
138
  #
125
- def list_user_stocks(user_id, params = nil, headers = nil)
126
- get("/api/v2/users/#{user_id}/stocks", params, headers)
139
+ def unstock_item(params = nil, headers = nil)
140
+ delete("/api/v2/items/:item_id/stock", params, headers)
127
141
  end
128
142
 
129
- # ### Qiita::Client#get_item_stock(item_id, params = nil, headers = nil)
130
- # 特定の投稿をストックしている場合に204を返します。
143
+ # ### Qiita::Client#get_item_stock(params = nil, headers = nil)
144
+ # Check if you stocked an item.
131
145
  #
132
- def get_item_stock(item_id, params = nil, headers = nil)
133
- get("/api/v2/items/#{item_id}/stock", params, headers)
146
+ def get_item_stock(params = nil, headers = nil)
147
+ get("/api/v2/items/:item_id/stock", params, headers)
134
148
  end
135
149
 
136
- # ### Qiita::Client#stock_item(item_id, params = nil, headers = nil)
137
- # 特定の投稿をストックします。
150
+ # ### Qiita::Client#stock_item(params = nil, headers = nil)
151
+ # Stock an item.
138
152
  #
139
- def stock_item(item_id, params = nil, headers = nil)
140
- put("/api/v2/items/#{item_id}/stock", params, headers)
153
+ def stock_item(params = nil, headers = nil)
154
+ put("/api/v2/items/:item_id/stock", params, headers)
141
155
  end
142
156
 
143
- # ### Qiita::Client#unstock_item(item_id, params = nil, headers = nil)
144
- # 特定の投稿をストックから取り除きます。
157
+ # ### Qiita::Client#stock_item(params = nil, headers = nil)
158
+ # Stock an item.
145
159
  #
146
- def unstock_item(item_id, params = nil, headers = nil)
147
- delete("/api/v2/items/#{item_id}/stock", params, headers)
160
+ def stock_item(params = nil, headers = nil)
161
+ put("/api/v2/items/:item_id/stock", params, headers)
148
162
  end
149
163
 
150
- # ### Qiita::Client#like_item(item_id, params = nil, headers = nil)
151
- # 特定の投稿に「いいね!」を付けます。Qiita:Teamでのみ有効です。
164
+ # ### Qiita::Client#list_tag_items(params = nil, headers = nil)
165
+ # List tagged items in recently-tagged order.
152
166
  #
153
- def like_item(item_id, params = nil, headers = nil)
154
- put("/api/v2/items/#{item_id}/like", params, headers)
167
+ def list_tag_items(params = nil, headers = nil)
168
+ get("/api/v2/tags/:tag_id/items", params, headers)
155
169
  end
156
170
 
157
- # ### Qiita::Client#unlike_item(item_id, params = nil, headers = nil)
158
- # 特定の投稿への「いいね!」を取り消します。Qiita:Teamでのみ有効です。
171
+ # ### Qiita::Client#list_user_items(params = nil, headers = nil)
172
+ # List a user's items in newest order.
159
173
  #
160
- def unlike_item(item_id, params = nil, headers = nil)
161
- delete("/api/v2/items/#{item_id}/like", params, headers)
174
+ def list_user_items(params = nil, headers = nil)
175
+ get("/api/v2/users/:user_id/items", params, headers)
162
176
  end
163
177
 
164
- # ### Qiita::Client#list_projects(params = nil, headers = nil)
165
- # チーム内に存在するプロジェクト一覧をプロジェクト作成日時の降順で返します。
178
+ # ### Qiita::Client#list_user_stocks(params = nil, headers = nil)
179
+ # List a user's stocked items in recently-stocked order.
166
180
  #
167
- def list_projects(params = nil, headers = nil)
168
- get("/api/v2/projects", params, headers)
181
+ def list_user_stocks(params = nil, headers = nil)
182
+ get("/api/v2/users/:user_id/stocks", params, headers)
169
183
  end
170
184
 
171
- # ### Qiita::Client#get_project(id, params = nil, headers = nil)
172
- # 特定のプロジェクトを返します。
185
+ # ### Qiita::Client#list_projects(params = nil, headers = nil)
186
+ # List projects in newest order.
173
187
  #
174
- def get_project(id, params = nil, headers = nil)
175
- get("/api/v2/projects/#{id}", params, headers)
188
+ def list_projects(params = nil, headers = nil)
189
+ get("/api/v2/projects", params, headers)
176
190
  end
177
191
 
178
192
  # ### Qiita::Client#create_project(params = nil, headers = nil)
179
- # プロジェクトを新たに作成します。
193
+ # Create a new project.
180
194
  #
181
195
  def create_project(params = nil, headers = nil)
182
196
  post("/api/v2/projects", params, headers)
183
197
  end
184
198
 
185
- # ### Qiita::Client#delete_project(id, params = nil, headers = nil)
186
- # 特定のプロジェクトを削除します。
199
+ # ### Qiita::Client#delete_project(params = nil, headers = nil)
200
+ # Delete a project.
187
201
  #
188
- def delete_project(id, params = nil, headers = nil)
189
- delete("/api/v2/projects/#{id}", params, headers)
202
+ def delete_project(params = nil, headers = nil)
203
+ delete("/api/v2/projects/:project_id", params, headers)
190
204
  end
191
205
 
192
- # ### Qiita::Client#update_project(id, params = nil, headers = nil)
193
- # 特定のプロジェクトを編集します。
206
+ # ### Qiita::Client#get_project(params = nil, headers = nil)
207
+ # Get a project.
194
208
  #
195
- def update_project(id, params = nil, headers = nil)
196
- patch("/api/v2/projects/#{id}", params, headers)
209
+ def get_project(params = nil, headers = nil)
210
+ get("/api/v2/projects/:project_id", params, headers)
197
211
  end
198
212
 
199
- # ### Qiita::Client#create_expanded_template(params = nil, headers = nil)
200
- # 受け取ったテンプレート用文字列の変数を展開して返します。
213
+ # ### Qiita::Client#patch_project(params = nil, headers = nil)
214
+ # Update a project
201
215
  #
202
- def create_expanded_template(params = nil, headers = nil)
203
- post("/api/v2/expanded_templates", params, headers)
216
+ def patch_project(params = nil, headers = nil)
217
+ patch("/api/v2/projects/:project_id", params, headers)
204
218
  end
205
219
 
206
220
  # ### Qiita::Client#list_tags(params = nil, headers = nil)
207
- # 全てのタグ一覧をタグ作成日時の降順で返します。
221
+ # List tags in newest order.
208
222
  #
209
223
  def list_tags(params = nil, headers = nil)
210
224
  get("/api/v2/tags", params, headers)
211
225
  end
212
226
 
213
- # ### Qiita::Client#get_tag(id, params = nil, headers = nil)
214
- # 特定のタグを返します。
227
+ # ### Qiita::Client#get_tag(params = nil, headers = nil)
228
+ # Get a tag.
215
229
  #
216
- def get_tag(id, params = nil, headers = nil)
217
- get("/api/v2/tags/#{id}", params, headers)
230
+ def get_tag(params = nil, headers = nil)
231
+ get("/api/v2/tags/:tag_id", params, headers)
218
232
  end
219
233
 
220
- # ### Qiita::Client#list_user_following_tags(user_id, params = nil, headers = nil)
221
- # 特定のユーザがフォローしているタグ一覧をフォローした日時の降順で返します。
234
+ # ### Qiita::Client#list_user_following_tags(params = nil, headers = nil)
235
+ # List tags a user is following to in recently-tagged order.
222
236
  #
223
- def list_user_following_tags(user_id, params = nil, headers = nil)
224
- get("/api/v2/users/#{user_id}/following_tags", params, headers)
237
+ def list_user_following_tags(params = nil, headers = nil)
238
+ get("/api/v2/users/:user_id/following_tags", params, headers)
225
239
  end
226
240
 
227
- # ### Qiita::Client#get_tag_following(id, params = nil, headers = nil)
228
- # 特定のタグをフォローしている場合に204を返します。
241
+ # ### Qiita::Client#unfollow_tag(params = nil, headers = nil)
242
+ # Unfollow a tag.
229
243
  #
230
- def get_tag_following(id, params = nil, headers = nil)
231
- get("/api/v2/tags/#{id}/following", params, headers)
244
+ def unfollow_tag(params = nil, headers = nil)
245
+ delete("/api/v2/tags/:tag_id/following", params, headers)
232
246
  end
233
247
 
234
- # ### Qiita::Client#follow_tag(id, params = nil, headers = nil)
235
- # 特定のタグをフォローします。
248
+ # ### Qiita::Client#get_tag_following(params = nil, headers = nil)
249
+ # Check if you are following a tag or not.
236
250
  #
237
- def follow_tag(id, params = nil, headers = nil)
238
- put("/api/v2/tags/#{id}/following", params, headers)
251
+ def get_tag_following(params = nil, headers = nil)
252
+ get("/api/v2/tags/:tag_id/following", params, headers)
239
253
  end
240
254
 
241
- # ### Qiita::Client#unfollow_tag(id, params = nil, headers = nil)
242
- # 特定のタグへのフォローを解除します。
255
+ # ### Qiita::Client#follow_tag(params = nil, headers = nil)
256
+ # Follow a tag.
243
257
  #
244
- def unfollow_tag(id, params = nil, headers = nil)
245
- delete("/api/v2/tags/#{id}/following", params, headers)
258
+ def follow_tag(params = nil, headers = nil)
259
+ put("/api/v2/tags/:tag_id/following", params, headers)
246
260
  end
247
261
 
248
- # ### Qiita::Client#create_tagging(item_id, params = nil, headers = nil)
249
- # 投稿にタグを追加します。Qiita:Teamでのみ有効です。
262
+ # ### Qiita::Client#create_tagging(params = nil, headers = nil)
263
+ # Add a tag to an item (only available on Qiita:Team)
250
264
  #
251
- def create_tagging(item_id, params = nil, headers = nil)
252
- post("/api/v2/items/#{item_id}/taggings", params, headers)
265
+ def create_tagging(params = nil, headers = nil)
266
+ post("/api/v2/items/:item_id/taggings", params, headers)
253
267
  end
254
268
 
255
- # ### Qiita::Client#delete_tagging(item_id, name, params = nil, headers = nil)
256
- # 投稿から指定されたタグを取り除きます。Qiita:Teamでのみ有効です。
269
+ # ### Qiita::Client#delete_tagging(params = nil, headers = nil)
270
+ # Remove a tag from an item (only available on Qiita:Team)
257
271
  #
258
- def delete_tagging(item_id, name, params = nil, headers = nil)
259
- delete("/api/v2/items/#{item_id}/taggings/#{name}", params, headers)
272
+ def delete_tagging(params = nil, headers = nil)
273
+ delete("/api/v2/items/:item_id/taggings/:tagging_id", params, headers)
260
274
  end
261
275
 
262
276
  # ### Qiita::Client#list_teams(params = nil, headers = nil)
263
- # 現在のリクエストで認証されているユーザが所属している全てのチームを、チーム作成日時の降順で返します。
277
+ # List teams the user belongs to in newest order.
264
278
  #
265
279
  def list_teams(params = nil, headers = nil)
266
280
  get("/api/v2/teams", params, headers)
267
281
  end
268
282
 
269
283
  # ### Qiita::Client#list_templates(params = nil, headers = nil)
270
- # そのチームに存在するテンプレート一覧を返します。
284
+ # List templates in a team.
271
285
  #
272
286
  def list_templates(params = nil, headers = nil)
273
287
  get("/api/v2/templates", params, headers)
274
288
  end
275
289
 
276
- # ### Qiita::Client#get_template(id, params = nil, headers = nil)
277
- # 特定のテンプレートを返します。
290
+ # ### Qiita::Client#delete_template(params = nil, headers = nil)
291
+ # Delete a template.
278
292
  #
279
- def get_template(id, params = nil, headers = nil)
280
- get("/api/v2/templates/#{id}", params, headers)
293
+ def delete_template(params = nil, headers = nil)
294
+ delete("/api/v2/templates/:template_id", params, headers)
281
295
  end
282
296
 
283
- # ### Qiita::Client#delete_template(id, params = nil, headers = nil)
284
- # 特定のテンプレートを削除します。
297
+ # ### Qiita::Client#get_template(params = nil, headers = nil)
298
+ # Get a template.
285
299
  #
286
- def delete_template(id, params = nil, headers = nil)
287
- delete("/api/v2/templates/#{id}", params, headers)
300
+ def get_template(params = nil, headers = nil)
301
+ get("/api/v2/templates/:template_id", params, headers)
288
302
  end
289
303
 
290
304
  # ### Qiita::Client#create_template(params = nil, headers = nil)
291
- # 新しくテンプレートを作成します。
305
+ # Create a new template.
292
306
  #
293
307
  def create_template(params = nil, headers = nil)
294
308
  post("/api/v2/templates", params, headers)
295
309
  end
296
310
 
297
- # ### Qiita::Client#update_template(id, params = nil, headers = nil)
298
- # 特定のテンプレートを編集します。
311
+ # ### Qiita::Client#update_template(params = nil, headers = nil)
312
+ # Update a template.
299
313
  #
300
- def update_template(id, params = nil, headers = nil)
301
- patch("/api/v2/templates/#{id}", params, headers)
314
+ def update_template(params = nil, headers = nil)
315
+ patch("/api/v2/templates/:template_id", params, headers)
302
316
  end
303
317
 
304
- # ### Qiita::Client#list_users(params = nil, headers = nil)
305
- # 全てのユーザの一覧を作成日時の降順で返します。
318
+ # ### Qiita::Client#list_item_stockers(params = nil, headers = nil)
319
+ # List users who stocked an item in recent-stocked order.
306
320
  #
307
- def list_users(params = nil, headers = nil)
308
- get("/api/v2/users", params, headers)
321
+ def list_item_stockers(params = nil, headers = nil)
322
+ get("/api/v2/items/:item_id/stockers", params, headers)
309
323
  end
310
324
 
311
- # ### Qiita::Client#get_user(id, params = nil, headers = nil)
312
- # 特定のユーザを返します。
313
- #
314
- def get_user(id, params = nil, headers = nil)
315
- get("/api/v2/users/#{id}", params, headers)
316
- end
317
-
318
- # ### Qiita::Client#get_authenticated_user(params = nil, headers = nil)
319
- # アクセストークンに紐付いたユーザを返します。
325
+ # ### Qiita::Client#list_users(params = nil, headers = nil)
326
+ # List users in newest order.
320
327
  #
321
- def get_authenticated_user(params = nil, headers = nil)
322
- get("/api/v2/authenticated_user", params, headers)
328
+ def list_users(params = nil, headers = nil)
329
+ get("/api/v2/users", params, headers)
323
330
  end
324
331
 
325
- # ### Qiita::Client#list_user_followees(user_id, params = nil, headers = nil)
326
- # 特定のユーザがフォローしているユーザ一覧を返します。
332
+ # ### Qiita::Client#get_user(params = nil, headers = nil)
333
+ # Get a user.
327
334
  #
328
- def list_user_followees(user_id, params = nil, headers = nil)
329
- get("/api/v2/users/#{user_id}/followees", params, headers)
335
+ def get_user(params = nil, headers = nil)
336
+ get("/api/v2/users/:user_id", params, headers)
330
337
  end
331
338
 
332
- # ### Qiita::Client#list_user_followers(user_id, params = nil, headers = nil)
333
- # 特定のユーザをフォローしているユーザ一覧を返します。
339
+ # ### Qiita::Client#list_user_followees(params = nil, headers = nil)
340
+ # List users a user is following.
334
341
  #
335
- def list_user_followers(user_id, params = nil, headers = nil)
336
- get("/api/v2/users/#{user_id}/followers", params, headers)
342
+ def list_user_followees(params = nil, headers = nil)
343
+ get("/api/v2/users/:user_id/followees", params, headers)
337
344
  end
338
345
 
339
- # ### Qiita::Client#list_item_stockers(item_id, params = nil, headers = nil)
340
- # 特定の投稿をストックしているユーザ一覧を、ストックした日時の降順で返します。
346
+ # ### Qiita::Client#list_user_followers(params = nil, headers = nil)
347
+ # List users who are following a user.
341
348
  #
342
- def list_item_stockers(item_id, params = nil, headers = nil)
343
- get("/api/v2/items/#{item_id}/stockers", params, headers)
349
+ def list_user_followers(params = nil, headers = nil)
350
+ get("/api/v2/users/:user_id/followers", params, headers)
344
351
  end
345
352
 
346
- # ### Qiita::Client#get_user_following(user_id, params = nil, headers = nil)
347
- # 特定のユーザをフォローしている場合に204を返します。
353
+ # ### Qiita::Client#unfollow_user(params = nil, headers = nil)
354
+ # Unfollow a user.
348
355
  #
349
- def get_user_following(user_id, params = nil, headers = nil)
350
- get("/api/v2/users/#{user_id}/following", params, headers)
356
+ def unfollow_user(params = nil, headers = nil)
357
+ delete("/api/v2/users/:user_id/following", params, headers)
351
358
  end
352
359
 
353
- # ### Qiita::Client#follow_user(user_id, params = nil, headers = nil)
354
- # 特定のユーザをフォローします。
360
+ # ### Qiita::Client#get_user_following(params = nil, headers = nil)
361
+ # Check if the current user is following a user.
355
362
  #
356
- def follow_user(user_id, params = nil, headers = nil)
357
- put("/api/v2/users/#{user_id}/following", params, headers)
363
+ def get_user_following(params = nil, headers = nil)
364
+ get("/api/v2/users/:user_id/following", params, headers)
358
365
  end
359
366
 
360
- # ### Qiita::Client#unfollow_user(user_id, params = nil, headers = nil)
361
- # 特定のユーザへのフォローを外します。
367
+ # ### Qiita::Client#follow_user(params = nil, headers = nil)
368
+ # Follow a user.
362
369
  #
363
- def unfollow_user(user_id, params = nil, headers = nil)
364
- delete("/api/v2/users/#{user_id}/following", params, headers)
370
+ def follow_user(params = nil, headers = nil)
371
+ put("/api/v2/users/:user_id/following", params, headers)
365
372
  end
366
373
  end
367
374
  end
data/lib/qiita/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qiita
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
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.2.0
4
+ version: 1.3.0
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-05-20 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -253,3 +253,4 @@ summary: A client library for Qiita API v2 written in Ruby.
253
253
  test_files:
254
254
  - spec/qiita/client_spec.rb
255
255
  - spec/spec_helper.rb
256
+ has_rdoc: