Skip to content

Instantly share code, notes, and snippets.

@PavelLaptev
Last active September 3, 2021 08:35
Show Gist options
  • Save PavelLaptev/c0bfe21214c6e2b264dc6b6c5cd3d80e to your computer and use it in GitHub Desktop.
Save PavelLaptev/c0bfe21214c6e2b264dc6b6c5cd3d80e to your computer and use it in GitHub Desktop.
async function getFigmaObjTree(figmaApiKey, figmaId) {
let result = await fetch("https://api.figma.com/v1/files/" + figmaId, {
method: "GET",
headers: {
"X-Figma-Token": figmaApiKey
}
});
let figmaTreeStructure = await result.json();
console.log(figmaTreeStructure);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment