Posts

Showing posts from July, 2025

color change

using System; using System.Runtime.InteropServices; using Excel = Microsoft.Office.Interop.Excel; namespace ExcelRedToBlack {     class Program     {         static void Main(string[] args)         {             Console.WriteLine("Enter full path to the Excel file:");             string filePath = Console.ReadLine();             if (string.IsNullOrWhiteSpace(filePath))             {                 Console.WriteLine("Invalid file path.");                 return;             }             Excel.Application excelApp = null;             Excel.Workbook workbook = null;             try         ...

Versin history

๐Ÿ”„ Figma REST API – Version History ✅ Endpoint GET https://api.figma.com/v1/files/{file_key}/versions This endpoint retrieves the list of named versions for a given file. --- ๐Ÿ” Authentication Required Use a Personal Access Token (PAT) as a Bearer token in the Authorization header. You can create a PAT from: https://www.figma.com/developers/api --- ๐Ÿ“Œ How to Get file_key You get it from the Figma file URL: https://www.figma.com/file/<file_key>/<filename> Example: URL: https://www.figma.com/file/abc123XYZ/Design-v1   → file_key = abc123XYZ --- ๐Ÿ“ฅ Example Request (with curl) curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \      https://api.figma.com/v1/files/abc123XYZ/versions --- ✅ Example Response {   "versions": [     {       "id": "4452:4",       "created_at": "2025-07-25T10:00:00Z",       "label": "Wireframe Start",       "description": "Basic layout",     ...

Api figma

To export layers as images from Figma using the REST API , you use the GET Image endpoint . ✅ Step-by-Step: Export Layers as Images ๐Ÿ”‘ Prerequisites: Figma File Key – from the file URL: https://www.figma.com/file/**FILE_KEY**/... Node IDs – the layer(s) you want to export Personal Access Token – from Figma account settings ๐Ÿงช 1. Get Node IDs (Layer IDs) Endpoint: GET https://api.figma.com/v1/files/{file_key} Returns a full file structure ( document ) Traverse the JSON to find id of the nodes/layers you want to export (e.g., text, image, button, frame) Example node ID: "25:12" ๐Ÿ–ผ️ 2. Export Node as Image Endpoint: GET https://api.figma.com/v1/images/{file_key} Query Parameters: ids : Comma-separated node IDs format : png , jpg , or svg scale : optional, defaults to 1 (can be 2 for high-res) use_absolute_bounds : optional for exporting only visible area Example Request: GET https://api.figma.com/v1/images/AbCDeFGHIjkL?ids=25:12&format=pn...

My work

 Here's the PowerPoint slide data using only the first and second responses (which covered Figma REST API accessible data and a categorized API list): --- ๐ŸŽฏ Slide 1: Title Slide Title: Accessing Figma Data via REST API Subtitle: What’s Possible and What’s Not with Figma’s API --- ✅ Slide 2: What You Can Access via Figma REST API File & Design Data (Read-only): File metadata (name, modified date, version) Document structure (pages, frames, groups, nodes) Colors, fonts, layout, vectors, strokes, effects Local & team components Export images (PNG, JPG, SVG, PDF) Comments (read, post, resolve) Version history Project and team data (for Org accounts) --- ❌ Slide 3: What You Cannot Access via API Limitations: No write/edit of nodes or layout Cannot simulate or control prototypes No real-time collaboration info (like cursors) No plugin execution Cannot access plugin-specific or private data No access to interactions/animations execution --- ๐ŸŒ Slide 4: Key API Endpoints Purpose E...