@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 |
findHottestStories(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
String startDateString,
String referenceDateString,
int pageNumber,
int maxItems)
Find the stories that have been most read between the given dates.
|
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(String text,
int pageNumber,
int maxItems)
Returns a list stories from a text.
|
javax.ws.rs.core.Response |
getStoryExplore(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme theme,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Publication publication,
int pageNumber,
int maxItems)
Returns a list stories from a Genre, publication or theme.
|
@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 getStoryExplore(@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")
es.uvigo.esei.dgss.teama.microstories.domain.entities.Publication publication,
@DefaultValue(value="0") @QueryParam(value="pageNumber")
int pageNumber,
@DefaultValue(value="10") @QueryParam(value="maxItems")
int maxItems)
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.@GET
@Path(value="hottest")
public javax.ws.rs.core.Response findHottestStories(@QueryParam(value="genre")
es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
@QueryParam(value="startDate")
String startDateString,
@QueryParam(value="referenceDate")
String referenceDateString,
@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.startDateString - The date when start to search.referenceDateString - The date on which the query is made.pageNumber - The number of the page.maxItems - The maximum of stories to return by page.ParseException - if there is an error while parsing the dates.Copyright © 2022. All rights reserved.