get_endpoint_url {figma}R Documentation

Get the URL to a endpoint of Figma API

Description

Get the URL to a endpoint of Figma API

Usage

get_endpoint_url(endpoint = NULL)

Arguments

endpoint

A single string with the name of the desired endpoint (needs to be one of the values present in figma::implemented_endpoints). Defaults to NULL;

Details

If the function is called without any arguments, get_endpoint_url() will output a list with all of the implemented endpoints.

However, the function accepts a single string value with the name of, a specific endpoint. In this case, get_endpoint_url() will output a single string with the endpoint you selected. Is worth mentioning, that this string must be one of the values present in figma::implemented_endpoints.

If the user provided any type of value that does not fit in this description, the function will prompt the user with an error message.

Value

A string with the URL to the given endpoint, or, a list with all of the implemented endpoints;

Examples

# Returns the URL to the `files` endpoint of Figma API
library(figma)
figma::get_endpoint_url("files")


[Package figma version 0.2.0 Index]