For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign in
DocsAPI ReferenceChangelog
DocsAPI ReferenceChangelog
  • Get started
    • Quickstart
    • Concepts
  • Guides
    • Environments
  • Reference
        • Constructor
        • getPages
        • getPageSnapshot
        • getComponentSnapshot
        • getSiteVersion
      • Makeswift API Handler
    • Product docs
    • Blog
    • Support
Sign in
LogoLogo
On this page
  • Arguments
  • Example
Reference@makeswift/runtimeClient

constructor

Was this page helpful?
Previous

Shape

Next

getPages

Built with

The Makeswift client is used to fetch data from the Makeswift API.

Arguments

apiKey
stringRequired

The API key for the Makeswift site.

options
object

Options for a runtime instance.

Untitled
runtime
ReactRuntime

A runtime instance. Required for custom breakpoints.

Example

The following example instantiates a new Makeswift client.

src/makeswift/client.ts
1import { Makeswift } from "@makeswift/runtime/next";
2import { strict } from "assert";
3
4import { runtime } from "./runtime";
5
6strict(
7 process.env.MAKESWIFT_SITE_API_KEY,
8 "MAKESWIFT_SITE_API_KEY is required"
9);
10
11export const client = new Makeswift(process.env.MAKESWIFT_SITE_API_KEY, {
12 runtime,
13});