| untitled_file | R Documentation |
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".
untitled_file
An object of class response, produced by httr HTTP methods (e.g. httr::GET());
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:
url: The URL used in the HTTP request made to the Figma API;
status_code: The HTTP status code returned by the Figma API;
headers and all_headers: The list of headers returned by the Figma API;
cookies: A named list of cookies returned by the Figma API;
content: The body of the response, as raw vector. See httr::content() for various ways to parse this content;
date and times: Timing information about the HTTP request made to the Figma API;
handle: The handle associated with the url;
request: The URL, HTTP method and options used in the HTTP request made to the Figma API;
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;
library(figma) str(untitled_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.