Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ KICK_CLIENT_ID=... KICK_CLIENT_SECRET=... uv run pytest -m live

- Kick's spec lives at https://api.kick.com/swagger/doc.yaml, the docs at https://github.com/KickEngineering/KickDevDocs. Check both before adding or changing an endpoint, and test the change live. The spec has been wrong before: it says `/public/v2/categories` takes comma-separated lists, but the API only accepts repeated keys.
- Kick returns 401, not 403, for a valid token that lacks a scope.
- `POST /moderation/bans` returns a bare 400 for the broadcaster, the app's own bot, or an unknown user. Live-test moderation on a public bot account (for example BotRix) with a 1 minute timeout, then unban.
- Never log or `repr()` tokens or client secrets.
- Models subclass `KickModel` (extra fields allowed). Convert Kick's `""` and `0001-01-01T00:00:00Z` to `None` with `OptionalStr` / `OptionalDatetime`.
- Don't wrap endpoints Kick marks deprecated.
Expand Down
4 changes: 3 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Methods that take a list of IDs or slugs split it into several requests when it
| `channels.me()` returns `Channel` | same | User |
| `channels.update(stream_title=, category_id=, custom_tags=)` | `PATCH /public/v1/channels` | User, `channel:write` |

`Channel.category` is `None` when no category is set. `Channel.stream.key` and `.url` are only filled with `streamkey:read`.
`Channel.category` is `None` when no category is set. `Channel.stream.key` and `.url` are only filled with `streamkey:read`. Kick accepts `custom_tags` on an offline channel, but `Channel.stream.custom_tags` stays empty until the channel goes live.

## Chat

Expand All @@ -42,6 +42,8 @@ All need a user token with `moderation:ban`. `broadcaster_user_id` defaults to t
| `moderation.timeout(user_id, minutes, broadcaster_user_id=None, reason=None)` | same, with `duration` (1 to 10080 minutes) |
| `moderation.unban(user_id, broadcaster_user_id=None)` | `DELETE /public/v1/moderation/bans` |

Kick answers a bare `400 Invalid request` (raised as `BadRequestError`) when the target can't be moderated: the broadcaster themselves, your app's own bot account, or a user ID that doesn't exist.

## Channel rewards

User token. Reading needs `channel:rewards:read`, everything else `channel:rewards:write`. Only the app that created a reward can change, delete or resolve it.
Expand Down