@fluid-topics/public-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.69 • Public • Published

Fluid Topics Public API

Convenient wrapper for Fluid Topics public APIs and models.

Installation

Using npm

npm install @fluid-topics/public-api

Using yarn

yarn add @fluid-topics/public-api

Using jsDelivr CDN

<script src="https://cdn.jsdelivr.net/npm/@fluid-topics/public-api/dist/fluidtopics.min.js"></script>

Using unpkg CDN

<script src="https://unpkg.com/@fluid-topics/public-api/dist/fluidtopics.min.js"></script>

Examples

Typescript

import {
    FluidTopicsApi,
    FtMap
} from "@fluid-topics/public-api"

const api = new FluidTopicsApi("https://doc.fluidtopics.com", "my-ts-integration")

api.getMap("4R52zKZkt~kDZT3ZpoFNng")
        .then((ftMap: FtMap) => console.log(ftMap))

Javascript

ESM/CommonJS:

const {FluidTopicsApi} = require("@fluid-topics/public-api")

const api = new FluidTopicsApi("https://doc.fluidtopics.com", "my-js-integration")

api.getMap("4R52zKZkt~kDZT3ZpoFNng")
        .then(ftMap => console.log(ftMap))

UMD/Browser:

const {FluidTopicsApi} = window.fluidtopics

const api = new FluidTopicsApi("https://doc.fluidtopics.com", "my-js-integration")

api.getMap("4R52zKZkt~kDZT3ZpoFNng")
        .then(ftMap => console.log(ftMap))

Result

{
  title: 'Fluid Topics Release Notes v3.10',
  lang: 'en-US',
  id: '4R52zKZkt~kDZT3ZpoFNng',
  originId: 'FT-3.10-public.ftmap',
  baseId: 'FT-3.10-public.ftmap',
  lastEdition: '2021-09-14',
  lastPublication: '2021-09-14T10:29:12.308153',
  clusterId: 'FT-3.10-public.ftmap',
  editorialType: 'BOOK',
  khubVersion: '3.10.12',
  openMode: 'FLUIDTOPICS',
  prettyUrl: '/go/FT/3.10/Release_Notes',
  readerUrl: '/r/FT/3.10/Release_Notes',
  rightsApiEndpoint: '/api/khub/maps/4R52zKZkt~kDZT3ZpoFNng/rights',
  topicsApiEndpoint: '/api/khub/maps/4R52zKZkt~kDZT3ZpoFNng/topics',
  attachmentsApiEndpoint: '/api/khub/maps/4R52zKZkt~kDZT3ZpoFNng/attachments',
  metadata: [
    { key: 'Product', label: 'Product', values: [...] },
    { key: 'Version_FT', label: 'Version', values: [...] },
    { key: 'Category', label: 'Category', values: [...] },
    { key: 'audience', label: 'Audience', values: [...] },
    { key: 'FT_Version', label: 'Version', values: [...] }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @fluid-topics/public-api

Weekly Downloads

1,302

Version

1.0.69

License

LGPL-3.0-only

Unpacked Size

621 kB

Total Files

52

Last publish

Collaborators

  • antidot
  • mike.antidot