- https://www.figma.com/developers/api
- REST APIなのかFigma APIなのか
- Figma APIぽい
-
Figma's mission is to make design accessible to everyone.
- Figma APIは読み取りとインタラクション?をサポートしている
- オブジェクトやレイヤーのプロパティーを抽出して、Figmaの外部で扱うことができる
- 認証
- アクセストークン or OAuth2
- パーソナルアクセストークンを生成するのがAccount Settingsからできる
X-Figma-Tokenをリクエストヘッダーに入れて使う
- 推奨されているのはOAuth2
- アプリケーションを登録する必要がある
- パーソナルアクセストークンを生成するのがAccount Settingsからできる
- アクセストークン or OAuth2
- HTTPのエンドポイントを介してアクセス
- files, images, file versions, users, comments, team projects, project files
- アクセス許可されると、ファイルをJSONで表現されたデータで見れる
- GET or POSTでファイルやレイヤーへのコメントの取得、追加などもできる
- scopes
files:readfile_variables:read/file_variables:writefile_comments:writefile_dev_resources:read/file_dev_resources:writewebhooks:write
files- ノードツリー
DOCUMENTがルートCANVASがはえる。これはPAGEを示している?- CANVASには任意の子ノードがはえる
- ノードにはグローバルなものとノード固有のものがある?
- ノードの種別
DOCUMENTCANVASFRAMEGROUPSECTIONVECTORBOOLEAN_OPERATIONSTARLINEELLIPSEREGULAR_POLYGONRECTANGLETABLETABLE_CELLTEXTSLICECOMPONENTCOMPONENT_SETINSTANCESTICKYSHAPE_WITH_TEXTCONNECTORWASHI_TAPE
- プロパティ
ColorExportSettingConstraintRectangleArcDataBlendModeMaskTypeEasingTypeFlowStartingPointLayoutConstraintLayoutGridEffectHyperlinkDocumentationLinkPaintVectorSizeTransformImageFiltersFrameOffsetColorStopPaintOverrideTypeStyleComponentComponentSetStyleShapeTypeConnectorEndpointConnectorLineTypeConnectorTextBackgroundComponentPropertyDefinitionComponentPropertyComponentPropertyTypeInstanceSwapPreferredValuePrototypeDeviceStrokeWeightsOverridesVariableAlias
- ノードツリー
- comments
- users
- version history
- projects
- component and styles
- file styles
GET/v1/files/:file_key/styles- https://forum.figma.com/t/get-file-styles-why-there-are-no-values-properties/19900
- stylesの情報が欲しくても、これでは得られる感じがしない?
- file styles
- REST APIなのかFigma APIなのか
Last active
November 9, 2023 15:39
-
-
Save makotot/6aa84631a746b1b0764792d033031bf4 to your computer and use it in GitHub Desktop.
figma rest api
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment