Skip to content

Commit dff028a

Browse files
committed
docs: update README
1 parent b79fd69 commit dff028a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Simple web push library for Elixir
1313
<img alt="Hex Version" src="https://img.shields.io/hexpm/v/web_push_elixir.svg">
1414
</a>
1515
<a href="https://hexdocs.pm/web_push_elixir">
16-
<img alt="Hex Docs" src="http://img.shields.io/badge/hex.pm-docs-green.svg?style=flat">
16+
<img alt="Hex Docs" src="http://img.shields.io/badge/api-docs-blue.svg?style=flat">
1717
</a>
1818

1919

@@ -39,7 +39,7 @@ end
3939
mix generate.vapid.keys
4040
```
4141

42-
3. Set your environment variables for your keys:
42+
3. Set environment variables for your generated keys:
4343

4444
```yaml
4545
environment:
@@ -50,10 +50,10 @@ environment:
5050
5151
## Usage
5252
53-
`WebPushElixir` provides a simple public API `send_notification/2` that accepts 2 arguments:
53+
`WebPushElixir` provides a simple `send_notification/2` function that accepts 2 arguments:
5454

55-
* `subscription`: is the subscription information received from the client.
56-
* `message`: is a message string.
55+
* `subscription`: the subscription information received from the client ([example](https://midarrlabs.github.io/web-push-elixir/))
56+
* `message`: the message string.
5757

5858
```elixir
5959
subscription = '{"endpoint":"https://some-push-service","keys":{"p256dh":"BNcRdreALRFXTkOOUHK1EtK2wtaz5Ry4YfYCA_0QTpQtUbVlUls0VJXg7A8u-Ts1XbjhazAkj7I99e8QcYP7DkM=","auth":"tBHItJI5svbpez7KI4CCXg=="}}'
@@ -62,7 +62,7 @@ message = "Some message"
6262
WebPushElixir.send_notification(subscription, message)
6363
```
6464

65-
For more information on how to subscribe a client, permission UX and more - have a look at [https://web.dev/notifications/](https://web.dev/notifications/)
65+
For more information on how to subscribe a client, permission UX and more - take a look at [https://web.dev/notifications/](https://web.dev/notifications/)
6666

6767
## Run tests
6868

lib/web_push_elixir.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ defmodule WebPushElixir do
100100
101101
## Arguments
102102
103-
* `subscription` is the subscription information received from the client. Accepted example: `'{"endpoint":"https://some-push-service","keys":{"p256dh":"BNcRdreALRFXTkOOUHK1EtK2wtaz5Ry4YfYCA_0QTpQtUbVlUls0VJXg7A8u-Ts1XbjhazAkj7I99e8QcYP7DkM=","auth":"tBHItJI5svbpez7KI4CCXg=="}}'`
104-
* `message` is a message string.
103+
* `subscription` the subscription information received from the client. Accepted example: `'{"endpoint":"https://some-push-service","keys":{"p256dh":"BNcRdreALRFXTkOOUHK1EtK2wtaz5Ry4YfYCA_0QTpQtUbVlUls0VJXg7A8u-Ts1XbjhazAkj7I99e8QcYP7DkM=","auth":"tBHItJI5svbpez7KI4CCXg=="}}'`
104+
* `message` the message string.
105105
106106
## Return value
107107

0 commit comments

Comments
 (0)