Skip to content

Commit

Permalink
feat: First commit πŸͺ΄
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Aug 16, 2022
1 parent c8e95d7 commit 2990f59
Show file tree
Hide file tree
Showing 25 changed files with 2,563 additions and 1,072 deletions.
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VESTABOARD_SUBSCRIPTION_KEY="************************************"
VESTABOARD_SUBSCRIPTION_SECRET="************************************************"
VESTABOARD_READ_WRITE_KEY="************************************************"
VESTABOARD_LOCAL_KEY="************************************************"
VESTABOARD_LOCAL_HOST="vestaboard.local"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/dist
/docs
/node_modules
.env
90 changes: 65 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,87 @@
# template
<p align="center">
<img src="https://d.sebbo.net/vestaboard-client-logo-CHm68XZRkO67IrmfGjetZ2nEDl1JGjnT44OZlN6bbzljq4nnITRPW8AoBhWO6G29r6cd4PS1fyIiUCrbBJC2CnnG0GvZNzPLB6aA.png" alt="Logo" />
</p>

[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
# `@sebbo2002/vestaboard`

Here would be a very short description of the project. So in this example it would be a short information that this is
a template that I use to start new projects and services.
[![MIT LICENSE](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/sebbo2002/vestaboard/blob/develop/LICENSE)
[![Package Size](https://img.shields.io/bundlephobia/min/@sebbo2002/vestaboard?style=flat-square)](https://bundlephobia.com/package/@sebbo2002/vestaboard)
[![CI Status](https://img.shields.io/github/workflow/status/sebbo2002/vestaboard/Test%20%26%20Release?style=flat-square)](https://github.com/sebbo2002/vestaboard/actions)

<br />

## 🚨 Template Usage Checklist
- [ ] Update project name in `package.json`
- [ ] Create `main` and `develop` branches
- [ ] Set `develop` as default branch
- [ ] Create Docker Repository
- [ ] Add Repository Description
- [ ] Add secret: `DOCKERHUB_TOKEN`
- [ ] Create npm Repository with `npm publish --access public`
- [ ] Add secret: `NPM_TOKEN`
- [ ] Go through repo settings

Just another client for the [Vestaboard](https://www.vestaboard.com/) [APIs](https://docs.vestaboard.com/). It supports
the [Subscription API](https://docs.vestaboard.com/methods), [Read/Write API](https://docs.vestaboard.com/read-write) and
the [Local API](https://docs.vestaboard.com/local). 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

git clone https://github.com/sebbo2002/template.git
cd ./template
## πŸ“¦ Installation

npm install
npm i --save @sebbo2002/vestaboard


## ⚑️ Quick Start

This is where it would normally say how to use the project.
This could be a code example for a library or instructions on how to use a CLI tool.
#### Draw some patterns using the Subscription API

```js
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
```js
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
```js
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](./examples) folder for more examples.


## πŸ“‘ API-Reference

Is there an API that needs to be documented? Then here would be a nice place for it. If there is external documentation,
you can link it here ([example](https://github.com/sebbo2002/ical-generator/#-api-reference)).
- [Index](https://sebbo2002.github.io/vestaboard/develop/reference/)
- [LocalAPI](https://sebbo2002.github.io/vestaboard/develop/reference/classes/LocalAPI.html)
- [Message](https://sebbo2002.github.io/vestaboard/develop/reference/classes/Message.html)
- [MultipleBoards](https://sebbo2002.github.io/vestaboard/develop/reference/classes/MultipleBoards.html)
- [ReadWriteAPI](https://sebbo2002.github.io/vestaboard/develop/reference/classes/ReadWriteAPI.html)
- [SubscriptionAPI](https://sebbo2002.github.io/vestaboard/develop/reference/classes/SubscriptionAPI.html)


## 🚦 Tests

## πŸ™‹ FAQ
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.

### What's `1` + `2`
It's `3` πŸŽ‰
```
npm test
npm run coverage
```


## πŸ™†πŸΌβ€β™‚οΈ Copyright and license
Expand Down
Loading

0 comments on commit 2990f59

Please sign in to comment.