Skip to content

Latest commit

 

History

History

rest

@figmarine/rest

A fully typed client for the Figma REST API, with quality-of-life features.

Status: Experimental commit activity last commit open issues CodeQL status CI status code coverage contributors code of conduct: contributor covenant 2.1 license forks stars sponsor this project


📔 Table of Contents

🌟 Package Details

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

👀 Usage

Install the package with the following command:

 pnpm i @figmarine/rest

Important

This project is under active development and is not documented yet.

🔑 Environment Variables

The following environment variables are supported:

  • NODE_ENV: used to initialise the run mode to development or production
  • FIGMA_PERSONAL_ACCESS_TOKEN: used to authenticate with a Personal Access Token
  • FIGMA_OAUTH_TOKEN: used to authenticate with an OAuth 2.0 Token

🏃 Run Locally

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

👋 Contributing

See how to contribute.

⚠️ License

Distributed under the MIT License.

🆘 Support

Please open a conversation in the discussion space to ask a question.

Please open an issue for bug reports or code suggestions.

💛 Acknowledgments