Skip to content

denwakeup/figma-api-client

Repository files navigation

npm

figma-api-client

Based on didoo/figma-api

Official docs Figma API.

Install

npm i figma-api-client

Usage

import * as Figma from 'figma-api-client';

const api = new Figma.Api({
    personalAccessToken: 'access token',
});

const file = await api.getFile('file key');

Api

Helpers

Api.request<T>(url, params): Promise<T> - Make request with auth headers.

Authentication

new Api({ personalAccessToken } | { oAuthToken });

Creates new Api object with specified personal or oAuthToken. Documentation on how to get tokens

Helpers

  • oAuthLink - Returns link for OAuth auth flow. User should open this link, allow access and he will be redirected to redirect_uri?code=<code>. Then you should use oAuthToken method to get access token.
  • oAuthToken - Returns access token info from oauth code (see oAuthLink method).

Figma files

Comments

Users

Version history

Projects

Components and styles

Variables

File types

All types with description

Helpers

  • isEffectShadow - Check if effect is one of shadow effects.
  • isEffectBlur - Check if effect is one of blur effects.
  • isPaintSolid - Check if paint is one of pain types.
  • isPaintGradient - Check if paint is one of pain types.
  • isPaintImage Check if paint is one of pain types.
  • isNodeType - Check if node is type of specified node.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published