@Path(value="microstories") @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 |
getStoryById(Long id)
Retrieves a story by its ID.
|
javax.ws.rs.core.Response |
listRecentStories() |
javax.ws.rs.core.Response |
searchStories(String text,
int page,
int size) |
@Path(value="recents") @GET public javax.ws.rs.core.Response listRecentStories()
@GET
@Path(value="/{id}")
public javax.ws.rs.core.Response getStoryById(@PathParam(value="id")
Long id)
@GET
public javax.ws.rs.core.Response searchStories(@QueryParam(value="contains")
String text,
@QueryParam(value="page") @DefaultValue(value="1")
int page,
@QueryParam(value="size") @DefaultValue(value="10")
int size)
Copyright © 2025. All rights reserved.