Class Likes
- java.lang.Object
-
- org.gcube.portal.social.networking.ws.methods.v2.Likes
-
@Path("2/likes") public class Likes extends ObjectREST interface for the social networking library (likes).- Author:
- Ahmed Ibrahim ISTI-CNR
-
-
Constructor Summary
Constructors Constructor Description Likes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetAllLikesByPostId(@NotNull String key)javax.ws.rs.core.Responselike(@NotNull(message="Post to like is missing") @Valid PostId post)Create a new like to a post in the context of the tokenjavax.ws.rs.core.Responseunlike(@NotNull(message="Post to unlike is missing") @Valid LikeInputBean likeInputBean)Unlike to a post in the context of the token
-
-
-
Method Detail
-
getAllLikesByPostId
@GET @Produces("application/json") @Path("get-likes-by-post-id") public javax.ws.rs.core.Response getAllLikesByPostId(@NotNull @QueryParam("key") @NotNull String key)
-
like
@POST @Path("like-post") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response like(@NotNull(message="Post to like is missing") @Valid @NotNull(message="Post to like is missing") @Valid PostId post) throws javax.validation.ValidationExceptionCreate a new like to a post in the context of the token- Parameters:
postid- The post id to be liked- Returns:
- true if everything is OK
- Throws:
javax.validation.ValidationException
-
unlike
@POST @Path("unlike-post") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response unlike(@NotNull(message="Post to unlike is missing") @Valid @NotNull(message="Post to unlike is missing") @Valid LikeInputBean likeInputBean) throws javax.validation.ValidationExceptionUnlike to a post in the context of the token- Parameters:
postid- The post id to be liked- Returns:
- true if everything is OK
- Throws:
javax.validation.ValidationException
-
-