Skip to content

Commit 357edac

Browse files
committed
Init API documentation
1 parent c1723ae commit 357edac

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

API.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# API
2+
3+
## Data
4+
5+
An array of dictionaries (objects) with two essential properties:
6+
7+
- `id`: the item identifier (has to be unique)
8+
- `src`: the item data. this can be a URL or data object. the only requirement
9+
is that the renderer understands this object.
10+
11+
_Note, mixed data types are currently not supported._
12+
13+
```
14+
// External image data
15+
{
16+
id: 001,
17+
src: 'https://github.com/test.png'
18+
}
19+
20+
// Matrix data
21+
{
22+
id: 001,
23+
src: [[3, 2, 1], [2, 3, 2], [1, 2, 3]]
24+
}
25+
```
26+

0 commit comments

Comments
 (0)