##// END OF EJS Templates
docs: updated API documentation
marcink -
r4455:043990e1 default
parent child Browse files
Show More
@@ -252,6 +252,7 b' get_pull_request_comments'
252 },
252 },
253 "comment_text": "Example text",
253 "comment_text": "Example text",
254 "comment_type": null,
254 "comment_type": null,
255 "comment_last_version: 0,
255 "pull_request_version": null,
256 "pull_request_version": null,
256 "comment_commit_id": None,
257 "comment_commit_id": None,
257 "comment_pull_request_id": <pull_request_id>
258 "comment_pull_request_id": <pull_request_id>
@@ -173,6 +173,37 b' delete_repo'
173 error: null
173 error: null
174
174
175
175
176 edit_comment
177 ------------
178
179 .. py:function:: edit_comment(apiuser, message, comment_id, version, userid=<Optional:<OptionalAttr:apiuser>>)
180
181 Edit comment on the pull request or commit,
182 specified by the `comment_id` and version. Initially version should be 0
183
184 :param apiuser: This is filled automatically from the |authtoken|.
185 :type apiuser: AuthUser
186 :param comment_id: Specify the comment_id for editing
187 :type comment_id: int
188 :param version: version of the comment that will be created, starts from 0
189 :type version: int
190 :param message: The text content of the comment.
191 :type message: str
192 :param userid: Comment on the pull request as this user
193 :type userid: Optional(str or int)
194
195 Example output:
196
197 .. code-block:: bash
198
199 id : <id_given_in_input>
200 result : {
201 "comment": "<comment data>",
202 "version": "<Integer>",
203 },
204 error : null
205
206
176 fork_repo
207 fork_repo
177 ---------
208 ---------
178
209
@@ -236,6 +267,40 b' fork_repo'
236 error: null
267 error: null
237
268
238
269
270 get_comment
271 -----------
272
273 .. py:function:: get_comment(apiuser, comment_id)
274
275 Get single comment from repository or pull_request
276
277 :param apiuser: This is filled automatically from the |authtoken|.
278 :type apiuser: AuthUser
279 :param comment_id: comment id found in the URL of comment
280 :type comment_id: str or int
281
282 Example error output:
283
284 .. code-block:: bash
285
286 {
287 "id" : <id_given_in_input>,
288 "result" : {
289 "comment_author": <USER_DETAILS>,
290 "comment_created_on": "2017-02-01T14:38:16.309",
291 "comment_f_path": "file.txt",
292 "comment_id": 282,
293 "comment_lineno": "n1",
294 "comment_resolved_by": null,
295 "comment_status": [],
296 "comment_text": "This file needs a header",
297 "comment_type": "todo",
298 "comment_last_version: 0
299 },
300 "error" : null
301 }
302
303
239 get_repo
304 get_repo
240 --------
305 --------
241
306
@@ -436,7 +501,8 b' get_repo_comments'
436 "comment_resolved_by": null,
501 "comment_resolved_by": null,
437 "comment_status": [],
502 "comment_status": [],
438 "comment_text": "This file needs a header",
503 "comment_text": "This file needs a header",
439 "comment_type": "todo"
504 "comment_type": "todo",
505 "comment_last_version: 0
440 }
506 }
441 ],
507 ],
442 "error" : null
508 "error" : null
General Comments 0
You need to be logged in to leave comments. Login now