# ovok_sdk.resources.push

Canonical page: https://docs.ovok.com/python-sdk/reference/resources/push

Push devices and the project's push provider.

## PushDevicesResource [#pushdevicesresource]

```python
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]

```python
register(device: JsonObject) -> Any
```

Register 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]

```python
list() -> Any
```

List the signed-in person's devices.

**Returns**

- `Any`: The devices, under `devices`.

### unregister() [#unregister]

```python
unregister(device_id: str) -> None
```

Remove a device, which then gets no more push.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `device_id` | `str` |  | The device id. |

## PushProviderResource [#pushproviderresource]

```python
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]

```python
retrieve() -> Any
```

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

**Returns**

- `Any`: The provider.

### create() [#create]

```python
create(provider: JsonObject) -> Any
```

Set 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]

```python
update(changes: JsonObject) -> Any
```

Change 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]

```python
remove() -> None
```

Remove the push provider; no push is sent until one is set up again.

## PushResource [#pushresource]

```python
PushResource(http: HttpClient)
```

Push devices and the project's push provider.

Created by `Ovok`; access it as `ovok.push`.
