@Path(value="/microstory") public class StoryResource extends Object
| Constructor and Description |
|---|
StoryResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addStoryInFavoriteList(String login,
int id) |
javax.ws.rs.core.Response |
createStory(StoryDto storyData) |
javax.ws.rs.core.Response |
deleteStory(String login,
Integer storyId) |
javax.ws.rs.core.Response |
exploreStories(String text,
String gender,
String topic,
String startDate,
String endDate,
Integer page,
Integer maxResults) |
javax.ws.rs.core.Response |
getByUser(String login,
Integer page,
Integer maxResults,
String topic,
String title,
String gender,
String startDate,
String endDate,
String isPublished) |
javax.ws.rs.core.Response |
getFavouritesStats(String login) |
javax.ws.rs.core.Response |
getMostViewedStories() |
javax.ws.rs.core.Response |
getRecentStories() |
javax.ws.rs.core.Response |
getStatisticsReadMicrostories(String login,
String gender,
String topic) |
javax.ws.rs.core.Response |
getStoryById(int id) |
javax.ws.rs.core.Response |
listFavoriteMicrostories(String login,
Integer page,
Integer maxResults,
String title,
String gender,
String topic,
String author) |
javax.ws.rs.core.Response |
obtainUserStoriesFavoriteStatistics(String login,
String gender,
String topic) |
javax.ws.rs.core.Response |
removeFromFavoriteList(String login,
int id) |
javax.ws.rs.core.Response |
updateStory(int id,
StoryDto storyData) |
@GET @Path(value="/recent") @Produces(value="application/json") public javax.ws.rs.core.Response getRecentStories()
@GET
@Path(value="/{id}")
@Produces(value="application/json")
public javax.ws.rs.core.Response getStoryById(@PathParam(value="id")
int id)
@GET
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response exploreStories(@QueryParam(value="contains")
String text,
@QueryParam(value="gender")
String gender,
@QueryParam(value="topic")
String topic,
@QueryParam(value="startDate")
String startDate,
@QueryParam(value="endDate")
String endDate,
@QueryParam(value="page") @DefaultValue(value="0")
Integer page,
@QueryParam(value="maxResults") @DefaultValue(value="10")
Integer maxResults)
@GET @Path(value="/hottest") @Produces(value="application/json") @Consumes(value="application/json") public javax.ws.rs.core.Response getMostViewedStories()
@PUT
@Path(value="/{id}")
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response updateStory(@PathParam(value="id")
int id,
StoryDto storyData)
@POST @Produces(value="application/json") @Consumes(value="application/json") public javax.ws.rs.core.Response createStory(StoryDto storyData)
@DELETE
@Path(value="/user/{login}/microstory/favourite/{id}")
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response removeFromFavoriteList(@PathParam(value="login")
String login,
@PathParam(value="id")
int id)
@GET
@Path(value="/user/{login}/microstory")
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response getByUser(@PathParam(value="login")
String login,
@QueryParam(value="page") @DefaultValue(value="0")
Integer page,
@QueryParam(value="maxResults") @DefaultValue(value="10")
Integer maxResults,
@QueryParam(value="topic")
String topic,
@QueryParam(value="title")
String title,
@QueryParam(value="gender")
String gender,
@QueryParam(value="startDate")
String startDate,
@QueryParam(value="endDate")
String endDate,
@QueryParam(value="published") @DefaultValue(value="true")
String isPublished)
@DELETE
@Path(value="/user/{login}/microstory/{idStory}")
@Produces(value="application/json")
public javax.ws.rs.core.Response deleteStory(@PathParam(value="login")
String login,
@PathParam(value="idStory")
Integer storyId)
@POST
@Path(value="/user/{login}/microstory/favourite/{id}")
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response addStoryInFavoriteList(@PathParam(value="login")
String login,
@PathParam(value="id")
int id)
@GET
@Path(value="/user/{login}/microstory/favourite")
@Produces(value="application/json")
public javax.ws.rs.core.Response listFavoriteMicrostories(@PathParam(value="login")
String login,
@QueryParam(value="page") @DefaultValue(value="0")
Integer page,
@QueryParam(value="maxResults") @DefaultValue(value="10")
Integer maxResults,
@QueryParam(value="title")
String title,
@QueryParam(value="gender")
String gender,
@QueryParam(value="topic")
String topic,
@QueryParam(value="author")
String author)
@GET
@Path(value="/user/{login}/microstories/stats/read")
@Produces(value="application/json")
public javax.ws.rs.core.Response getStatisticsReadMicrostories(@PathParam(value="login")
String login,
@QueryParam(value="gender")
String gender,
@QueryParam(value="topic")
String topic)
@GET
@Path(value="/user/{login}/microstory/stats/favourite")
@Produces(value="application/json")
@Consumes(value="application/json")
public javax.ws.rs.core.Response getFavouritesStats(@PathParam(value="login")
String login)
@GET
@Path(value="/user/{login}/microstories/published/stats/favourite")
@Produces(value="application/json")
public javax.ws.rs.core.Response obtainUserStoriesFavoriteStatistics(@PathParam(value="login")
String login,
@QueryParam(value="gender")
String gender,
@QueryParam(value="topic")
String topic)
Copyright © 2023. All rights reserved.