Package io.micronaut.rss.jsonfeed.http
Class JsonFeedController
java.lang.Object
io.micronaut.rss.jsonfeed.http.JsonFeedController
@Requires(beans=JsonFeedProvider.class) @Requires(property="jsonfeed.enabled",notEquals="false")
@Controller("${jsonfeed.root-path:/feeds}")
public class JsonFeedController
extends Object
Exposes an endpoint, by default /feeds/json, which return a JSON Feed.
- Since:
- 2.2.0
- Author:
- Sergio del Amo
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
APPLICATION_JSON_FEED
- See Also:
-
-
Constructor Details
-
JsonFeedController
- Parameters:
jsonFeedProvider
- JSON Feed Provider
-
-
Method Details
-
index
@Produces("application/json+feed") @Get("${jsonfeed.path:/json}{?maxNumberOfItems,pageNumber}") @SingleResult public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<JsonFeed>> index(@QueryValue @Nullable @Nullable Integer maxNumberOfItems, @QueryValue @Nullable @Nullable Integer pageNumber) - Parameters:
maxNumberOfItems
- Max number of items in the JSON Feed. Optional.pageNumber
- Requested Page. Optional.- Returns:
- a JSON Feed.
-