Comments#

comment(self, comment_id)#

Get a comment and its replies (up to 2 levels deep).

Parameters:

comment_id (int) – The comment to get.

Return type:

CommentBundle

Notes

Implements the Get a Comment endpoint.

comments(self, *, commentable_type=None, commentable_id=None, cursor=None, parent_id=None, sort=None)#

Get recent comments and their replies (up to 2 levels deep). If you only want to retrieve a single comment, see comment().

Parameters:
  • commentable_type (CommentableType | str | None) – The type of resource to get comments for.

  • commentable_id (int | None) – The id of the resource to get comments for.

  • cursor (Cursor | None) – Cursor for pagination.

  • parent_id (int | None) – Filter by id of the parent comment.

  • sort (CommentSort | str | None) – How to sort the comments. Defaults to new for guest account and the user-specified default when authenticated.

Return type:

CommentBundle

Notes

Implements the Get Comments endpoint.