RecommendationDataItem
public struct RecommendationDataItem : Equatable, Hashable, Codable
extension RecommendationDataItem: Sendable
A single curated recommendation item.
-
Unique identifier for the corpus item.
Declaration
Swift
public var corpusItemId: String -
Unique identifier for the scheduled corpus item.
Declaration
Swift
public var scheduledCorpusItemId: String? -
URL of the recommended article.
Declaration
Swift
public var url: String -
Title of the recommended article.
Declaration
Swift
public var title: String -
Short excerpt or summary of the article.
Declaration
Swift
public var excerpt: String -
Optional topic slug (e.g.
"business","government").Declaration
Swift
public var topic: String? -
Name of the publisher.
Declaration
Swift
public var publisher: String -
Whether the recommendation is time-sensitive (e.g. breaking news).
Declaration
Swift
public var isTimeSensitive: Bool -
URL of the article’s hero/thumbnail image.
Declaration
Swift
public var imageUrl: String -
Optional URL of the publisher’s favicon.
Declaration
Swift
public var iconUrl: String? -
Numeric tile identifier used for telemetry.
Declaration
Swift
public var tileId: Int64? -
The position rank at which this item was received from the server.
Declaration
Swift
public var receivedRank: Int64 -
init(corpusItemId:scheduledCorpusItemId: url: title: excerpt: topic: publisher: isTimeSensitive: imageUrl: iconUrl: tileId: receivedRank: ) Declaration
Swift
public init( /** * Unique identifier for the corpus item. */corpusItemId: String, /** * Unique identifier for the scheduled corpus item. */scheduledCorpusItemId: String? = nil, /** * URL of the recommended article. */url: String, /** * Title of the recommended article. */title: String, /** * Short excerpt or summary of the article. */excerpt: String, /** * Optional topic slug (e.g. `"business"`, `"government"`). */topic: String? = nil, /** * Name of the publisher. */publisher: String, /** * Whether the recommendation is time-sensitive (e.g. breaking news). */isTimeSensitive: Bool, /** * URL of the article's hero/thumbnail image. */imageUrl: String, /** * Optional URL of the publisher's favicon. */iconUrl: String?, /** * Numeric tile identifier used for telemetry. */tileId: Int64? = nil, /** * The position rank at which this item was received from the server. */receivedRank: Int64)