DEVELOPMENT ENVIRONMENT

~liljamo/canwa

canwa/README.md -rw-r--r-- 888 bytes
45439cc4Jonni Liljamo feat: initial version 27 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# canwa

A small API for relaying the same message to multiple services.

## Supported services:
| | |
| - | - |
| Gotify | [gotify.net](https://gotify.net) |
| Matrix | [matrix.org](https://matrix.org) |

## Example
The following example creates a notifier that sends a message to Gotify and
Matrix.

### Example `canwa.toml`
```toml
interface = "0.0.0.0"
port = 8080

[services.gtf_main]
type = "gotify"
instance = "https://gotify.example.com"
token = "gotify_token"

[services.mtx_main]
type = "matrix"
instance = "https://example.com"
token = "access_token"
room = "!roomid:example.com"

[notifiers.f2b]
token = "long_token_for_auth"
services = ["gtf_main", "mtx_main"]
```

### cURL usage:
```sh
curl -XPOST -H"Content-Type: application/json" \
    -d'{"token": "long_token_for_auth", "title": "test title", "message": "this is a message"}' \
    "http://localhost:8080/message"
```