Story

@objc(Story)
public final class Story : NSObject

This data class represents a story inside a story group.

  • ID of the story

    Declaration

    Swift

    @objc
    public let uniqueId: String
  • Title of the story

    Declaration

    Swift

    @objc
    public let title: String
  • Name of the story

    Declaration

    Swift

    @objc
    public let name: String?
  • Index of the story among other stories of the story group

    Declaration

    Swift

    @objc
    public let index: Int
  • State of the story that shows whether the story is seen or not

    Declaration

    Swift

    @objc
    public let seen: Bool
  • Time of the story that user watched

    Declaration

    Swift

    @objc
    public let currentTime: Int
  • URL of the preview image of the story

    Declaration

    Swift

    @objc
    public var previewUrl: URL?
  • List of story components in the story

    Declaration

    Swift

    @objc
    public let storyComponentList: [StoryComponent]?
  • URL which the user has just interacted with

    Declaration

    Swift

    @objc
    public let actionUrl: String?
  • Related product content of interactive incase of click action

    Declaration

    Swift

    @objc
    public let actionProducts: [STRProductItem]?
  • Story initialization

    Declaration

    Swift

    @objc
    public init(
        id: String,
        index: Int,
        title: String,
        name: String?,
        seen: Bool,
        currentTime: Int,
        previewUrl: URL?,
        storyComponentList: [StoryComponent]?,
        actionUrl: String?,
        actionProducts: [STRProductItem]?
    )

    Parameters

    id

    ID of the story

    index

    Index of the story among other stories of the story group

    title

    Title of the story

    name

    Name of the story

    seen

    State of the story that shows whether the story is seen or not

    currentTime

    Time of the story that user watched

    previewUrl

    URL of the preview image of the story

    storyComponentList

    List of story components in the story

    actionUrl

    URL which the user has just interacted with

    products

    Related product content of interactive incase of click action