Skip to content

Commit

Permalink
Merge pull request #96 from nnsnodnb/update-pyproject
Browse files Browse the repository at this point in the history
Update pyproject.toml
  • Loading branch information
nnsnodnb authored Jan 2, 2023
2 parents 740b678 + 9bb8e3f commit cdc6190
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ asyncio.run(client.send_message(device_token=registration_id, payload=payload, a
### VoIP

```python
import asyncio
from pathlib import Path

from kalyke import ApnsConfig, ApnsPushType, VoIPClient
Expand All @@ -58,12 +59,12 @@ client = VoIPClient(
auth_key_file_path=Path("/") / "path" / "to" / "YOUR_VOIP_CERTIFICATE.pem",
)

registration_id = "a8a799ba6c21e0795b07b577b562b8537418570c0fb8f7a64dca5a86a5a3b500"

payload = {"key": "value"}
config = ApnsConfig(topic="com.example.App.voip", push_type=ApnsPushType.VOIP)

registration_id = "a8a799ba6c21e0795b07b577b562b8537418570c0fb8f7a64dca5a86a5a3b500"

result = client.send_message(device_token=registration_id, payload=payload, apns_config=config)
asyncio.run(client.send_message(device_token=registration_id, payload=payload, apns_config=config))
```

## License
Expand Down
3 changes: 2 additions & 1 deletion examples/voip.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
from pathlib import Path

from kalyke import ApnsConfig, ApnsPushType, VoIPClient
Expand All @@ -14,7 +15,7 @@

registration_id = "a8a799ba6c21e0795b07b577b562b8537418570c0fb8f7a64dca5a86a5a3b500"

result = client.send_message(device_token=registration_id, payload=payload, apns_config=config)
asyncio.run(client.send_message(device_token=registration_id, payload=payload, apns_config=config))

# Send multiple VoIP notifications

Expand Down
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ description = "A library for interacting with APNs and VoIP using HTTP/2."
authors = ["Yuya Oka <nnsnodnb@gmail.com>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/nnsnodnb/kalyke"
keywords = ["apns", "voip", "apns provider api", "apple push notifications"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
packages = [
{ include = "kalyke" }
]

[tool.poetry.dependencies]
python = "^3.7"
Expand Down

0 comments on commit cdc6190

Please sign in to comment.