# Class: CommentClient

## CommentClient

## Constructor

#### new CommentClient(jiraClient)

Used to access Jira REST endpoints in '/rest/api/2/comment'

##### Parameters:

Name | Type | Description
--- | --- | ---
`jiraClient` | JiraClient |

Source:
  - api/comment.js, line 7

### Methods

#### deleteCommentProperty(opts, callback)

Removes the property from the comment identified by the key or by the id. Ths user removing the property is required to have permissions to administer the comment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The options passed in the request to the API. ###### Properties
Name | Type | Description
--- | --- | ---
`commentId` |  | The id of the comment from which keys will be returned.
`propertyKey` |  | The key of the property to be edited.
`callback` |  | Called when the property has been retrieved.

Source:
  - api/comment.js, line 72

#### getCommentProperty(opts, callback)

Returns the value of the property with a given key from the comment identified by the key or by the id. The user who retrieves the property is required to have permissions to read the comment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The options passed in the request to the API. ###### Properties
Name | Type | Description
--- | --- | ---
`commentId` |  | The id of the comment from which keys will be returned.
`propertyKey` |  | The key of the property to be edited.
`callback` |  | Called when the property has been retrieved.

Source:
  - api/comment.js, line 53

#### getCommentPropertyKeys(opts, callback)

Returns the keys of all properties for the comment identified by the key or by the id.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The options passed in the request to the API. ###### Properties
Name | Type | Description
--- | --- | ---
`commentId` |  | The id of the comment from which keys will be returned.
`callback` |  | Called when the keys have been retrieved.

Source:
  - api/comment.js, line 15

#### setCommentProperty(opts, callback)

Sets the value of the specified comment's property.

You can use this resource to store a custom data against the comment identified by the key or by the id. The user who stores the data is required to have permissions to administer the comment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`opts` |  | The options passed in the request to the API. ###### Properties
Name | Type | Description
--- | --- | ---
`commentId` |  | The id of the comment from which keys will be returned.
`propertyKey` |  | The key of the property to be edited.
`propertyValue` |  | The new value of the property.
`callback` |  | Called when the property has been edited.

Source:
  - api/comment.js, line 29