MyNixOS website logo
Description

Access to the 'Figma' API.

The goal of Rigma is to provide a user friendly client to the 'Figma' API <https://www.figma.com/developers/api>. It uses the latest `httr2` for a stable interface with the REST API. More than 20 methods are provided to interact with 'Figma' files, and teams. Get design data into R by reading published components and styles, converting and downloading images, getting access to the full 'Figma' file as a hierarchical data structure, and much more. Enhance your creativity and streamline the application development by automating the extraction, transformation, and loading of design data to your applications and 'HTML' documents.

Rigma

R-CMD-check Codecov testcoverage CRANstatus

The goal of Rigma is to provide a user friendly client to ‘Figma’ API. It uses the latest httr2 for a more stable interface with the ‘Figma’ API. More than 20 methods are provided to interact with Figma files, and teams.

Installation

You can install the development version of ‘Rigma’ from GitHub with:

# install.packages("devtools")
devtools::install_github("AleKoure/Rigma")

Getting started

An account can be accessed using an API by the owner of a personal access token just as if they were the user who created the token.

Make your own access token.

  • Open your Figma account and log in.
  • From the top-left menu in Figma, select Account Settings.
  • Locate the section on personal access tokens.
  • Select New Token by clicking.
  • There will be a token created. This will be your last opportunity to copy the token, so be careful to store a copy of it safely.

When you retrieve the personal access token save it as an environmental variable (e.g. edit .Renviron by typing usethis::edir_r_environ()).

FIGMA_ACCESS_TOKEN="YOUR_ACCESS_TOKEN_GOES_HERE!!!"

After saving your changes restart R session.

Example

Open ‘Figma’ and navigate to your favorite file. In the URL you can see the key of the file. To retrieve the File as an R object execute:

example_file_key <- "sFHgQh9dL6369o5wrZHmdR"
get_file(example_file_key)

A tree of nodes is used to represent the ‘Figma’ file. Every file has a DOCUMENT node at the root, and any CANVAS nodes branch out of that node.

Metadata

Version

0.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows