|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": 3, |
| 5 | + "execution_count": null, |
6 | 6 | "metadata": {}, |
7 | 7 | "outputs": [ |
8 | 8 | { |
9 | 9 | "name": "stdout", |
10 | 10 | "output_type": "stream", |
11 | 11 | "text": [ |
12 | | - "{'id': 'wUIvpVrClRN4', 'time': 1736379310, 'expires': 1736422510, 'event': 'message', 'topic': 'eratzartehzqwrtzq45634zhsfg', 'title': 'Title', 'message': 'test', 'priority': 5, 'tags': ['octopus'], 'click': 'https://habitica.com/', 'icon': 'https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_defensiveStance.png', 'content_type': 'text/markdown'}\n" |
| 12 | + "Notification(id='9kbiJdRntcGB', time=datetime.datetime(2026, 1, 20, 17, 43, 51, tzinfo=datetime.timezone.utc), expires=datetime.datetime(2026, 1, 21, 5, 43, 51, tzinfo=datetime.timezone.utc), event=<Event.MESSAGE: 'message'>, topic='eratzartehzqwrtzq45634zhsfg', message='test', title='Title', tags=[], priority=None, click=URL('https://habitica.com/'), icon=None, actions=[], attachment=None, content_type=None, sequence_id='Mc3otamDNcpJ')\n" |
13 | 13 | ] |
14 | 14 | } |
15 | 15 | ], |
|
30 | 30 | " priority=5,\n", |
31 | 31 | " tags=[\"octopus\"],\n", |
32 | 32 | " markdown=True,\n", |
| 33 | + " sequence_id=\"Mc3otamDNcpJ\",\n", |
33 | 34 | " )\n", |
34 | 35 | " print(await ntfy.publish(message))" |
35 | 36 | ] |
| 37 | + }, |
| 38 | + { |
| 39 | + "cell_type": "code", |
| 40 | + "execution_count": null, |
| 41 | + "metadata": {}, |
| 42 | + "outputs": [ |
| 43 | + { |
| 44 | + "name": "stdout", |
| 45 | + "output_type": "stream", |
| 46 | + "text": [ |
| 47 | + "Notification(id='ignYrqz75Xcc', time=datetime.datetime(2026, 1, 20, 17, 44, 3, tzinfo=datetime.timezone.utc), expires=datetime.datetime(2026, 1, 21, 5, 44, 3, tzinfo=datetime.timezone.utc), event=<Event.MESSAGE_DELETE: 'message_delete'>, topic='eratzartehzqwrtzq45634zhsfg', message=None, title=None, tags=[], priority=None, click=None, icon=None, actions=[], attachment=None, content_type=None, sequence_id='Mc3otamDNcpJ')\n" |
| 48 | + ] |
| 49 | + } |
| 50 | + ], |
| 51 | + "source": [ |
| 52 | + "async with ClientSession() as session:\n", |
| 53 | + " ntfy = Ntfy(\"https://ntfy.sh\", session)\n", |
| 54 | + " print(await ntfy.clear(\"eratzartehzqwrtzq45634zhsfg\", \"Mc3otamDNcpJ\"))" |
| 55 | + ] |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_type": "code", |
| 59 | + "execution_count": null, |
| 60 | + "metadata": {}, |
| 61 | + "outputs": [], |
| 62 | + "source": [ |
| 63 | + "async with ClientSession() as session:\n", |
| 64 | + " ntfy = Ntfy(\"https://ntfy.sh\", session)\n", |
| 65 | + " print(await ntfy.delete(\"eratzartehzqwrtzq45634zhsfg\", \"Mc3otamDNcpJ\"))" |
| 66 | + ] |
36 | 67 | } |
37 | 68 | ], |
38 | 69 | "metadata": { |
|
0 commit comments