# A live stream

`GET https://rest.wordplus.cloud/wordplus/realtime/streams/{name}`

A live stream as it is now: idle, live or ended, how many watch it, its peak since it went live, its slow mode,
whether it takes reactions, and its pinned message.

In the packages: `realtime.stream( name ).get()`.

## Parameters

| Name | In | |
|---|---|---|
| `name` (required) | path | The stream name, percent-encoded: `show:mugs` is `show%3Amugs`. |

## Answer

The stream.

```json
{
  "ok": true,
  "stream": {
    "name": "show:mugs",
    "state": "live",
    "started_at": 1791638400000,
    "ended_at": null,
    "viewers": 120,
    "peak": 140,
    "slow": 0,
    "reactions": true,
    "pinned": null
  }
}
```

## Refusals

- **400**: `bad_request`, `bad_room`: the request is not one the API takes. `reserved`: an event name kept for the room itself.
- **401**: `missing_signature`, `stale_signature` (a clock off by more than 5 minutes), `unknown_site`, `bad_signature` (a wrong secret, or a body or path other than the one signed).
- **403**: `not_included`: your plan does not include it.

## Examples

`wordplus()` (in Go `app.Request()`) signs and sends the request: https://docs.wordplus.cloud/api/signing/ has it in each language.

**curl**

```bash
wordplus GET '/wordplus/realtime/streams/show%3Amugs'
```

**Node**

```js
const { stream } = await wordplus('GET', `/wordplus/realtime/streams/${encodeURIComponent('show:mugs')}`);
```

**Python**

```python
stream = wordplus("GET", f"/wordplus/realtime/streams/{quote('show:mugs', safe='')}")["stream"]
```

**PHP**

```php
$stream = wordplus('GET', '/wordplus/realtime/streams/'.rawurlencode('show:mugs'))['stream'];
```

**Go**

```go
answer, err := app.Request("GET", "/wordplus/realtime/streams/"+url.PathEscape("show:mugs"), nil)
```

