@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 |
getRecentStorys()
Returns the last 6 stories.
|
javax.ws.rs.core.Response |
getRecentStorys(int id)
Returns a story identified by the id.
|
javax.ws.rs.core.Response |
getStoriesToExplore(String text,
String genre,
String theme,
String publication,
int pagSize)
Returns the stories to explore.
|
@Path(value="recent") @GET public javax.ws.rs.core.Response getRecentStorys()
OK response containing the list of stories.@Path(value="{id: \\d+}")
@GET
public javax.ws.rs.core.Response getRecentStorys(@PathParam(value="id")
int id)
id - the identifier of a storyOK response containing the Story with the
provided identifier.@GET
public javax.ws.rs.core.Response getStoriesToExplore(@QueryParam(value="contains")
String text,
@QueryParam(value="genre")
String genre,
@QueryParam(value="theme")
String theme,
@QueryParam(value="publication")
String publication,
@QueryParam(value="pagSize")
int pagSize)
OK response containing the list of stories to explore.Copyright © 2020. All rights reserved.