SuggestedArticle

interface 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.

Types

InvalidArticle
Link copied to clipboard
class InvalidArticle : SuggestedArticle
Used to catch unhandled SuggestedArticle types
SuggestedArticleWithId
Link copied to clipboard
class SuggestedArticleWithId(id: String) : SuggestedArticle
Article that's linked to actual article by it's Id
SuggestedArticleWithUrl
Link copied to clipboard
class SuggestedArticleWithUrl(title: String, url: String) : SuggestedArticle
Custom Url with title

Functions

isValid
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

Inheritors

SuggestedArticle
Link copied to clipboard
SuggestedArticle
Link copied to clipboard
SuggestedArticle
Link copied to clipboard