@sebbo2002/vestaboard v4.0.0
@sebbo2002/vestaboard
Just another client for the Vestaboard APIs. It supports the Subscription API, Read/Write API and the Local API. Written in Typescript.
The library also provides a small collection of helpers to format messages on the Vestaboard. This includes a write()
method that automatically wraps text, a fill()
method to fill the board with nice characters, or table()
to conjure
up a table on the board.
📦 Installation
npm i --save @sebbo2002/vestaboard
⚡️ Quick Start
Draw some patterns using the Subscription API
import { SubscriptionAPI, Message } from '@sebbo2002/vestaboard';
const api = new SubscriptionAPI('3eadf7a8-6602-4bf5-92f4-970d36066958', '******************************');
const msg = new Message().fill('🟥🟧🟨🟩🟦🟪');
api.postMessage(msg);
Write a calendar on a local Vestaboard
import { LocalAPI, Message } from '@sebbo2002/vestaboard';
const api = new LocalAPI('***');
const msg = new Message().table([
['now', 'Daily'],
['13:00', 'Super Secret Meeting'],
['16:30', 'Awesome Presentation']
]);
api.postMessage(msg);
Write Hello World on multiple local boards
import { MultipleBoards, LocalAPI, Message } from '@sebbo2002/vestaboard';
const board1 = new LocalAPI('***');
const board2 = new LocalAPI('***');
const boards = new MultipleBoards([board1, board2]);
boards.postMessage('Hello World');
See the examples folder for more examples.
📑 API-Reference
🚦 Tests
Some unit tests use the Vestaboard API to run the tests. You can use the .env.example
file as a template and enter your
data there accordingly.
npm test
npm run coverage
🙆🏼♂️ Copyright and license
Copyright (c) Sebastian Pekarek under the MIT license.
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago