3.1.0 • Published 27 days ago

@sebbo2002/vestaboard v3.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

@sebbo2002/vestaboard

MIT LICENSE CI Status

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.

3.1.1-develop.6

27 days ago

3.1.1-develop.5

1 month ago

3.1.1-develop.4

1 month ago

3.1.1-develop.3

2 months ago

3.1.1-develop.2

2 months ago

3.1.1-develop.1

2 months ago

3.1.0

4 months ago

3.0.1-develop.1

9 months ago

3.1.0-develop.1

6 months ago

2.0.1-develop.1

1 year ago

3.0.0

11 months ago

3.0.0-develop.1

11 months ago

2.0.0-develop.2

1 year ago

2.0.0

1 year ago

1.0.1

1 year ago

1.0.1-develop.3

1 year ago

2.0.0-develop.1

1 year ago

1.0.1-develop.2

1 year ago

1.0.1-develop.1

1 year ago

1.0.0

2 years ago

1.0.0-develop.2

2 years ago

1.0.0-develop.1

2 years ago

1.0.0-pre.0

2 years ago