# Popups

> Popups: the popups and banners of the NoClick app your account's owner can turn off, and back on.

## noclick.Popups

```python
class Popups
```

Which of the NoClick app's popups and banners your account's owner sees: `popups` maps each one
(`run_results`, the outputs shown after a workflow runs; `invite_banner`, the nudge to share a workflow's live
invite link; `publish_banner`, the nudge to publish an interface) to whether it shows. One never turned off
shows. They're what Settings → Popups in the NoClick app shows, and a popup's own "Don't show again" turns it off
too.

| Attribute | Type | Description |
| --- | --- | --- |
| `popups` | `dict[str, bool]` |  |
| `raw` | `dict[str, Any]` | The response JSON exactly as the API sent it. |

### Popups.get

```python
noclick.Popups.get(*, client=None) -> Popups
```

Read which of the app's popups your account's owner sees. Any of your account's own keys may, but one held
to one of your users, which raises `noclick.PermissionDenied`: they're the owner's.

Parameters:

- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `Popups` Every popup, each `True` (it shows) or `False` (it's off).

Usage:

```python
shown = noclick.Popups.get().popups
print(shown["run_results"])   # True until it's turned off
```

### Popups.update

```python
noclick.Popups.update(popups, *, client=None) -> Popups
```

Show (`True`) or stop showing (`False`) the app's popups to your account's owner, in one change; a popup
you leave out stays as it is. A popup the app doesn't have, or a value that isn't `True` or `False`,
raises `noclick.InvalidRequest` and changes nothing.

Parameters:

- `popups` (`Mapping[str, bool]`, required)
- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `Popups` Every popup, as it stands after the change.

Usage:

```python
noclick.Popups.update({"invite_banner": False})
```
