@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 |
getRecentStories()
Retrieves the most recent stories that are in published status.
|
javax.ws.rs.core.Response |
getStoryById(int id)
Returns a history from its identifier.
|
javax.ws.rs.core.Response |
getStoryByText(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme theme,
String publication,
int pageNumber,
int maxItems)
Returns a list stories from a Genre, publication or theme.
|
javax.ws.rs.core.Response |
getStoryByText(String text,
int pageNumber,
int maxItems)
Returns a list stories from a text.
|
@GET @Path(value="recent") public javax.ws.rs.core.Response getRecentStories()
@GET
@Path(value="{id}")
public javax.ws.rs.core.Response getStoryById(@PathParam(value="id")
int id)
id - The id of the story to return.@GET
public javax.ws.rs.core.Response getStoryByText(@QueryParam(value="contains")
String text,
@DefaultValue(value="0") @QueryParam(value="pageNumber")
int pageNumber,
@DefaultValue(value="10") @QueryParam(value="maxItems")
int maxItems)
text - The id of the story to return.pageNumber - The number of the page.maxItems - The maximum of stories to return by page.@GET
public javax.ws.rs.core.Response getStoryByText(@QueryParam(value="genre")
es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
@QueryParam(value="theme")
es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme theme,
@QueryParam(value="publication")
String publication,
@DefaultValue(value="0") @QueryParam(value="pageNumber")
int pageNumber,
@DefaultValue(value="10") @QueryParam(value="maxItems")
int maxItems)
throws ParseException
genre - The Genre of the story to return.theme - The Theme of the story to return.publication - The publication of the story to return.pageNumber - The number of the page.maxItems - The maximum of stories to return by page.ParseExceptionCopyright © 2022. All rights reserved.