Fix markdownlint issues

This commit is contained in:
D. Domig
2021-01-16 17:44:34 +01:00
parent 3b16103f47
commit 78df7d3abc
5 changed files with 41 additions and 44 deletions

View File

@@ -9,7 +9,7 @@ At the moment, the following functionality is exposed via REST:
- Send message (+ attachments) to multiple recipients (or a group) - Send message (+ attachments) to multiple recipients (or a group)
- Receive messages - Receive messages
- Link devices - Link devices
- Create/Liste/Remove groups - Create/List/Remove groups
- List/Serve/Delete attachments - List/Serve/Delete attachments
- Update profile - Update profile
@@ -17,7 +17,7 @@ At the moment, the following functionality is exposed via REST:
Sample `docker-compose.yml`file: Sample `docker-compose.yml`file:
``` ```sh
version: "3" version: "3"
services: services:
signal-cli-rest-api: signal-cli-rest-api:
@@ -31,5 +31,4 @@ services:
The Swagger API documentation can be found [here](https://bbernhard.github.io/signal-cli-rest-api/). If you prefer a simple text file like API documentation have a look [here](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md) The Swagger API documentation can be found [here](https://bbernhard.github.io/signal-cli-rest-api/). If you prefer a simple text file like API documentation have a look [here](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md)
In case you need more functionality, please **file a ticket** or **create a PR**.
In case you need more functionality, please **file a ticket** or **create a PR**

View File

@@ -1,5 +1,5 @@
# Sample REST API calls: # Sample REST API calls
- Register a number (with SMS verification) - Register a number (with SMS verification)
@@ -99,6 +99,4 @@ e.g:
The following REST API endpoints are **deprecated and no longer maintained!** The following REST API endpoints are **deprecated and no longer maintained!**
`/v1/send` `/v1/send`

View File

@@ -3,9 +3,11 @@
This document describes how to use the Signal Messenger REST API together with Home Assistant. This document describes how to use the Signal Messenger REST API together with Home Assistant.
prerequisites: prerequisites:
* docker + docker-compose * docker + docker-compose
-or- -or-
* ability to install Home Assistant add-ons * ability to install Home Assistant add-ons
* a phone number to send signal notifications * a phone number to send signal notifications
@@ -14,7 +16,7 @@ prerequisites:
* Create a `docker-compose.yml` file with the following contents: * Create a `docker-compose.yml` file with the following contents:
``` ```sh
version: "3" version: "3"
services: services:
signal-cli-rest-api: signal-cli-rest-api:
@@ -31,7 +33,7 @@ services:
Add this repository to your Home Assistant Add-on Store reposity list: Add this repository to your Home Assistant Add-on Store reposity list:
https://github.com/haberda/hassio_addons [https://github.com/haberda/hassio_addons](https://github.com/haberda/hassio_addons)
Then install and start the add-on. Then install and start the add-on.
@@ -39,23 +41,21 @@ Then install and start the add-on.
In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with: In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with:
`curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'`
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'```
e.g: e.g:
This registers the number `+431212131491291` to the Signal network. This registers the number `+431212131491291` to the Signal network.
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'``` `curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'`
After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request: After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request:
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>/verify/<verification code>'``` `curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>/verify/<verification code>'`
e.g: e.g:
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'``` `curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'`
## Sending messages to Signal Messenger groups ## Sending messages to Signal Messenger groups
@@ -84,5 +84,6 @@ Next, use the following endpoint to obtain the group id:
The group id then needs to be added to the Signal Messenger's `recipients` list in the `configuration.yaml`. (see [here](https://www.home-assistant.io/integrations/signal_messenger/) for details) The group id then needs to be added to the Signal Messenger's `recipients` list in the `configuration.yaml`. (see [here](https://www.home-assistant.io/integrations/signal_messenger/) for details)
# Troubleshooting ## Troubleshooting
In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md) In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md)

View File

@@ -3,6 +3,7 @@
This document describes how to use the Signal Messenger REST API together with Octoprint. This document describes how to use the Signal Messenger REST API together with Octoprint.
prerequisites: prerequisites:
* docker + docker-compose * docker + docker-compose
* a phone number to send signal notifications * a phone number to send signal notifications
@@ -10,7 +11,7 @@ prerequisites:
* Create a `docker-compose.yml` file with the following contents: * Create a `docker-compose.yml` file with the following contents:
``` ```sh
version: "3" version: "3"
services: services:
signal-cli-rest-api: signal-cli-rest-api:
@@ -23,19 +24,17 @@ services:
* start the docker container with `docker-compose up` * start the docker container with `docker-compose up`
## Register phone number ## Register phone number
In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with: In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with:
`curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'`
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'```
e.g: e.g:
This registers the number `+431212131491291` to the Signal network. This registers the number `+431212131491291` to the Signal network.
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'``` `curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'`
After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request: After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request:
@@ -45,6 +44,6 @@ e.g:
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'``` ```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'```
## Troubleshooting
# Troubleshooting
In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md) In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md)

View File

@@ -1,3 +1,3 @@
## The signal-cli-rest-api docker container won't start (signal_messenger_signal-cli-rest-api_1 exited with code 0) # The signal-cli-rest-api docker container won't start (signal_messenger_signal-cli-rest-api_1 exited with code 0)
If your docker container stops with `signal_messenger_signal-cli-rest-api_1 exited with code 0`, make sure that the host port isn't already occupied by another process (see [here](https://github.com/bbernhard/signal-cli-rest-api/issues/2)). If your docker container stops with `signal_messenger_signal-cli-rest-api_1 exited with code 0`, make sure that the host port isn't already occupied by another process (see [here](https://github.com/bbernhard/signal-cli-rest-api/issues/2)).