InterkitClient is a collection of methods commonly used to interact with the system.

Warning: It is in the process of being cleaned up, simplified and documented. Proceed with caution.

See source code

Table of contents

UI Keys

Getting and setting UI Keys.

  InterkitClient.setUiKey("menuOpen", true)

Data Annotations

Getting and setting Data Annotations (formerly called element properties)

  InterkitClient.setElementProperty("9b59b249-3d9f-4335-905c-260291e1237f", "bookmarked", true)
  InterkitClient.getElementProperty("9b59b249-3d9f-4335-905c-260291e1237f", "bookmarked")

User Variables

Setting User Variables.

  InterkitClient.setUserVar("name", "alice")

Getting user variables currently needs to be done with server methods


Load all rows in a database sheet

  await InterkitClient.getRows("elements")

Get a reactive store for rows in a database sheet

  const rows = await InterkitClient.getRowSubStore("elements")

Further database operations currently need to be done with server methods

Media Files

Loading metadata for a media file identified by it’s key

  await InterkitClient.getMediaFile("9b59b249-3d9f-4335-905c-260291e1237f")

Playback audio

Plays audio of the correct language in the floating player, assuming audio is stored in column “elements/audio$lang”.

  import { lang } from 'interkit/i18n.js';
  import { get } from 'svelte/store'

  await InterkitClient.playFloatingAudio(
    "elements/audio$" + get(lang)

Server Methods

Call a server method. projectId is added to methodParams automatically.

  await"methodName", methodParams)

Further documentation needed. See source code for the available methods.