@Path(value="microstory") public class StoryResource extends Object
| Constructor and Description |
|---|
StoryResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
get(int id)
Returns the story identified by the id.
|
javax.ws.rs.core.Response |
getRecentStories()
Returns the most recent stories.
|
@Path(value="/recent") @GET @Produces(value="application/json") public javax.ws.rs.core.Response getRecentStories()
OK response containing the most recent stories.@Path(value="{id}")
@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response get(@PathParam(value="id")
int id)
id - the id of a story.OK response containing the Story with the
provided id.IllegalArgumentException - if id is null or
if it does not correspond with any story.Copyright © 2018. All rights reserved.