feat: add BVK exchange library

This commit is contained in:
Георгий
2026-07-12 20:44:44 +03:00
parent 3a1c524eb2
commit 0ff0905a9c
15 changed files with 627 additions and 0 deletions

63
protocol.md Normal file
View File

@@ -0,0 +1,63 @@
# BVK Exchange Protocol
Based on ротокол_обменаедиакомплекса_и_БВК.pdf`.
## Role
- BVK is the HTTP client.
- Media complex is the HTTP server.
- Default address from the document: `172.16.16.2:13280`.
## Set Content
```text
GET /set-content?route=<R>&str=<S>&tpl_name=<T>
```
Parameters are URL-encoded.
| Parameter | Meaning |
| --- | --- |
| `route` | Route number, 1 to 3 characters |
| `str` | Ticker/running text |
| `tpl_name` | Media content template name |
Current library defaults:
| Field | Default limit |
| --- | ---: |
| `route` | 3 characters |
| `str` | 200 characters |
| `tpl_name` | 200 characters |
The exact text/template limits must be confirmed with the integrator because the
PDF text layer is ambiguous for the original value.
## Get Content
```text
GET /get-content
```
Response:
```json
{
"route": "<R>",
"str": "<S>",
"tpl_name": "<T>"
}
```
Mila keeps `updated_at` internally, but the HTTP response is strict and exposes
only the fields defined by the protocol.
## Status Codes
| Code | Meaning |
| ---: | --- |
| 200 | OK |
| 400 | Bad request / validation error |
| 404 | Path not found |
| 500 | Internal server error |
| 503 | State is not ready or dependency unavailable |