Skip to content

Commit 0bb732e

Browse files
committed
updated figma-api endpoint calls to use the new format
1 parent a97e788 commit 0bb732e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/flight-icons/scripts/sync-parts/getAssetsMetadata.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function getAssetsMetadata(): Promise<AssetsMetadata> {
2727
});
2828

2929
// retrieve all the component_sets from the Figma file (later we'll use their names and descriptions for the icons)
30-
const componentSetsResponse = await api.getFileComponentSets(config.figmaFile.id);
30+
const componentSetsResponse = await api.getFileComponentSets({ file_key: config.figmaFile.id });
3131
const componentSetData: ComponentSetData = {};
3232
if (componentSetsResponse.meta && componentSetsResponse.meta.component_sets) {
3333
componentSetsResponse.meta.component_sets.forEach(component_set => {
@@ -47,7 +47,7 @@ export async function getAssetsMetadata(): Promise<AssetsMetadata> {
4747
console.log(chalk.magenta('ATTENTION:\nNo component sets ("icons") found in the Figma file, please check that your configuration file has the right values for "page" and "frame" names.'));
4848
}
4949

50-
const componentsResponse = await api.getFileComponents(config.figmaFile.id);
50+
const componentsResponse = await api.getFileComponents({ file_key: config.figmaFile.id });
5151
if (componentsResponse.meta && componentsResponse.meta.components) {
5252
componentsResponse.meta.components.forEach(component => {
5353
// check that the component is inside the expected page/frame

0 commit comments

Comments
 (0)