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 Details

  • Constructor Details

    • JsonFeedController

      public JsonFeedController(JsonFeedProvider jsonFeedProvider)
      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.