AccountPush
AccountPush: the browsers that show the signed-in person NoClick's notifications (Web Push).
class AccountPushThe browsers that show the signed-in person NoClick's notifications: a DM or @mention of them in a space, a
question or approval that needs them, and work that finished while they weren't watching. Turned on in a browser
from the person's own tap, and off there. The signed-in person's alone, in their own browser: any other caller
raises noclick.PermissionDenied.
| configured | bool | |
| public_key | str | None | |
| devices | list[PushDevice] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
getclassmethodasync
noclick.AccountPush.get(*, client=None) -> AccountPushRead the browsers that show the person's notifications.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The browsers (devices), whether this NoClick sends notifications to browsers (configured) and the
key a new one subscribes with (public_key).
push = noclick.AccountPush.get()
print([d.device for d in push.devices])addclassmethodasync
noclick.AccountPush.add(subscription, *, device=None, client=None) -> PushDeviceTurn notifications on in a browser, with its push subscription (endpoint and keys, as the browser's
PushSubscription.toJSON() gives them): the same browser again is updated, never added twice.
NoneThe client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)The browser, as it's kept.
added = noclick.AccountPush.add(subscription, device="iPhone")removeclassmethodasync
noclick.AccountPush.remove(device_id, *, client=None) -> NoneTurn notifications off in one browser.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Nothing.
noclick.AccountPush.remove(added.id)PushDevice
class PushDeviceOne browser that shows the person's notifications, as its push service names it (endpoint).
| id | str | |
| device | str | None | |
| endpoint | str | |
| created_at | datetime | None | |
| last_sent_at | datetime | None |