(token: str, extra: dict[str, str] | None = None)
| 19 | |
| 20 | |
| 21 | def build_headers(token: str, extra: dict[str, str] | None = None) -> dict[str, str]: |
| 22 | headers = { |
| 23 | "Authorization": f"Bearer {token}", |
| 24 | "Accept": "application/json", |
| 25 | } |
| 26 | if extra: |
| 27 | headers.update(extra) |
| 28 | return headers |
| 29 | |
| 30 | |
| 31 | def api_request( |