What's New API

Last modified by Vincent Massol on 2023/02/21

New experimental API to gather external news related to XWiki.

Example to get news items from a xwikiblog source, for a given user, filtered by a category:

private NewsSourceFactory factory;

private NewsConfiguration configuration;

List<NewsSourceDescriptor> descriptors = this.configuration.getNewsSourceDescriptors();
NewsSourceDescriptor descriptor = descriptors.get(0);
List<NewsSourceItem> items = this.factory.create(descriptor.getParameters())
NewsContent content = items.get(0).getDescription().get();
String itemDescription = content.getContent();
Syntax itemSyntax = content.getSyntax();

Get Connected