Tripetto Studio API
This API reference covers the Tripetto Studio API package that is used to interact with the Studio back-end.
✨ Installation
- npm
- Yarn
- pnpm
npm install @tripetto/studio
yarn add @tripetto/studio
pnpm add @tripetto/studio
Typescript support
This package contains type declarations and supports TypeScript out-of-the-box.
👩💻 Example
Here is a basic example of a stock runner that uses the Studio API to fetch a form definition and store form responses:
- HTML
- JavaScript
<script src="https://cdn.jsdelivr.net/npm/@tripetto/runner"></script>
<script src="https://cdn.jsdelivr.net/npm/@tripetto/runner-autoscroll"></script>
<script src="https://cdn.jsdelivr.net/npm/@tripetto/studio"></script>
<script>
TripettoStudio.form({
runner: TripettoAutoscroll,
// You can obtain the token of a form in the share panel of the Studio
token: "a-valid-tripetto-token"
});
</script>
import { run } from "@tripetto/runner-autoscroll";
import Services from "@tripetto/studio";
run(
Services.get({
// You can obtain the token of a form in the share panel of the Studio
token: "a-valid-tripetto-token",
})
);