com.atlassian.bitbucket.comment.like.CommentLikeService |
Provides API for creating, removing and querying comment likes. Users can express their support for a comment ("like"
the comment), as well as remove their support ("unlike" the comment). For any comment clients can
query for
a list of users who have liked the comment.
Note that all of the methods make use of the
current authenticated user
to process
the requests.
The "like" and "unlike" operations are idempotent - invoking them multiple times in a row will not change the "liked" status of the comment with regards to the particular user beyond the initial invocation.
All operations require the user to have the read permission
to
the repository the comment belongs to.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get a page of "likers" of the
comment (i.e. | |||||||||||
Checks whether the specified comment has been liked by the
current authenticated user . | |||||||||||
Like the
comment as the
current authenticated user . | |||||||||||
Remove like from the
comment as the
current authenticated user . |
Get a page of "likers" of the comment
(i.e. users who have liked the comment).
The global order of the likers will be as the consecutive likes were recorded, with the exception of the
current authenticated user
- if that
user has previously liked the comment
, they will be "promoted" to the first position (globally) in the
list, meaning that they will only be returned in a page requested with a page request
start
equal to 0.
repository | the repository that the comment belongs to |
---|---|
comment | the comment |
pageRequest | page request |
pageRequest
. May be empty, but never
null
AuthorisationException | if the user has no read permission to the
repository
|
---|
Checks whether the specified comment has been liked by the
current authenticated user
.
comment | the comment to check |
---|
Like the comment
as the
current authenticated user
. If the
current user has already liked the comment previously, this call will have no effect.
Comment authors are not allowed or unlike to like their own comments.
repository | the repository that the comment belongs to |
---|---|
comment | the comment to like |
AuthorisationException | if the current user has no read permission to the
repository |
---|---|
ArgumentValidationException | if the current user is the comment author |
Remove like from the comment
as the
current authenticated user
. If the
current user has not liked the comment previously, this call will have no effect.
Comment authors are not allowed or unlike to like their own comments.
repository | the repository that the comment belongs to |
---|---|
comment | the comment to like |
AuthorisationException | if the current user has no read permission to the
repository |
---|---|
ArgumentValidationException | if the current user is the comment author |