figmatik

package module
v0.0.0-...-5adcae6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

figmatik

low level tool to interact with figma rest api

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(dec *json.Decoder) (any, error)

parses figma rest api v1/files/:key response into AST

Types

type Node

type Node struct {
	NodeID      string            `json:"id,omitempty"`
	NodeType    string            `json:"type,omitempty"`
	NodeName    string            `json:"name,omitempty"`
	TextContent string            `json:"text,omitempty"`
	Children    []*Node           `json:"children,omitempty"`
	Parent      *Node             `json:"-"`
	Attrs       map[string]string `json:"attrs,omitempty"`
	// contains filtered or unexported fields
}

func NewLineBreakNode

func NewLineBreakNode() *Node

func NewListItemNodeWithChildren

func NewListItemNodeWithChildren(children []*Node, source map[string]any) *Node

func NewListItemNodeWithText

func NewListItemNodeWithText(text string, source map[string]any) *Node

func NewListNode

func NewListNode(listType string) *Node

func NewPlaceholderNode

func NewPlaceholderNode(text string, source map[string]any) *Node

func NewTextNode

func NewTextNode(text string, source map[string]any) *Node

func (*Node) Get

func (n *Node) Get(k string) any

func (*Node) Search

func (n *Node) Search(predicate func(c *Node) int) []*Node

func (*Node) Walk

func (n *Node) Walk(visit func(c *Node) any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL