Comments endpoint

Comments documentation

Fetch all project comments

project_comments(project_id[, params = None])
Parameters:
  • project_id (str) – ID of the project to fetch comments for.

  • params (dict) – (optional) pagination options

Returns:

Collection of comments

Example:

client.project_comments('123.abc', {"page": 2, "limit": 1})

Fetch all key comments

key_comments(project_id, key_id[, params = None])
Parameters:
  • project_id (str) – ID of the project

  • key_id (int or str) – ID of key to fetch comments for

  • params (dict) – (optional) pagination options

Returns:

Collection of comments

Example:

client.key_comments('123.abc', 3456, {"limit": 1, "page": 2})

Fetch key comment

key_comment(project_id, key_id, comment_id)
Parameters:
  • project_id (str) – ID of the project

  • key_id (int or str) – ID of key to fetch comments for

  • comment_id (int or str) – Comment identifier to fetch

Returns:

Comment model

Example:

comment = client.key_comment('123.abc', 3456, 1234)
comment.key_id # => 3456
comment.added_by_email # => "test@example.com"

Create key comments

create_key_comments(project_id, key_id, params)
Parameters:
  • project_id (str) – ID of the project

  • key_id (int or str) – ID of key to create comments for

  • params (list or dict) – Comment parameters

Returns:

Collection of comments

Example:

client.create_key_comments('123.abc', 3456, [
    {
        "comment": "Python comment 1"
    }, {
        "comment": "Python comment 2"
    }
])

Delete key comment

delete_key_comment(project_id, key_id, comment_id)
Parameters:
  • project_id (str) – ID of the project

  • key_id (int or str) – ID of key to delete comment for.

  • comment_id (int or str) – Comment to delete

Returns:

Dictionary with project ID and “comment_deleted” set to True

Example:

client.delete_key_comment('123.abc', 3456, 9838)