개요

Authentication

Figma Files

  1. 공통적으로 가지는 값들
{
  id : string
  name: string
  visible: boolean // default: true
  type: string
  rotation : number // rotation 돌리기 관련
  pluginData : Any // 플러그인 쓰지마!!!!
  sharedPluginData : Any // 쓰지말라고!
  componentPropertyReferences : Map<String, String>
}
  1. Node type에 따른 속성 값들
  1. 각 속성들의 타입들 관련 내용

GET file

  1. 전체 파일 data fetch 하기 => depth를 2로 하면 document (0) => section (1) => frame (2)
// AxiosRequestConfig
{
  method: `get`,
  baseURL: `https://api.figma.com`,
  url: `/v1/files/파일키` //
  headers: {
    Authorization: `Bearer 피그마 access 토큰`
  },
  params: {
    version: 옵셔널값,
    ids: 옵셔널 배열타입 특정 노드들 배열로 가져오는듯,
    depth: 옵셔널number타입 값 깊이 지정, // 이 값을 통해 적절히 받아오면 될 듯 하다!
    plugin_data: 옵셔널 string
    branch_data: 옵셔널 불리언값
  }
}

// AxiosResponse
{
  document: {
    id, name, type, scrollBehavior, children
  },
  components: {
    컴포넌트ID: {key, name, description, remote, documentationLinks}
  },
  componentSets: {없어서 몰루},
  schemaVersion: 0,
  styles: {
    컴포넌트ID: {key, name, styleType, remote, description}
  }
  name: 플젝 이름,
  lastModified: 최근 수정,
  thumbnailUrl: 썸네일url 바로 나오는듯,
  version: 숫자,
  role: 역할,
  editorType: figma 고정인듯,
  linkAccess: 정해진 특정 몇 string인듯
}
  1. 특정 노드 data fetch하기