@triply/triplydb
    Preparing search index...

    Class Story

    A data story: a narrative built from saved queries and prose paragraphs.

    Obtain one from an Account with getStory, addStory or ensureStory. Stories are never constructed directly.

    Example: Get a story and read the elements it is built from

    const story = await account.getStory("my-story");
    const { content } = await story.getInfo();
    Index
    slug: string

    The story's short name, as it appears in its URL.

    • Deletes this story.

      Returns Promise<void>

      Destructive and not undoable. The queries it showed are left alone — a story only references them.

    • This story's metadata, including the raw description of its elements.

      Parameters

      • refresh: boolean = false

      Returns Promise<StoryInfo>

      Cached after the first call. Pass true to refetch. Use Story.getContent when you want the elements as objects rather than as data.

    • Replaces the image shown at the top of this story.

      Parameters

      • pathBufferOrFile: string | Buffer<ArrayBufferLike> | File

        Path to an image file, or its contents.

      Returns Promise<Story>