untitled_file {figma}R Documentation

An example of a simple Figma file

Description

The untitled_file object is an example of what kind of object the functions from figma package tend to return to the user. This object was produced by a call to figma::get_figma_file(), and contains the data of a very simple Figma file entitled "Untitled".

Usage

untitled_file

Format

An object of class response, produced by httr HTTP methods (e.g. httr::GET());

Details

This "Untitled" Figma file have two canvas/pages, called "Page 1" and "Page 2". There are three objects drawn in Page 1 (a RECTANGLE, a TEXT and a VECTOR object), and, there are two objects drawn in Page 2 (a RECTANGLE and a TEXT object).

The untitled_file object contains the httr::response object returned by figma::get_figma_file(). This httr::response object is just a simple R list with class response. The elements of this list and their description are:

All data of the Figma file is stored in the content element. However, this data is in raw format (i.e. in raw bytes). To convert these raw bytes into a useful format like a R list, or a string, you should use the httr::content() function. See vignette("figma") for a detailed description of the data present in this content element;

Examples

library(figma)
str(untitled_file)

[Package figma version 0.2.0 Index]