v1.0.89: detailed code comments — all Python files + index.html architecture overview
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
"""
|
||||
Операции с сервисами Nubes — получение списка и деталей через API.
|
||||
"""
|
||||
|
||||
from api.http_client import HttpClient
|
||||
|
||||
|
||||
def get_services(client):
|
||||
"""GET /services → список ВСЕХ сервисов пользователя.
|
||||
|
||||
Возвращает list[dict], каждый с ключами: svcId, svc, svcExtendedName, operations, ..."""
|
||||
data = client.get("/services")
|
||||
return data.get("results", [])
|
||||
|
||||
|
||||
def get_service_detail(client, svc_id):
|
||||
"""GET /services/{svcId} → детали одного сервиса.
|
||||
|
||||
Возвращает dict с ключами: svc, operations[], ...
|
||||
operations — список доступных операций (create, modify, delete, ...)."""
|
||||
data = client.get(f"/services/{svc_id}")
|
||||
return data.get("svc", {})
|
||||
|
||||
Reference in New Issue
Block a user