API referenceovok_sdk.resources

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

NameTypeDefaultDescription
httpHttpClientThe HTTP client scoped to the push routes.

register()

register(device: JsonObject) -> Any

Register a device token to the signed-in person; the same token again answers the same device.

Parameters

NameTypeDefaultDescription
deviceJsonObjectThe token, the platform (ios, android or web) and an optional appId.

Returns

  • Any: The device, never with its token.

list()

list() -> Any

List the signed-in person's devices.

Returns

  • Any: The devices, under devices.

unregister()

unregister(device_id: str) -> None

Remove a device, which then gets no more push.

Parameters

NameTypeDefaultDescription
device_idstrThe device id.

PushProviderResource

PushProviderResource(http: HttpClient)

The provider the project's push goes through, for project admins; access it as ovok.push.provider.

Parameters

NameTypeDefaultDescription
httpHttpClientThe HTTP client scoped to the push routes.

retrieve()

retrieve() -> Any

Read the push provider and its settings, never a secret.

Returns

  • Any: The provider.

create()

create(provider: JsonObject) -> Any

Set up the push provider; a relay's signing secret is answered this once.

Parameters

NameTypeDefaultDescription
providerJsonObjectThe provider name (fcm, apns, expo or relay) and its credentials.

Returns

  • Any: The provider as set up.

update()

update(changes: JsonObject) -> Any

Change the push provider.

Parameters

NameTypeDefaultDescription
changesJsonObjectThe provider set up, and the fields to change.

Returns

  • Any: The provider after the change.

remove()

remove() -> None

Remove 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

On this page