Class Likes


  • @Path("2/likes")
    public class Likes
    extends Object
    REST interface for the social networking library (likes).
    Author:
    Ahmed Ibrahim ISTI-CNR
    • Constructor Detail

      • Likes

        public Likes()
    • 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.ValidationException
        Create 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.ValidationException
        Unlike 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