@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(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.Copyright © 2022. All rights reserved.