@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 |
listRecent()
Returns the six most recent stories ordered by date.
|
javax.ws.rs.core.Response |
searchStorieByText(String contains,
int page,
Integer 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")
Integer maxItems)
contains - page - maxItems - OK response containing a list of stories.Copyright © 2020. All rights reserved.