SuggestedArticle

SuggestedArticle used to override the suggested articles/Instant answers from the Beacon API

SuggestedArticle used to be a Kotlin Sealed class however it caused issues for Java consumers due to lack of surrounding class. The most backwards compatible change was to refactor to be interface.

Inheritors

Types

Link copied to clipboard
@Serializable
class SuggestedArticleWithId(val id: String) : SuggestedArticle

Article that's linked to actual article by it's Id

Link copied to clipboard
@Serializable
class SuggestedArticleWithUrl(val title: String, val url: String) : SuggestedArticle

Custom Url with title

Functions

Link copied to clipboard
abstract fun isValid(): Boolean

Based on the type is the article valid, if not it won't be rendered in the Beacon