The OWArticleProtocol defines an article.

public protocol OWArticleProtocol {
    var articleInformationStrategy: OWArticleInformationStrategy { get }
    var additionalSettings: OWArticleSettingsProtocol { get }
}
public protocol OWArticleSettingsProtocol {
    var section: String { get }
    var headerStyle: OWArticleHeaderStyle { get }
    var readOnlyMode: OWReadOnlyMode { get }
    var starRatingEnabled: Bool { get } 
}

An article can be a piece of content that informs about events or offers opinions on a subject. To allow a reader to engage with the content and other readers through a Conversation, you must define the associated article.


Article Creation

Use the following recipe to define an article for the iOS SDK.


Enumerations and Structs

OWArticle

OWArticle(
    articleInformationStrategy: OWArticleInformationStrategy,
    additionalSettings: OWArticleSettingsProtocol
)
Property Description
additionalSettings OWArticleSettingsProtocol Defines article features.

See: OWArticleSettings
articleInformationStrategy OWArticleInformationStrategy Defines article metadata.

See: OWArticleInformationStrategy

OWArticleExtraData

OWArticleExtraData(
    url: URL("https://URL_TO_THE_ARTICLE_PAGE")!,
    title: "ARTICLE_TITLE",
    subtitle: "ARTICLE_SUBTITLE",
    thumbnailUrl: URL("https://URL_TO_THE_ARTICLE_THUMBNAIL_IMAGE")!
)
Property Description
subtitle string Secondary heading of the article.
thumbnailUrl URL URL location of the thumbnail image.
title string Name of the article.
url URL URL location of the article page.

OWArticleInformationStrategy

Property Description
OWArticleInformationStrategy OWArticleInformationStrategy Defines article features.

Possible Values:

OWArticleSettings

Setting Description
headerStyle OWArticleHeaderStyle Defines the article header style.

Possible Values:
  • .regular (default)
  • .none
readOnlyMode OWReadOnlyMode Defines if the article is read-only.

Possible Values:
  • .server (default)
  • .disable
  • .enable
starRatingEnabled Bool Activates the Social Review feature.

Possible Values:
  • false (default)
  • true