mirror of
https://github.com/pushbits/server.git
synced 2025-05-02 19:56:15 +02:00
Fix spelling and style in README.md
This commit is contained in:
parent
cdf4a47c07
commit
423020634f
1 changed files with 24 additions and 19 deletions
43
README.md
43
README.md
|
@ -30,15 +30,14 @@ can be reused.
|
|||
|
||||
### Why Matrix instead of X?
|
||||
|
||||
I would totally do this with Signal if there was a proper API.
|
||||
Unfortunately, neither [Signal](https://signal.org/) nor [WhatsApp](https://www.whatsapp.com/) come with an API through which PushBits could interact.
|
||||
This project totally would've used Signal if it would offer a proper API.
|
||||
Sadly, neither [Signal](https://signal.org/) nor [WhatsApp](https://www.whatsapp.com/) come with an API (at the time of writing) through which PushBits could interact.
|
||||
|
||||
In [Telegram](https://telegram.org/) there is an API to run bots, but these are limited in that they cannot create chats by themselves.
|
||||
If you insist on going with Telegram, have a look at [webhook2telegram](https://github.com/muety/webhook2telegram).
|
||||
|
||||
I myself started using Matrix only for this project.
|
||||
The idea of a federated, synchronized but yet end-to-end encrypted protocol is awesome, but its clients simply aren't really there yet.
|
||||
Still, if you haven't tried it yet, I suggest you to check it out.
|
||||
Still, if you haven't tried it yet, we'd encourage you to check it out.
|
||||
|
||||
## 🤘 Features
|
||||
|
||||
|
@ -98,12 +97,12 @@ The SQLite database would be written to `./data/pushbits.db`.
|
|||
## 📄 Usage
|
||||
|
||||
Now, how can you interact with the server?
|
||||
I wrote [a little CLI tool called pbcli](https://github.com/PushBits/cli) to make basic API requests to the server.
|
||||
We provide [a little CLI tool called pbcli](https://github.com/PushBits/cli) to make basic API requests to the server.
|
||||
It helps you to create new users and applications.
|
||||
You will find further instructions in the linked repository.
|
||||
|
||||
At the time of writing, there is no fancy GUI built-in, and I'm not sure if this is necessary at all.
|
||||
I don't do much front end development myself, so if you want to contribute in this regard I'm happy if you reach out!
|
||||
At the time of writing, there is no fancy GUI built-in, and we're not sure if this is necessary at all.
|
||||
Currently, we would like to avoid front end development, so if you want to contribute in this regard we're happy if you reach out!
|
||||
|
||||
After you have created a user and an application, you can use the API to send a push notification to your Matrix account.
|
||||
|
||||
|
@ -124,13 +123,13 @@ pbcli application show $PB_APPLICATION --url https://pushbits.example.com --user
|
|||
|
||||
### Message options
|
||||
|
||||
Messages are supporting three different syntaxes:
|
||||
Messages can be specified in three different syntaxes:
|
||||
|
||||
* text/plain
|
||||
* text/html
|
||||
* text/markdown
|
||||
* `text/plain`
|
||||
* `text/html`
|
||||
* `text/markdown`
|
||||
|
||||
To set a specific syntax you need to set the `extras` ([inspired by Gotifys message extras](https://gotify.net/docs/msgextras#clientdisplay)):
|
||||
To set a specific syntax you need to set the `extras` parameter ([inspired by Gotify's message extras](https://gotify.net/docs/msgextras#clientdisplay)):
|
||||
|
||||
```bash
|
||||
curl \
|
||||
|
@ -140,13 +139,16 @@ curl \
|
|||
"https://pushbits.example.com/message?token=$PB_TOKEN"
|
||||
```
|
||||
|
||||
HTML-Content might not be fully rendered in your Matrix-Client - see the corresponding [Matrix specs](https://spec.matrix.org/unstable/client-server-api/#mroommessage-msgtypes). This also holds for Markdown, as it is transfered to the corresponding HTML-syntax.
|
||||
HTML content might not be fully rendered in your Matrix client; see the corresponding [Matrix specs](https://spec.matrix.org/unstable/client-server-api/#mroommessage-msgtypes).
|
||||
This also holds for Markdown, as it is translated into the corresponding HTML syntax.
|
||||
|
||||
### Deleting a Message
|
||||
|
||||
You can delete a message, this will send a notification in response to the original message informing you that the message is "deleted".
|
||||
You can delete a message, this will send a notification in response to the original message informing you that the message is "deleted".
|
||||
|
||||
You need the message ID for deleting a message. As it might contain characters not valid in uris we provide an additional `id_url_encoded` field for messages, use that value for deleting a message.
|
||||
To delete a message, you need its message ID which is provided as part of the response when you send the message.
|
||||
The ID might contain characters not valid in URIs.
|
||||
We hence provide an additional `id_url_encoded` field for messages; you can directly use it when deleting a message without performing encoding yourself.
|
||||
|
||||
```bash
|
||||
curl \
|
||||
|
@ -172,15 +174,18 @@ git clone https://github.com/pushbits/server.git
|
|||
|
||||
### Testing
|
||||
|
||||
Testing is essential for deliviering a good and reliable software. PushBits uses golangs integrated test features. Unfortunately writing tests is quite time consuming and therefore not every feature and every line of code is automatically tested. Feel free to help us improve our tests.
|
||||
Testing is essential for delivering good and reliable software.
|
||||
PushBits uses Go's integrated test features.
|
||||
Unfortunately, writing tests is quite time consuming and therefore not every feature and every line of code is automatically tested.
|
||||
Feel free to help us improve our tests.
|
||||
|
||||
To run tests for a single (sub)module you can simply execute the following command in the modules folder.
|
||||
To run tests for a single (sub)module you can simply execute the following command in the module's folder.
|
||||
|
||||
```bash
|
||||
go test
|
||||
```
|
||||
|
||||
To get the testing coverage for a module use the `-cover` flag.
|
||||
To get the testing coverage for a module use the `-cover` flag.
|
||||
|
||||
```bash
|
||||
go test -cover
|
||||
|
@ -196,4 +201,4 @@ Running tests for all PushBits module is done like this:
|
|||
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue