ovok_sdk.resources.push
Push devices and the project's push provider.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.33+c6e0f70
Push devices and the project's push provider.
PushDevicesResource
PushDevicesResource(http: HttpClient)The devices the signed-in person receives push on; access it as ovok.push.devices.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The HTTP client scoped to the push routes. |
register()
register(device: JsonObject) -> AnyRegister a device token to the signed-in person; the same token again answers the same device.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device | JsonObject | The token, the platform (ios, android or web) and an optional appId. |
Returns
Any: The device, never with its token.
list()
list() -> AnyList the signed-in person's devices.
Returns
Any: The devices, underdevices.
unregister()
unregister(device_id: str) -> NoneRemove a device, which then gets no more push.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device id. |
PushProviderResource
PushProviderResource(http: HttpClient)The provider the project's push goes through, for project admins; access it as ovok.push.provider.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The HTTP client scoped to the push routes. |
retrieve()
retrieve() -> AnyRead the push provider and its settings, never a secret.
Returns
Any: The provider.
create()
create(provider: JsonObject) -> AnySet up the push provider; a relay's signing secret is answered this once.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
provider | JsonObject | The provider name (fcm, apns, expo or relay) and its credentials. |
Returns
Any: The provider as set up.
update()
update(changes: JsonObject) -> AnyChange the push provider.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
changes | JsonObject | The provider set up, and the fields to change. |
Returns
Any: The provider after the change.
remove()
remove() -> NoneRemove the push provider; no push is sent until one is set up again.
PushResource
PushResource(http: HttpClient)Push devices and the project's push provider.
Created by Ovok; access it as ovok.push.
Last updated on