A fully typed client for the Figma REST API, with quality-of-life features.
A fully typed client for the Figma REST API, with quality-of-life features. Used by figmarine as an API client.
- Always up-to-date: generated from Figma's OpenAPI spec and updated by a CI script
- JavaScript client with a fully typed API
- Development mode that automatically caches GET responses, with persistence across runs
- Built-in rate limiting to protect you from an IP ban
- Easy authentication
Install the package with the following command:
pnpm i @figmarine/rest
Important
This project is under active development and is not documented yet.
The following environment variables are supported:
NODE_ENV
: used to initialise the run mode todevelopment
orproduction
FIGMA_PERSONAL_ACCESS_TOKEN
: used to authenticate with a Personal Access TokenFIGMA_OAUTH_TOKEN
: used to authenticate with an OAuth 2.0 Token
Clone the project
git clone https://github.com/Sidnioulz/figmarine.git
Go to the project directory
cd packages/rest
Install dependencies
pnpm install
Build the code as you make changes
pnpm dev
Check that tests run as you make changes
pnpm test:dev
See how to contribute.
Distributed under the MIT License.
Please open a conversation in the discussion space to ask a question.
Please open an issue for bug reports or code suggestions.
- @figma/rest-api-spec provides the up-to-date OpenAPI Spec file used by this package
- swagger-typescript-api is the codegen engine used by this package