@Path(value="microstory") @Consumes(value="application/json") @Produces(value="application/json") public class StoryResource extends Object
| Constructor and Description |
|---|
StoryResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
get(int id)
Return the current story
|
javax.ws.rs.core.Response |
listMostReadedStories(String initialDateStr,
String finalDateStr)
Returns the two most readed stories from each category in a date range
|
javax.ws.rs.core.Response |
listRecent()
Returns the six most recent stories ordered by date.
|
javax.ws.rs.core.Response |
listStories(int maxItems,
int page,
es.uvigo.esei.dgss.teama.microstories.domain.Topics genre,
es.uvigo.esei.dgss.teama.microstories.domain.Type theme,
long publication)
Return filtered matching stories
|
javax.ws.rs.core.Response |
searchStorieByText(String contains,
int page,
int maxItems)
Returns stories by text.
|
@Path(value="{id}")
@GET
public javax.ws.rs.core.Response get(@PathParam(value="id")
int id)
throws SecurityException
id - SecurityException@Path(value="/recent") @GET public javax.ws.rs.core.Response listRecent()
OK response containing a list of stories.@Path(value="")
@GET
public javax.ws.rs.core.Response searchStorieByText(@DefaultValue(value="") @QueryParam(value="contains")
String contains,
@DefaultValue(value="0") @QueryParam(value="page")
int page,
@DefaultValue(value="10") @QueryParam(value="maxItems")
int maxItems)
contains - page - maxItems - OK response containing a list of stories.@Path(value="/hottest")
@GET
public javax.ws.rs.core.Response listMostReadedStories(@QueryParam(value="initialDate")
String initialDateStr,
@QueryParam(value="finalDate")
String finalDateStr)
initialDateStr - finalDateStr - OK response containing a list of stories.@Path(value="/filter")
@GET
public javax.ws.rs.core.Response listStories(@QueryParam(value="maxItems") @DefaultValue(value="10")
int maxItems,
@QueryParam(value="page") @DefaultValue(value="0")
int page,
@QueryParam(value="genre")
es.uvigo.esei.dgss.teama.microstories.domain.Topics genre,
@QueryParam(value="theme")
es.uvigo.esei.dgss.teama.microstories.domain.Type theme,
@QueryParam(value="publication")
long publication)
maxItems - page - genre - theme - publication - OK response containing a filtered list of stories.Copyright © 2020. All rights reserved.