Use Structured Document API - Fluid Topics - 3.7 - Technical Notes

Develop Connectors with the Fluid Topics API

Product
Fluid Topics
Fluid Topics Version
3.7
Category
Technical Notes
Language
English
Target Audience
public

The following lines show how to build Structured Documents:

from fluidtopics.connector import EditorialType, StructuredDocument

# Book
book_A = StructuredDocument.create(
document_id="my-structured-document-book-a",
title="My Structured Document - BookA",
locale="en-US",
pretty_url="my-pretty-structured-document-book-a",
toc=[topic_A, topic_B],
editorial_type=EditorialType.BOOK
)

# Article
article = StructuredDocument.create(
document_id="my-structured-document-article",
title="My Structured Document - Article",
locale="en-US",
pretty_url="my-pretty-structured-document-article",
toc=[topic_B],
editorial_type=EditorialType.ARTICLE
)

The following screenshots illustrate how Structured Documents are displayed in a list of search results as well as in the Reader page:

structuredDocuments

structuredDocumentBookA