sklik rozsireni na typove metody

This commit is contained in:
JiriUhlir
2026-07-20 08:29:23 +02:00
parent 28b29b8331
commit 0ed3e11a4d
9 changed files with 1255 additions and 10 deletions
+22 -2
View File
@@ -29,7 +29,12 @@ Interactive docs (Swagger UI): `/docs` — publicly `https://services.csbot.cz/a
| Google Ads | POST | `/googleads/customers/{id}/search`, `/googleads/customers/{id}/searchStream` |
| Google Ads | GET | `/googleads/customers:listAccessibleCustomers` |
| Sklik | POST | `/sklik/login`, `/sklik/report/{entity}`, `/sklik/rpc/{method}` |
| Sklik | GET | `/sklik/limits` |
| Sklik | GET | `/sklik/limits`, `/sklik/write-limits` |
| Sklik read | GET | `/sklik/campaigns`, `/sklik/groups`, `/sklik/ads` |
| Sklik **write** | POST | `/sklik/{campaigns\|groups\|ads}` — create, always **paused** |
| Sklik **write** | PUT | `/sklik/{campaigns\|groups\|ads}` — update by id (partial) |
| Sklik **write** | DELETE | `/sklik/{campaigns\|groups\|ads}?ids=` — remove (reversible) |
| Sklik **write** | POST | `/sklik/{campaigns\|groups\|ads}/restore?ids=` |
## Credentials (headers)
@@ -60,6 +65,14 @@ Interactive docs (Swagger UI): `/docs` — publicly `https://services.csbot.cz/a
| --- | --- | --- |
| `X-Sklik-Token` | yes | Sklik API token from account settings. |
| `X-Sklik-User-Id` | no | Managed account id for agency/MCC access. |
| `X-Idempotency-Key` | no | Writes only. A retry with the same key replays the original result instead of creating a duplicate. |
> **Sklik writes** create everything **paused** (`status: suspend`) — Sklik's own
> default is `active`, so this is forced server-side. `PUT` is ordinary CRUD and
> *can* resume a campaign; set `SKLIK_BLOCK_ACTIVATION=true` to forbid that.
> Budget ceilings are **off by default**; enable them with `SKLIK_MAX_*`.
> `DELETE` is Sklik's soft delete and is reversible via `/restore`.
> See [documentation/sklik.md](documentation/sklik.md).
Where to obtain each credential is described at the top of `/docs` (Swagger) and
in [documentation/](documentation/).
@@ -78,6 +91,13 @@ Non-secret only — see [app/config.py](app/config.py): `ROOT_PATH`,
`GA_DATA_BASE_URL`, `GA_ADMIN_BASE_URL`, `GA_SCOPE`, `GSC_DATA_BASE_URL`,
`GSC_INSPECT_BASE_URL`, `GSC_SCOPE`, `GOOGLE_ADS_BASE_URL`,
`GOOGLE_ADS_API_VERSION`, `GOOGLE_ADS_SCOPE`, `SKLIK_BASE_URL`,
`HTTP_TIMEOUT_SECONDS`, `LOG_LEVEL`.
`SKLIK_LIST_PAGE_LIMIT`, `SKLIK_LIST_MAX_PAGES`, `HTTP_TIMEOUT_SECONDS`,
`LOG_LEVEL`.
Sklik write guard rails (all optional, all off by default):
`SKLIK_MAX_DAY_BUDGET_HALERS`, `SKLIK_MAX_TOTAL_BUDGET_HALERS`,
`SKLIK_MAX_CPC_HALERS` (`0` = no ceiling), `SKLIK_IDEMPOTENCY_TTL_SECONDS`,
`SKLIK_BLOCK_ACTIVATION` (default `false`),
`SKLIK_RPC_ALLOW_MUTATIONS` (default `true`).
See [documentation/](documentation/) for per-integration detail.