Class FavoritesRest


  • @Path("/rest/favorites-api")
    public class FavoritesRest
    extends java.lang.Object
    FavoritesRest
    • Constructor Summary

      Constructors 
      Constructor Description
      FavoritesRest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response addFavorite​(java.lang.String strFavoriteJson, java.lang.String strApiKey)  
      javax.ws.rs.core.Response getAllFavorites​(javax.servlet.http.HttpServletRequest request)
      Get all favorites
      javax.ws.rs.core.Response getFavorites​(javax.servlet.http.HttpServletRequest request)
      Get last favorites
      javax.ws.rs.core.Response removeFavorite​(java.lang.Integer id, java.lang.String strApiKey)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FavoritesRest

        public FavoritesRest()
    • Method Detail

      • getFavorites

        @GET
        @Path("/lastFavorites")
        @Produces("application/json")
        public javax.ws.rs.core.Response getFavorites​(@Context
                                                      javax.servlet.http.HttpServletRequest request)
        Get last favorites
        Parameters:
        request -
        nNbFavoritesToShow -
        Returns:
        Json
      • getAllFavorites

        @GET
        @Path("/allFavorites")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response getAllFavorites​(@Context
                                                         javax.servlet.http.HttpServletRequest request)
        Get all favorites
        Parameters:
        request -
        nNbFavoritesToShow -
        Returns:
        Json
      • addFavorite

        @POST
        @Path("/add")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response addFavorite​(java.lang.String strFavoriteJson,
                                                     @HeaderParam("X-API-KEY")
                                                     java.lang.String strApiKey)
      • removeFavorite

        @DELETE
        @Path("/remove/{id}")
        @Produces("application/json")
        public javax.ws.rs.core.Response removeFavorite​(@PathParam("id")
                                                        java.lang.Integer id,
                                                        @HeaderParam("X-API-KEY")
                                                        java.lang.String strApiKey)