{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Kwork API \u2014 Python Client","text":"
Unofficial Python client for Kwork.ru API.
"},{"location":"#installation","title":"Installation","text":"pip install kwork-api\n Or with UV:
uv add kwork-api\n"},{"location":"#quick-start","title":"Quick Start","text":""},{"location":"#login-with-credentials","title":"Login with credentials","text":"from kwork_api import KworkClient\n\n# Authenticate\nclient = await KworkClient.login(\"username\", \"password\")\n\n# Get catalog\ncatalog = await client.catalog.get_list(page=1)\n\n# Get projects\nprojects = await client.projects.get_list(page=1)\n\n# Close when done\nawait client.close()\n"},{"location":"#using-context-manager","title":"Using context manager","text":"async with await KworkClient.login(\"username\", \"password\") as client:\n catalog = await client.catalog.get_list(page=1)\n # Client automatically closes\n"},{"location":"#save-and-restore-session","title":"Save and restore session","text":"# Save credentials after login\nclient = await KworkClient.login(\"username\", \"password\")\n\n# Option 1: Save token only\ntoken = client.token\n\n# Option 2: Save full credentials (token + cookies)\ncreds = client.credentials\nimport json\nwith open(\"session.json\", \"w\") as f:\n json.dump(creds, f)\n\n# Later, restore session\nclient = KworkClient(token=token)\n# or\nclient = KworkClient(**creds)\n\nuser_info = await client.user.get_info()\n"},{"location":"#api-overview","title":"API Overview","text":""},{"location":"#catalog-api","title":"Catalog API","text":"client.catalog.get_list() \u2014 Get kworks catalogclient.catalog.get_details(kwork_id) \u2014 Get kwork detailsclient.projects.get_list() \u2014 Get freelance projectsclient.projects.get_payer_orders() \u2014 Your orders as customerclient.projects.get_worker_orders() \u2014 Your orders as performerclient.user.get_info() \u2014 Get user profileclient.user.get_reviews() \u2014 Get user reviewsclient.user.get_favorite_kworks() \u2014 Get favorite kworksclient.get_wants() \u2014 User preferencesclient.get_kworks_status() \u2014 Kworks statusclient.update_settings() \u2014 Update settingsclient.go_offline() \u2014 Set offline statusSee API Reference for full documentation.
"},{"location":"#error-handling","title":"Error Handling","text":"from kwork_api import KworkError, KworkAuthError, KworkApiError\n\ntry:\n await client.catalog.get_list()\nexcept KworkAuthError:\n print(\"Invalid credentials\")\nexcept KworkApiError as e:\n print(f\"API error: {e.status_code}\")\nexcept KworkError as e:\n print(f\"General error: {e.message}\")\n"},{"location":"ARCHITECTURE/","title":"Architecture \u2014 kwork-api","text":""},{"location":"ARCHITECTURE/#_1","title":"\ud83d\udcd0 \u041e\u0431\u0437\u043e\u0440","text":"kwork-api \u2014 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 Python \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f Kwork.ru API \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439.
"},{"location":"ARCHITECTURE/#_2","title":"\ud83c\udfd7\ufe0f \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430","text":"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 User Application \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502\n \u25bc\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 KworkClient \u2502\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n\u2502 \u2502 Authentication Layer \u2502 \u2502\n\u2502 \u2502 - login() / token auth \u2502 \u2502\n\u2502 \u2502 - Session management \u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n\u2502 \u2502 API Groups \u2502 \u2502\n\u2502 \u2502 - catalog, projects, user, reference, ... \u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n\u2502 \u2502 HTTP Layer (httpx) \u2502 \u2502\n\u2502 \u2502 - HTTP/2 support \u2502 \u2502\n\u2502 \u2502 - Timeout handling \u2502 \u2502\n\u2502 \u2502 - Error handling \u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502\n \u25bc\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Kwork.ru API (HTTPS) \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"},{"location":"ARCHITECTURE/#_3","title":"\ud83d\udcc1 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430","text":"kwork-api/\n\u251c\u2500\u2500 src/kwork_api/\n\u2502 \u251c\u2500\u2500 __init__.py # Public API\n\u2502 \u251c\u2500\u2500 client.py # KworkClient + API groups\n\u2502 \u251c\u2500\u2500 models.py # Pydantic models\n\u2502 \u2514\u2500\u2500 errors.py # Exception classes\n\u2502\n\u251c\u2500\u2500 tests/\n\u2502 \u251c\u2500\u2500 test_client.py # Client tests\n\u2502 \u251c\u2500\u2500 test_models.py # Model tests\n\u2502 \u2514\u2500\u2500 test_all_endpoints.py # Endpoint tests\n\u2502\n\u251c\u2500\u2500 docs/\n\u2502 \u251c\u2500\u2500 index.md # Quick start\n\u2502 \u251c\u2500\u2500 api-reference.md # API docs\n\u2502 \u251c\u2500\u2500 RELEASE.md # Release guide\n\u2502 \u2514\u2500\u2500 ARCHITECTURE.md # This file\n\u2502\n\u251c\u2500\u2500 .github/workflows/\n\u2502 \u2514\u2500\u2500 ci.yml # CI/CD pipeline\n\u2502\n\u251c\u2500\u2500 pyproject.toml # Project config\n\u251c\u2500\u2500 uv.lock # Dependencies lock\n\u2514\u2500\u2500 README.md # Main documentation\n"},{"location":"ARCHITECTURE/#_4","title":"\ud83d\udd11 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b","text":""},{"location":"ARCHITECTURE/#1-kworkclient","title":"1. KworkClient","text":"\u041e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 API
\u0424\u0443\u043d\u043a\u0446\u0438\u0438: - \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f (login / token) - \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0435\u0439 - \u0414\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 API \u0433\u0440\u0443\u043f\u043f\u0430\u043c
API Groups:
client.catalog # CatalogAPI\nclient.projects # ProjectsAPI\nclient.user # UserAPI\nclient.reference # ReferenceAPI\nclient.notifications # NotificationsAPI\nclient.other # OtherAPI\n"},{"location":"ARCHITECTURE/#2-models-pydantic","title":"2. Models (Pydantic)","text":"\u041e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0438 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API
\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: - User models: KworkUser, AuthResponse - Kwork models: Kwork, KworkDetails, KworkCategory - Project models: Project, ProjectsResponse - Review models: Review, ReviewsResponse - Notification models: Notification, Dialog - Reference models: City, Country, TimeZone, Feature, Badge - Error models: ErrorDetail, APIErrorResponse
"},{"location":"ARCHITECTURE/#3-errors","title":"3. Errors","text":"\u041e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a API
\u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f:
KworkError (base)\n\u251c\u2500\u2500 KworkAuthError # 401, 403\n\u251c\u2500\u2500 KworkApiError # 4xx, 5xx\n\u2502 \u251c\u2500\u2500 KworkNotFoundError # 404\n\u2502 \u251c\u2500\u2500 KworkRateLimitError # 429\n\u2502 \u2514\u2500\u2500 KworkValidationError # 400\n\u2514\u2500\u2500 KworkNetworkError # Network issues\n"},{"location":"ARCHITECTURE/#4-http-layer-httpx","title":"4. HTTP Layer (httpx)","text":"\u041e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c: HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b
\u0424\u0443\u043d\u043a\u0446\u0438\u0438: - HTTP/2 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 - \u0422\u0430\u0439\u043c\u0430\u0443\u0442\u044b - Cookies management - Token authentication - Error handling
"},{"location":"ARCHITECTURE/#flow","title":"\ud83d\udd04 Flow: \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f","text":"User \u2192 KworkClient.login(username, password)\n \u2502\n \u25bc\n POST /signIn (cookies)\n \u2502\n \u25bc\n POST /getWebAuthToken (token)\n \u2502\n \u25bc\n Store token + cookies\n \u2502\n \u25bc\n Return authenticated client\n"},{"location":"ARCHITECTURE/#flow-api-request","title":"\ud83d\udd04 Flow: API Request","text":"User \u2192 client.catalog.get_list(page=1)\n \u2502\n \u25bc\n CatalogAPI.get_list()\n \u2502\n \u25bc\n KworkClient._request()\n \u2502\n \u25bc\n httpx.AsyncClient.post()\n \u2502\n \u25bc\n KworkClient._handle_response()\n \u2502\n \u25bc\n CatalogResponse.model_validate()\n \u2502\n \u25bc\n Return typed response\n"},{"location":"ARCHITECTURE/#cicd-pipeline","title":"\ud83d\ude80 CI/CD Pipeline","text":"Push/Tag \u2192 GitHub Actions\n \u2502\n \u251c\u2500\u2500 Test Job\n \u2502 \u251c\u2500\u2500 Install UV + Python\n \u2502 \u251c\u2500\u2500 Run linters (ruff)\n \u2502 \u251c\u2500\u2500 Run tests (pytest)\n \u2502 \u2514\u2500\u2500 Upload coverage\n \u2502\n \u251c\u2500\u2500 Build Job\n \u2502 \u251c\u2500\u2500 Build wheel + sdist\n \u2502 \u2514\u2500\u2500 Upload artifacts\n \u2502\n \u251c\u2500\u2500 Publish Job (on tag)\n \u2502 \u251c\u2500\u2500 Download artifacts\n \u2502 \u2514\u2500\u2500 Publish to Gitea Registry\n \u2502\n \u2514\u2500\u2500 Docs Job\n \u251c\u2500\u2500 Build MkDocs\n \u2514\u2500\u2500 Upload site\n"},{"location":"ARCHITECTURE/#_5","title":"\ud83d\udcca \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438","text":""},{"location":"ARCHITECTURE/#runtime","title":"Runtime","text":"httpx[http2]>=0.26.0 \u2014 HTTP clientpydantic>=2.0.0 \u2014 Data validationstructlog>=24.0.0 \u2014 Loggingpytest>=8.0.0 \u2014 Testingpytest-cov>=4.0.0 \u2014 Coveragepytest-asyncio>=0.23.0 \u2014 Async testsrespx>=0.20.0 \u2014 HTTP mockingruff>=0.3.0 \u2014 Lintingmkdocs + mkdocstrings \u2014 DocumentationMIT License \u2014 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u0430.
"},{"location":"GITEA_PAGES/","title":"Gitea Pages \u2014 \u0425\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438","text":""},{"location":"GITEA_PAGES/#_1","title":"\ud83d\udccb \u041e\u0431\u0437\u043e\u0440","text":"Gitea Pages \u2014 \u0430\u043d\u0430\u043b\u043e\u0433 GitHub Pages \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 Gitea.
URL \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438: https://git.much-data.ru/claw/kwork-api/
gh-pages branch/ (root)write:repositorywrite:packageGITEA_TOKEN = \u0442\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043dcd /root/kwork-api\n\n# \u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e\nuv run mkdocs build\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e site/ \u0441\u043e\u0437\u0434\u0430\u043d\nls -la site/\n\n# \u0417\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c\ngit add .\ngit commit -m \"docs: initial documentation\"\ngit push origin main\n\n# CI/CD \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442 \u043d\u0430 gh-pages\n"},{"location":"GITEA_PAGES/#4","title":"\u0428\u0430\u0433 4: \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c","text":"\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e CI/CD:
\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430:
https://git.much-data.ru/claw/kwork-api/\n \u0418\u043b\u0438 \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0451\u043d custom domain:
https://kwork-api.much-data.ru/\n"},{"location":"GITEA_PAGES/#_3","title":"\ud83d\udd04 \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0419 \u0414\u0415\u041f\u041b\u041e\u0419","text":"Workflow \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438: - \u2705 Push \u0432 main \u0432\u0435\u0442\u043a\u0443 - \u2705 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0435\u0433\u0430 \u0440\u0435\u043b\u0438\u0437\u0430
\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442: 1. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442 MkDocs \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e 2. \u041f\u0443\u0448\u0438\u0442 \u0432 gh-pages \u0432\u0435\u0442\u043a\u0443 3. Gitea Pages \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u0430\u0439\u0442
# \u0412 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043c\u0435\u043d\u043e\u043c much-data.ru\n\n# CNAME \u0437\u0430\u043f\u0438\u0441\u044c:\nkwork-api CNAME git.much-data.ru\n\n# \u0418\u043b\u0438 A \u0437\u0430\u043f\u0438\u0441\u044c:\nkwork-api A 5.188.26.192\n"},{"location":"GITEA_PAGES/#gitea-pages_1","title":"\u0412 Gitea Pages:","text":"kwork-api.much-data.ru# \u0412 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043d\u0435 \u0432 site/)\necho \"kwork-api.much-data.ru\" > static/CNAME\ngit add static/CNAME\ngit commit -m \"docs: add custom domain\"\ngit push\n"},{"location":"GITEA_PAGES/#_4","title":"\ud83d\udcca \u0421\u0422\u0420\u0423\u041a\u0422\u0423\u0420\u0410 \u0412\u0415\u0422\u041a\u0418","text":"main (\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434)\n\u251c\u2500\u2500 src/\n\u251c\u2500\u2500 docs/\n\u251c\u2500\u2500 mkdocs.yml\n\u2514\u2500\u2500 .github/workflows/ci.yml\n\ngh-pages (\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u0439\u0442)\n\u251c\u2500\u2500 index.html\n\u251c\u2500\u2500 api-reference/\n\u251c\u2500\u2500 search/\n\u2514\u2500\u2500 ...\n"},{"location":"GITEA_PAGES/#troubleshooting","title":"\ud83d\udd0d TROUBLESHOOTING","text":""},{"location":"GITEA_PAGES/#pages","title":"Pages \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f:","text":"# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e Gitea \u0432\u0435\u0440\u0441\u0438\u044f >= 1.19\n# \u0410\u0434\u043c\u0438\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c Pages \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\n"},{"location":"GITEA_PAGES/#cicd","title":"CI/CD \u043e\u0448\u0438\u0431\u043a\u0430 \u0434\u0435\u043f\u043b\u043e\u044f:","text":"# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d\n# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0442\u043e\u043a\u0435\u043d\u0430 (write:repository)\n# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e gh-pages \u0432\u0435\u0442\u043a\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\n"},{"location":"GITEA_PAGES/#404","title":"404 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435:","text":"# \u041f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c 1-2 \u043c\u0438\u043d\u0443\u0442\u044b (Gitea \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442)\n# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e site/ \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439\n# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c workflow \u043b\u043e\u0433\u0438\n"},{"location":"GITEA_PAGES/#_5","title":"\ud83d\udccb \u0427\u0415\u041a\u041b\u0418\u0421\u0422","text":"GITEA_TOKEN)\u0415\u0441\u043b\u0438 Gitea Pages \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:
"},{"location":"GITEA_PAGES/#1-netlify","title":"1. Netlify (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e)","text":"# \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439\n# Build command: uv run mkdocs build\n# Publish directory: site/\n"},{"location":"GITEA_PAGES/#2-vercel","title":"2. Vercel (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e)","text":"# \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e Netlify\n# \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0438\u0437 Git\n"},{"location":"GITEA_PAGES/#3-cloudflare-pages","title":"3. Cloudflare Pages (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e)","text":"# \u0411\u044b\u0441\u0442\u0440\u044b\u0439 CDN\n# \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 HTTPS\n"},{"location":"GITEA_PAGES/#4-nginx","title":"4. \u0421\u0432\u043e\u0451 \u0441\u0435\u0440\u0432\u0435\u0440 (nginx)","text":"# \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c site/ \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\n# \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c nginx \u043d\u0430 /var/www/kwork-api-docs/\n"},{"location":"GITEA_PAGES/#_7","title":"\ud83d\udcde \u0421\u0421\u042b\u041b\u041a\u0418","text":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c SemVer (Semantic Versioning): MAJOR.MINOR.PATCH
# \u0423\u0431\u0435\u0434\u0438\u0441\u044c \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442\nuv run pytest\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044c \u043b\u0438\u043d\u0442\u0435\u0440\u044b\nuv run ruff check src/ tests/\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044c \u0441\u0431\u043e\u0440\u043a\u0443\nuv build\n"},{"location":"RELEASE/#2","title":"2. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438","text":"# \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0432 pyproject.toml\n# \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: 0.1.0 \u2192 0.1.1\n\n# \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0435\u0433\ngit tag -a v0.1.1 -m \"Release v0.1.1\"\n\n# \u041e\u0442\u043f\u0443\u0448\u0438\u0442\u044c \u0442\u0435\u0433\ngit push origin v0.1.1\n"},{"location":"RELEASE/#3","title":"3. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f","text":"\u041f\u043e\u0441\u043b\u0435 \u043f\u0443\u0448\u0430 \u0442\u0435\u0433\u0430: 1. \u2705 \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f CI/CD pipeline 2. \u2705 \u041f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u044b 3. \u2705 \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 4. \u2705 \u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u0432 Gitea Registry
"},{"location":"RELEASE/#gitea-package-registry","title":"\ud83d\udce6 Gitea Package Registry","text":"URL: https://git.much-data.ru/api/packages/claw/pypi
\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430:
# \u0421\u043e\u0437\u0434\u0430\u0442\u044c .pypirc \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438\ncat > ~/.pypirc << EOF\n[pypi]\nusername = claw\npassword = YOUR_GITEA_TOKEN\n\n[git.much-data.ru]\nrepository = https://git.much-data.ru/api/packages/claw/pypi\nusername = claw\npassword = YOUR_GITEA_TOKEN\nEOF\n\n# \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0437 Gitea\nuv pip install kwork-api --index-url https://git.much-data.ru/api/packages/claw/pypi\n"},{"location":"RELEASE/#gitea-token","title":"\ud83d\udd11 \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 Gitea Token","text":"write:packageGITEA_TOKEN\u0412\u0435\u0434\u0451\u0442\u0441\u044f \u0432 CHANGELOG.md \u043f\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0443 Keep a Changelog.
## [0.1.1] - 2026-03-23\n\n### Fixed\n- \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0442\u043e\u043a\u0435\u043d\u0430\n\n### Changed\n- \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438\n\n## [0.1.0] - 2026-03-23\n\n### Added\n- \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437\n- \u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\n- \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f 100%\n"},{"location":"RELEASE/#_4","title":"\u2705 \u0427\u0435\u043a\u043b\u0438\u0441\u0442 \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043b\u0438\u0437\u043e\u043c","text":"# \u0421\u043e\u0431\u0440\u0430\u0442\u044c\nuv build\n\n# \u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c\nuv publish \\\n --publish-url https://git.much-data.ru/api/packages/claw/pypi \\\n --token YOUR_GITEA_TOKEN\n"},{"location":"SEMANTIC_RELEASE/","title":"Semantic Release \u2014 \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","text":""},{"location":"SEMANTIC_RELEASE/#_1","title":"\ud83d\udccb \u041e\u0431\u0437\u043e\u0440","text":"python-semantic-release \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Conventional Commits.
\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:
Commit \u2192 \u0410\u043d\u0430\u043b\u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u2192 \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u2192 Bump \u0432\u0435\u0440\u0441\u0438\u0438 \u2192 \u0422\u0435\u0433 \u2192 \u0420\u0435\u043b\u0438\u0437\n"},{"location":"SEMANTIC_RELEASE/#conventional-commits","title":"\ud83c\udfaf CONVENTIONAL COMMITS","text":""},{"location":"SEMANTIC_RELEASE/#_2","title":"\u0424\u043e\u0440\u043c\u0430\u0442 \u043a\u043e\u043c\u043c\u0438\u0442\u0430:","text":"<type>(<scope>): <description>\n\n[optional body]\n\n[optional footer]\n"},{"location":"SEMANTIC_RELEASE/#_3","title":"\u0422\u0438\u043f\u044b \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e:","text":"\u0422\u0438\u043f \u0412\u043b\u0438\u044f\u043d\u0438\u0435 \u041f\u0440\u0438\u043c\u0435\u0440 \u0412\u0435\u0440\u0441\u0438\u044f feat MINOR feat: add new API endpoint 0.1.0 \u2192 0.2.0 fix PATCH fix: handle timeout errors 0.1.0 \u2192 0.1.1 perf PATCH perf: optimize HTTP requests 0.1.0 \u2192 0.1.1 feat + BREAKING MAJOR feat: change auth method 0.1.0 \u2192 1.0.0 docs, style, refactor, test, chore, ci, build \u041d\u0435\u0442 docs: update README \u0411\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439"},{"location":"SEMANTIC_RELEASE/#_4","title":"\ud83d\udcdd \u041f\u0420\u0418\u041c\u0415\u0420\u042b \u041a\u041e\u041c\u041c\u0418\u0422\u041e\u0412","text":""},{"location":"SEMANTIC_RELEASE/#patch","title":"PATCH (\u0431\u0430\u0433\u0444\u0438\u043a\u0441\u044b):","text":"git commit -m \"fix: handle 404 error in catalog API\"\ngit commit -m \"fix(auth): restore session from token correctly\"\ngit commit -m \"perf: reduce HTTP connection overhead\"\n"},{"location":"SEMANTIC_RELEASE/#minor","title":"MINOR (\u043d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c):","text":"git commit -m \"feat: add batch kwork details endpoint\"\ngit commit -m \"feat(projects): add get_payer_orders method\"\ngit commit -m \"feat: support HTTP/2 for faster requests\"\n"},{"location":"SEMANTIC_RELEASE/#major","title":"MAJOR (\u043b\u043e\u043c\u0430\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f):","text":"git commit -m \"feat: redesign authentication flow\n\nBREAKING CHANGE: login() now returns KworkClient instead of tuple\n\nMigration:\n Before: token, cookies = await login(user, pass)\n After: client = await KworkClient.login(user, pass)\n\"\n"},{"location":"SEMANTIC_RELEASE/#_5","title":"\u0411\u0435\u0437 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e:","text":"git commit -m \"docs: add usage examples to README\"\ngit commit -m \"test: increase coverage to 95%\"\ngit commit -m \"style: fix formatting with ruff\"\ngit commit -m \"refactor: simplify error handling\"\ngit commit -m \"chore: update dependencies\"\ngit commit -m \"ci: add Gitea Actions workflow\"\ngit commit -m \"build: configure UV build system\"\n"},{"location":"SEMANTIC_RELEASE/#workflow","title":"\ud83d\udd04 WORKFLOW","text":""},{"location":"SEMANTIC_RELEASE/#_6","title":"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430:","text":"# \u0414\u0435\u043b\u0430\u0439 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u043e Conventional Commits\ngit commit -m \"feat: add new endpoint\"\ngit commit -m \"fix: handle edge case\"\ngit commit -m \"docs: update documentation\"\n\n# \u041f\u0443\u0448 \u0432 main\ngit push origin main\n"},{"location":"SEMANTIC_RELEASE/#cicd","title":"CI/CD (\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438):","text":"1. \u0422\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f\n2. \u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430\n3. Semantic Release \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442\u044b\n4. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f \u0432\u0435\u0440\u0441\u0438\u0438 (MAJOR/MINOR/PATCH)\n5. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0432 pyproject.toml \u0438 __init__.py\n6. \u0421\u043e\u0437\u0434\u0430\u0451\u0442 Git \u0442\u0435\u0433\n7. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 CHANGELOG\n8. \u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u0440\u0435\u043b\u0438\u0437 \u0432 Gitea\n9. \u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 \u0432 Gitea Registry\n"},{"location":"SEMANTIC_RELEASE/#_7","title":"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:","text":"\u2705 v0.1.1 \u0441\u043e\u0437\u0434\u0430\u043d\n\u2705 CHANGELOG.md \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\n\u2705 \u041f\u0430\u043a\u0435\u0442 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\n\u2705 \u0420\u0435\u043b\u0438\u0437 \u0432 Gitea \u0441\u043e\u0437\u0434\u0430\u043d\n"},{"location":"SEMANTIC_RELEASE/#_8","title":"\ud83d\udd27 \u0420\u0423\u0427\u041d\u041e\u0415 \u0423\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u0418\u0415","text":""},{"location":"SEMANTIC_RELEASE/#_9","title":"\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e:","text":"cd /root/kwork-api\nuv run semantic-release version --print\n"},{"location":"SEMANTIC_RELEASE/#changelog","title":"\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c CHANGELOG:","text":"uv run semantic-release changelog\n"},{"location":"SEMANTIC_RELEASE/#_10","title":"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u043b\u0438\u0437 \u0432\u0440\u0443\u0447\u043d\u0443\u044e:","text":"# Bump \u0432\u0435\u0440\u0441\u0438\u0438\nuv run semantic-release version --no-push\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c\ngit diff\n\n# \u0417\u0430\u043f\u0443\u0448\u0438\u0442\u044c\ngit push origin main --tags\n"},{"location":"SEMANTIC_RELEASE/#_11","title":"\ud83d\udcca \u041f\u0420\u0418\u041c\u0415\u0420 \u0418\u0421\u0422\u041e\u0420\u0418\u0418 \u0412\u0415\u0420\u0421\u0418\u0419","text":"v0.1.0 (2026-03-23)\n - Initial release\n - Complete API client\n - 100% documentation\n\nv0.1.1 (2026-03-24)\n - fix: handle timeout errors\n - fix: restore session correctly\n\nv0.2.0 (2026-03-25)\n - feat: add batch endpoint\n - feat: support HTTP/2\n\nv0.2.1 (2026-03-26)\n - perf: optimize requests\n\nv1.0.0 (2026-03-27)\n - feat: new authentication\n - BREAKING CHANGE: API changed\n"},{"location":"SEMANTIC_RELEASE/#_12","title":"\u2699\ufe0f \u041a\u041e\u041d\u0424\u0418\u0413\u0423\u0420\u0410\u0426\u0418\u042f","text":"\u0424\u0430\u0439\u043b: pyproject.toml
[tool.semantic_release]\nversion_toml = [\"pyproject.toml:project.version\"]\nversion_variables = [\"src/kwork_api/__init__.py:__version__\"]\nbranch = \"main\"\nbuild_command = \"uv build\"\ncommit_parser = \"angular\"\ntag_format = \"v{version}\"\n\n[tool.semantic_release.commit_parser_options]\nminor_tags = [\"feat\"]\npatch_tags = [\"fix\", \"perf\"]\nbreaking_change_tags = [\"feat\"]\n\n[tool.semantic_release.remote]\ntype = \"gitea\"\ndomain = \"https://git.much-data.ru\"\nowner = \"claw\"\nrepo_name = \"kwork-api\"\n"},{"location":"SEMANTIC_RELEASE/#troubleshooting","title":"\ud83d\udea8 TROUBLESHOOTING","text":""},{"location":"SEMANTIC_RELEASE/#no-commits-to-release","title":"\u041e\u0448\u0438\u0431\u043a\u0430: \"No commits to release\"","text":"# \u0417\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438 feat/fix/perf\n# \u0421\u0434\u0435\u043b\u0430\u0439 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c\ngit commit -m \"feat: add something new\"\n"},{"location":"SEMANTIC_RELEASE/#gitea-token-invalid","title":"\u041e\u0448\u0438\u0431\u043a\u0430: \"Gitea token invalid\"","text":"# \u041f\u0440\u043e\u0432\u0435\u0440\u044c \u0442\u043e\u043a\u0435\u043d\n# Settings \u2192 Applications \u2192 Create new token\n# \u041f\u0440\u0430\u0432\u0430: write:repository, write:package\n# \u041e\u0431\u043d\u043e\u0432\u0438 \u0441\u0435\u043a\u0440\u0435\u0442 \u0432 Gitea Actions\n"},{"location":"SEMANTIC_RELEASE/#_13","title":"\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f","text":"# \u041f\u0440\u043e\u0432\u0435\u0440\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e\nuv run semantic-release --version\n\n# \u041f\u0440\u043e\u0432\u0435\u0440\u044c \u0447\u0442\u043e __version__ \u0435\u0441\u0442\u044c \u0432 __init__.py\ngrep \"__version__\" src/kwork_api/__init__.py\n"},{"location":"SEMANTIC_RELEASE/#_14","title":"\ud83d\udccb \u0427\u0415\u041a\u041b\u0418\u0421\u0422 \u041f\u0415\u0420\u0415\u0414 \u041f\u0423\u0428\u0415\u041c","text":"# \u0410\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b\ngit commit -m \"feat: add user endpoint\"\ngit commit -m \"fix: handle 404 error\"\n\n# \u041f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\ngit commit -m \"fix: restore session from saved token\"\n\n# Scope \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439\ngit commit -m \"feat(auth): add OAuth2 support\"\n"},{"location":"SEMANTIC_RELEASE/#_16","title":"\u274c \u041d\u0435 \u0434\u0435\u043b\u0430\u0439:","text":"# \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u0431\u0449\u0438\u0435\ngit commit -m \"fix stuff\"\n\n# \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c\ngit commit -m \"feat: add user endpoint and fix auth and update docs\"\n\n# \u041d\u0435 \u043f\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0443\ngit commit -m \"added new feature\"\n"},{"location":"SEMANTIC_RELEASE/#_17","title":"\ud83d\udcde \u0421\u0421\u042b\u041b\u041a\u0418","text":"Complete API documentation for Kwork API client.
"},{"location":"api-reference/#modules","title":"Modules","text":"KworkClient(\n token=None, cookies=None, timeout=30.0, base_url=None\n)\n \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f Kwork.ru API.
\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c Kwork API: - \u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 \u043f\u043e\u0438\u0441\u043a - \u0411\u0438\u0440\u0436\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (\u0444\u0440\u0438\u043b\u0430\u043d\u0441 \u0437\u0430\u043a\u0430\u0437\u044b) - \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u0437\u044b\u0432\u044b - \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f - \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0433\u043e\u0440\u043e\u0434\u0430, \u0441\u0442\u0440\u0430\u043d\u044b, \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438)
\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u041a\u043b\u0438\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e Kwork: 1. POST /signIn \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 session cookies 2. POST /getWebAuthToken \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 web_auth_token
\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044fAttributes:
Name Type Descriptioncatalog CatalogAPI \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u043a\u0432\u043e\u0440\u043a\u043e\u0432
projects ProjectsAPI \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0438\u0440\u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432
user UserAPI \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b
reference ReferenceAPI \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435
notifications NotificationsAPI \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f
other OtherAPI \u041f\u0440\u043e\u0447\u0438\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b
Note\u041a\u043b\u0438\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 context manager \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c async with \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.
\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430.
\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u0435\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u044e \u043f\u043e \u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u043a\u0435\u043d\u0443.
Parameters:
Name Type Description Defaulttoken Optional[str] Web auth token, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 getWebAuthToken \u0438\u043b\u0438 login(). \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 cookies.
None cookies Optional[dict[str, str]] Session cookies \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437 token.
None timeout float \u0422\u0430\u0439\u043c\u0430\u0443\u0442 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 30 \u0441\u0435\u043a\u0443\u043d\u0434.
30.0 base_url Optional[str] \u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 URL. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.
None Example Note \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b API \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 login() \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 token.
src/kwork_api/client.py def __init__(\n self,\n token: Optional[str] = None,\n cookies: Optional[dict[str, str]] = None,\n timeout: float = 30.0,\n base_url: Optional[str] = None,\n):\n \"\"\"\n \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430.\n\n \u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u0435\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0441\u0441\u0438\u044e\n \u043f\u043e \u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u043a\u0435\u043d\u0443.\n\n Args:\n token: Web auth token, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 `getWebAuthToken` \u0438\u043b\u0438 `login()`.\n \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 cookies.\n cookies: Session cookies \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.\n \u041e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u2014 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437 token.\n timeout: \u0422\u0430\u0439\u043c\u0430\u0443\u0442 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 30 \u0441\u0435\u043a\u0443\u043d\u0434.\n base_url: \u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 URL. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\n\n Example:\n # \u041d\u043e\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0435\u0437 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438\n client = KworkClient()\n\n # \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438\n client = KworkClient(token=\"eyJ0eXAiOiJKV1QiLCJhbGc...\")\n\n # \u041a\u043b\u0438\u0435\u043d\u0442 \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c\n client = KworkClient(timeout=60.0)\n\n Note:\n \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b API \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f.\n \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 `login()` \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 token.\n \"\"\"\n self.base_url = base_url or self.BASE_URL\n self.timeout = timeout\n self._token = token\n self._cookies = cookies or {}\n\n # Initialize HTTP client\n self._client: Optional[httpx.AsyncClient] = None\n"},{"location":"api/client/#kwork_api.client.KworkClient--_1","title":"\u0412\u0445\u043e\u0434 \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443/\u043f\u0430\u0440\u043e\u043b\u044e","text":"async with await KworkClient.login(\"username\", \"password\") as client: catalog = await client.catalog.get_list(page=1)
"},{"location":"api/client/#kwork_api.client.KworkClient--_2","title":"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0443","text":"client = KworkClient(token=\"saved_web_auth_token\") user_info = await client.user.get_info()
"},{"location":"api/client/#kwork_api.client.KworkClient--_3","title":"\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438","text":"projects = await client.projects.get_list(page=1) my_orders = await client.projects.get_payer_orders()
"},{"location":"api/client/#kwork_api.client.KworkClient--_1","title":"\u041d\u043e\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0435\u0437 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438","text":"client = KworkClient()
"},{"location":"api/client/#kwork_api.client.KworkClient--_2","title":"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","text":"client = KworkClient(token=\"eyJ0eXAiOiJKV1QiLCJhbGc...\")
"},{"location":"api/client/#kwork_api.client.KworkClient--_3","title":"\u041a\u043b\u0438\u0435\u043d\u0442 \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c","text":"client = KworkClient(timeout=60.0)
"},{"location":"api/client/#kwork_api.client.KworkClient-attributes","title":"Attributes","text":""},{"location":"api/client/#kwork_api.client.KworkClient.catalog","title":"catalogproperty","text":"catalog\n API \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
"},{"location":"api/client/#kwork_api.client.KworkClient.cookies","title":"cookiesproperty","text":"cookies\n Session cookies.
Returns:
Type Descriptiondict[str, str] \u0421\u043b\u043e\u0432\u0430\u0440\u044c cookies \u0432\u043a\u043b\u044e\u0447\u0430\u044f web_auth_token.
Example"},{"location":"api/client/#kwork_api.client.KworkClient.cookies--_1","title":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438","text":"client = await KworkClient.login(\"user\", \"pass\") creds = client.credentials
"},{"location":"api/client/#kwork_api.client.KworkClient.cookies--_2","title":"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435","text":"client = KworkClient(**creds)
"},{"location":"api/client/#kwork_api.client.KworkClient.credentials","title":"credentialsproperty","text":"credentials\n \u0423\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438.
Returns:
Type Descriptiondict[str, Optional[str]] \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 token \u0438 cookies \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432 KworkClient().
Example"},{"location":"api/client/#kwork_api.client.KworkClient.credentials--_1","title":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435","text":"client = await KworkClient.login(\"user\", \"pass\") import json with open(\"session.json\", \"w\") as f: json.dump(client.credentials, f)
"},{"location":"api/client/#kwork_api.client.KworkClient.credentials--_2","title":"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435","text":"with open(\"session.json\") as f: creds = json.load(f) client = KworkClient(**creds)
"},{"location":"api/client/#kwork_api.client.KworkClient.notifications","title":"notificationsproperty","text":"notifications\n API \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.
"},{"location":"api/client/#kwork_api.client.KworkClient.other","title":"otherproperty","text":"other\n \u041f\u0440\u043e\u0447\u0435\u0435 API.
"},{"location":"api/client/#kwork_api.client.KworkClient.projects","title":"projectsproperty","text":"projects\n API \u0431\u0438\u0440\u0436\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.
"},{"location":"api/client/#kwork_api.client.KworkClient.reference","title":"referenceproperty","text":"reference\n \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u043e\u0435 API.
"},{"location":"api/client/#kwork_api.client.KworkClient.token","title":"tokenproperty","text":"token\n Web auth token \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.
Returns:
Type DescriptionOptional[str] \u0422\u043e\u043a\u0435\u043d \u0438\u043b\u0438 None \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d.
Example"},{"location":"api/client/#kwork_api.client.KworkClient.token--_1","title":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f","text":"client = await KworkClient.login(\"user\", \"pass\") token = client.token
"},{"location":"api/client/#kwork_api.client.KworkClient.token--_2","title":"\u041f\u043e\u0437\u0436\u0435: \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438","text":"client = KworkClient(token=token)
"},{"location":"api/client/#kwork_api.client.KworkClient.user","title":"userproperty","text":"user\n \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 API.
"},{"location":"api/client/#kwork_api.client.KworkClient-classes","title":"Classes","text":""},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI","title":"CatalogAPI","text":"CatalogAPI(client)\n API \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0443\u0441\u043b\u0443\u0433 Kwork: - \u041f\u043e\u0438\u0441\u043a \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043a\u0432\u043e\u0440\u043a\u043e\u0432 - \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 - \u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430
Example Source code insrc/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI--_1","title":"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430","text":"catalog = await client.catalog.get_list(page=1)
"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI--_2","title":"\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438","text":"catalog = await client.catalog.get_list(category_id=5)
"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI--_3","title":"\u0414\u0435\u0442\u0430\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u043e\u0440\u043a\u0430","text":"details = await client.catalog.get_details(kwork_id=12345)
"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI.get_details","title":"get_detailsasync","text":"get_details(kwork_id)\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0432\u043e\u0440\u043a\u0435.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0432\u043e\u0440\u043a\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044f: - \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f - \u0421\u0440\u043e\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u043e\u043a - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 (features) - FAQ \u043e\u0442 \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u0430
Parameters:
Name Type Description Defaultkwork_id int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0432\u043e\u0440\u043a\u0430.
requiredReturns:
Type DescriptionKworkDetails KworkDetails \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043a\u0432\u043e\u0440\u043a\u0435.
Raises:
Type DescriptionKworkNotFoundError \u0415\u0441\u043b\u0438 \u043a\u0432\u043e\u0440\u043a \u0441 \u0442\u0430\u043a\u0438\u043c ID \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.
Exampledetails = await client.catalog.get_details(12345) print(f\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: {details.title}\") print(f\"\u0426\u0435\u043d\u0430: {details.price} {details.currency}\") print(f\"\u0421\u0440\u043e\u043a: {details.delivery_time} \u0434\u043d\u0435\u0439\") print(f\"\u041f\u0440\u0430\u0432\u043a\u0438: {details.revisions}\")
Source code insrc/kwork_api/client.py async def get_details(self, kwork_id: int) -> KworkDetails:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0432\u043e\u0440\u043a\u0435.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0432\u043e\u0440\u043a\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044f:\n - \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\n - \u0421\u0440\u043e\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0430\u0432\u043e\u043a\n - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 (features)\n - FAQ \u043e\u0442 \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u0430\n\n Args:\n kwork_id: \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0432\u043e\u0440\u043a\u0430.\n\n Returns:\n KworkDetails \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043a\u0432\u043e\u0440\u043a\u0435.\n\n Raises:\n KworkNotFoundError: \u0415\u0441\u043b\u0438 \u043a\u0432\u043e\u0440\u043a \u0441 \u0442\u0430\u043a\u0438\u043c ID \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.\n\n Example:\n details = await client.catalog.get_details(12345)\n print(f\"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435: {details.title}\")\n print(f\"\u0426\u0435\u043d\u0430: {details.price} {details.currency}\")\n print(f\"\u0421\u0440\u043e\u043a: {details.delivery_time} \u0434\u043d\u0435\u0439\")\n print(f\"\u041f\u0440\u0430\u0432\u043a\u0438: {details.revisions}\")\n \"\"\"\n data = await self.client._request(\n \"POST\",\n \"/getKworkDetails\",\n json={\"kwork_id\": kwork_id},\n )\n return KworkDetails.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI.get_details_extra","title":"get_details_extra async","text":"get_details_extra(kwork_id)\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043a\u0432\u043e\u0440\u043a\u0430.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 get_details(). \u041c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c: - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f - \u0412\u0438\u0434\u0435\u043e \u043e\u0431\u0437\u043e\u0440\u044b - \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0443\u0441\u043b\u0443\u0433 - \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u0440\u043e\u0434\u0430\u0436
Parameters:
Name Type Description Defaultkwork_id int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0432\u043e\u0440\u043a\u0430.
requiredReturns:
Type Descriptiondict[str, Any] \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442
dict[str, Any] \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u043e\u0440\u043a\u0430 \u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439.
Note\u042d\u0442\u043e\u0442 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \"\u0441\u044b\u0440\u044b\u0435\" \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.
Source code insrc/kwork_api/client.py async def get_details_extra(self, kwork_id: int) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043a\u0432\u043e\u0440\u043a\u0430.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430\n \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 get_details(). \u041c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c:\n - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\n - \u0412\u0438\u0434\u0435\u043e \u043e\u0431\u0437\u043e\u0440\u044b\n - \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0443\u0441\u043b\u0443\u0433\n - \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u0440\u043e\u0434\u0430\u0436\n\n Args:\n kwork_id: \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0432\u043e\u0440\u043a\u0430.\n\n Returns:\n \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442\n \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u0432\u043e\u0440\u043a\u0430 \u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439.\n\n Note:\n \u042d\u0442\u043e\u0442 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \"\u0441\u044b\u0440\u044b\u0435\" \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438.\n \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.\n \"\"\"\n return await self.client._request(\n \"POST\",\n \"/getKworkDetailsExtra\",\n json={\"kwork_id\": kwork_id},\n )\n"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI.get_list","title":"get_list async","text":"get_list(page=1, category_id=None, sort='recommend')\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.
\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043a\u0432\u043e\u0440\u043a\u043e\u0432. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u0433\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.
Parameters:
Name Type Description Defaultpage int \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438 (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).
1 category_id Optional[int] ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 None \u2014 \u0432\u0441\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.
None sort str \u041e\u043f\u0446\u0438\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b: - \"recommend\" \u2014 \u043f\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) - \"price_asc\" \u2014 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e \u0446\u0435\u043d\u044b - \"price_desc\" \u2014 \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0446\u0435\u043d\u044b - \"rating\" \u2014 \u043f\u043e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0443 - \"reviews\" \u2014 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043e\u0442\u0437\u044b\u0432\u043e\u0432 - \"newest\" \u2014 \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f
'recommend' Returns:
Type DescriptionCatalogResponse CatalogResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:
CatalogResponse CatalogResponse CatalogResponse CatalogResponse src/kwork_api/client.py async def get_list(\n self,\n page: int = 1,\n category_id: Optional[int] = None,\n sort: str = \"recommend\",\n) -> CatalogResponse:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.\n\n \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u0433\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.\n\n Args:\n page: \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438 (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).\n category_id: ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.\n \u0415\u0441\u043b\u0438 None \u2014 \u0432\u0441\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.\n sort: \u041e\u043f\u0446\u0438\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b:\n - \"recommend\" \u2014 \u043f\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)\n - \"price_asc\" \u2014 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e \u0446\u0435\u043d\u044b\n - \"price_desc\" \u2014 \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0446\u0435\u043d\u044b\n - \"rating\" \u2014 \u043f\u043e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0443\n - \"reviews\" \u2014 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043e\u0442\u0437\u044b\u0432\u043e\u0432\n - \"newest\" \u2014 \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\n\n Returns:\n CatalogResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:\n - kworks: \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\n - pagination: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438\n - filters: \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b\n - sort_options: \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438\n\n Example:\n # \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0446\u0435\u043d\u0435\n response = await client.catalog.get_list(\n page=1,\n sort=\"price_asc\"\n )\n\n for kwork in response.kworks:\n print(f\"{kwork.title}: {kwork.price} RUB\")\n\n # \u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f\n if response.pagination and response.pagination.has_next:\n next_page = await client.catalog.get_list(page=2)\n \"\"\"\n data = await self.client._request(\n \"POST\",\n \"/catalogMainv2\",\n json={\n \"page\": page,\n \"category_id\": category_id,\n \"sort\": sort,\n },\n )\n return CatalogResponse.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI.get_list--_1","title":"\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e \u0446\u0435\u043d\u0435","text":"response = await client.catalog.get_list( page=1, sort=\"price_asc\" )
for kwork in response.kworks: print(f\"{kwork.title}: {kwork.price} RUB\")
"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI.get_list--_2","title":"\u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f","text":"if response.pagination and response.pagination.has_next: next_page = await client.catalog.get_list(page=2)
"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI","title":"NotificationsAPI","text":"NotificationsAPI(client)\n API \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.
\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 Kwork: - \u0421\u043f\u0438\u0441\u043e\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 - \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 - \u0414\u0438\u0430\u043b\u043e\u0433\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 - \u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u0438
Example Source code insrc/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI--_1","title":"\u0412\u0441\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f","text":"notifications = await client.notifications.get_list()
"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI--_2","title":"\u041d\u043e\u0432\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f","text":"new = await client.notifications.fetch()
"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI--_3","title":"\u0414\u0438\u0430\u043b\u043e\u0433\u0438","text":"dialogs = await client.notifications.get_dialogs()
"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI.fetch","title":"fetchasync","text":"fetch()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.
\u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 get_list() \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445.
Returns:
Type DescriptionNotificationsResponse NotificationsResponse \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u043c\u0438.
Examplenew_notifs = await client.notifications.fetch() if new_notifs.unread_count > 0: print(f\"\u0423 \u0432\u0430\u0441 {new_notifs.unread_count} \u043d\u043e\u0432\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439!\")
Source code insrc/kwork_api/client.py async def fetch(self) -> NotificationsResponse:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.\n\n \u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 get_list() \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e\n \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.\n \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445.\n\n Returns:\n NotificationsResponse \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u043c\u0438.\n\n Example:\n new_notifs = await client.notifications.fetch()\n if new_notifs.unread_count > 0:\n print(f\"\u0423 \u0432\u0430\u0441 {new_notifs.unread_count} \u043d\u043e\u0432\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439!\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/notificationsFetch\")\n return NotificationsResponse.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI.get_blocked_dialogs","title":"get_blocked_dialogs async","text":"get_blocked_dialogs()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.
Returns:
Type Descriptionlist[Dialog] \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432.
Exampleblocked = await client.notifications.get_blocked_dialogs() print(f\"\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e: {len(blocked)} \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439\")
Source code insrc/kwork_api/client.py async def get_blocked_dialogs(self) -> list[Dialog]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438\n \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432.\n\n Example:\n blocked = await client.notifications.get_blocked_dialogs()\n print(f\"\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e: {len(blocked)} \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/blockedDialogList\")\n return [Dialog.model_validate(d) for d in data.get(\"dialogs\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI.get_dialogs","title":"get_dialogs async","text":"get_dialogs()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432 (\u0447\u0430\u0442\u043e\u0432).
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 Kwork.
Returns:
Type Descriptionlist[Dialog] \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u043e\u0439.
Exampledialogs = await client.notifications.get_dialogs() for d in dialogs: print(f\"\u0421 {d.participant.username}: {d.last_message}\")
Source code insrc/kwork_api/client.py async def get_dialogs(self) -> list[Dialog]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432 (\u0447\u0430\u0442\u043e\u0432).\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0438\u0430\u043b\u043e\u0433\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438\n \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 Kwork.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u043a\u043e\u0439.\n\n Example:\n dialogs = await client.notifications.get_dialogs()\n for d in dialogs:\n print(f\"\u0421 {d.participant.username}: {d.last_message}\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/dialogs\")\n return [Dialog.model_validate(d) for d in data.get(\"dialogs\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI.get_list","title":"get_list async","text":"get_list()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0438.
Returns:
Type DescriptionNotificationsResponse NotificationsResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:
NotificationsResponse NotificationsResponse notifs = await client.notifications.get_list() print(f\"\u041d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445: {notifs.unread_count}\")
for n in notifs.notifications: if not n.is_read: print(f\"\u041d\u043e\u0432\u043e\u0435: {n.title}\")
Source code insrc/kwork_api/client.py async def get_list(self) -> NotificationsResponse:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439\n \u043e \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0438.\n\n Returns:\n NotificationsResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:\n - notifications: \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439\n - unread_count: \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445\n\n Example:\n notifs = await client.notifications.get_list()\n print(f\"\u041d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445: {notifs.unread_count}\")\n\n for n in notifs.notifications:\n if not n.is_read:\n print(f\"\u041d\u043e\u0432\u043e\u0435: {n.title}\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/notifications\")\n return NotificationsResponse.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI","title":"OtherAPI","text":"OtherAPI(client)\n \u041f\u0440\u043e\u0447\u0435\u0435 API.
\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0432\u043e\u0448\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: - \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f (wants) - \u0421\u0442\u0430\u0442\u0443\u0441\u044b \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 - \u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f (offers) - \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f - \u0421\u0442\u0430\u0442\u0443\u0441 \u043e\u043d\u043b\u0430\u0439\u043d/\u043e\u0444\u0444\u043b\u0430\u0439\u043d
Example Source code insrc/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI--_1","title":"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f","text":"wants = await client.other.get_wants()
"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI--_2","title":"\u0421\u0442\u0430\u0442\u0443\u0441 \u043a\u0432\u043e\u0440\u043a\u043e\u0432","text":"status = await client.other.get_kworks_status()
"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI--_3","title":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0444\u0444\u043b\u0430\u0439\u043d","text":"await client.other.go_offline()
"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_actor","title":"get_actorasync","text":"get_actor()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u043a\u0442\u0451\u0440\u0435 (\u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435).
Returns:
Type Descriptiondict[str, Any] \u0414\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u0442\u0451\u0440\u0430/\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
Source code insrc/kwork_api/client.py async def get_actor(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u043a\u0442\u0451\u0440\u0435 (\u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435).\n\n Returns:\n \u0414\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u0442\u0451\u0440\u0430/\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n \"\"\"\n return await self.client._request(\"POST\", \"/actor\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_channel","title":"get_channel async","text":"get_channel()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0430\u043d\u0430\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
Returns:
Type Descriptiondict[str, Any] \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c).
Source code insrc/kwork_api/client.py async def get_channel(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0430\u043d\u0430\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n\n Returns:\n \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c).\n \"\"\"\n return await self.client._request(\"POST\", \"/getChannel\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_exchange_info","title":"get_exchange_info async","text":"get_exchange_info()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u043c\u0435\u043d\u0435 \u0432\u0430\u043b\u044e\u0442\u044b.
Returns:
Type Descriptiondict[str, Any] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u0443\u0440\u0441\u0430\u0445 \u0432\u0430\u043b\u044e\u0442 \u0438 \u043e\u0431\u043c\u0435\u043d\u0435.
Source code insrc/kwork_api/client.py async def get_exchange_info(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u043c\u0435\u043d\u0435 \u0432\u0430\u043b\u044e\u0442\u044b.\n\n Returns:\n \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u0443\u0440\u0441\u0430\u0445 \u0432\u0430\u043b\u044e\u0442 \u0438 \u043e\u0431\u043c\u0435\u043d\u0435.\n \"\"\"\n return await self.client._request(\"POST\", \"/exchangeInfo\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_favorite_categories","title":"get_favorite_categories async","text":"get_favorite_categories()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ID \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439.
Returns:
Type Descriptionlist[int] \u0421\u043f\u0438\u0441\u043e\u043a ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435.
Examplecats = await client.other.get_favorite_categories() print(f\"\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: {cats}\")
Source code insrc/kwork_api/client.py async def get_favorite_categories(self) -> list[int]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ID \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435.\n\n Example:\n cats = await client.other.get_favorite_categories()\n print(f\"\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: {cats}\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/favoriteCategories\")\n return data.get(\"categories\", [])\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_in_app_notification","title":"get_in_app_notification async","text":"get_in_app_notification()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.
Returns:
Type Descriptiondict[str, Any] \u0414\u0430\u043d\u043d\u044b\u0435 in-app \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.
Source code insrc/kwork_api/client.py async def get_in_app_notification(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.\n\n Returns:\n \u0414\u0430\u043d\u043d\u044b\u0435 in-app \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.\n \"\"\"\n return await self.client._request(\"POST\", \"/getInAppNotification\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_kworks_status","title":"get_kworks_status async","text":"get_kworks_status()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u0445 \u0432\u0441\u0435\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438, \u0438 \u0442.\u0434.).
Returns:
Type Descriptiondict[str, Any] \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
Examplestatus = await client.other.get_kworks_status() print(status)
Source code insrc/kwork_api/client.py async def get_kworks_status(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u0445 \u0432\u0441\u0435\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432\n \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438, \u0438 \u0442.\u0434.).\n\n Returns:\n \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.\n\n Example:\n status = await client.other.get_kworks_status()\n print(status)\n \"\"\"\n return await self.client._request(\"POST\", \"/kworksStatusList\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_offers","title":"get_offers async","text":"get_offers()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.
Returns:
Type Descriptiondict[str, Any] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 Kwork.
Source code insrc/kwork_api/client.py async def get_offers(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 Kwork.\n \"\"\"\n return await self.client._request(\"POST\", \"/offers\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_security_user_data","title":"get_security_user_data async","text":"get_security_user_data()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
Returns:
Type Descriptiondict[str, Any] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.
Source code insrc/kwork_api/client.py async def get_security_user_data(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n\n Returns:\n \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.\n \"\"\"\n return await self.client._request(\"POST\", \"/getSecurityUserData\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_viewed_kworks","title":"get_viewed_kworks async","text":"get_viewed_kworks()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u043a\u0432\u043e\u0440\u043a\u0438.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0440\u0430\u043d\u0435\u0435.
Returns:
Type Descriptionlist[Kwork] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
Exampleviewed = await client.other.get_viewed_kworks() print(f\"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e: {len(viewed)} \u043a\u0432\u043e\u0440\u043a\u043e\u0432\")
Source code insrc/kwork_api/client.py async def get_viewed_kworks(self) -> list[Kwork]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0435 \u043a\u0432\u043e\u0440\u043a\u0438.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\n \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0440\u0430\u043d\u0435\u0435.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.\n\n Example:\n viewed = await client.other.get_viewed_kworks()\n print(f\"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e: {len(viewed)} \u043a\u0432\u043e\u0440\u043a\u043e\u0432\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/viewedCatalogKworks\")\n return [Kwork.model_validate(k) for k in data.get(\"kworks\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_wants","title":"get_wants async","text":"get_wants()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f (wants).
Wants \u2014 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: - \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 - \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 - \u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430
Returns:
Type Descriptiondict[str, Any] \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439.
Examplewants = await client.other.get_wants() print(wants)
Source code insrc/kwork_api/client.py async def get_wants(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f (wants).\n\n Wants \u2014 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:\n - \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438\n - \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430\n - \u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430\n\n Returns:\n \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439.\n\n Example:\n wants = await client.other.get_wants()\n print(wants)\n \"\"\"\n return await self.client._request(\"POST\", \"/myWants\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_wants_status","title":"get_wants_status async","text":"get_wants_status()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439.
Returns:
Type Descriptiondict[str, Any] \u0421\u0442\u0430\u0442\u0443\u0441 wants \u0441 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438.
Source code insrc/kwork_api/client.py async def get_wants_status(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439.\n\n Returns:\n \u0421\u0442\u0430\u0442\u0443\u0441 wants \u0441 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438.\n \"\"\"\n return await self.client._request(\"POST\", \"/wantsStatusList\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.go_offline","title":"go_offline async","text":"go_offline()\n \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \"\u043e\u0444\u0444\u043b\u0430\u0439\u043d\".
\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.
Returns:
Type Descriptiondict[str, Any] \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430.
Exampleawait client.other.go_offline()
Source code insrc/kwork_api/client.py async def go_offline(self) -> dict[str, Any]:\n \"\"\"\n \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \"\u043e\u0444\u0444\u043b\u0430\u0439\u043d\".\n\n \u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.\n\n Returns:\n \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430.\n\n Example:\n await client.other.go_offline()\n \"\"\"\n return await self.client._request(\"POST\", \"/offline\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.is_dialog_allow","title":"is_dialog_allow async","text":"is_dialog_allow(user_id)\n \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.
Parameters:
Name Type Description Defaultuser_id int ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.
requiredReturns:
Type Descriptionbool True \u0435\u0441\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d, False \u0438\u043d\u0430\u0447\u0435.
Exampleallowed = await client.other.is_dialog_allow(12345) if allowed: print(\"\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\")
Source code insrc/kwork_api/client.py async def is_dialog_allow(self, user_id: int) -> bool:\n \"\"\"\n \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0438\u0430\u043b\u043e\u0433\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.\n\n Args:\n user_id: ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.\n\n Returns:\n True \u0435\u0441\u043b\u0438 \u0434\u0438\u0430\u043b\u043e\u0433 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d, False \u0438\u043d\u0430\u0447\u0435.\n\n Example:\n allowed = await client.other.is_dialog_allow(12345)\n if allowed:\n print(\"\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\")\n \"\"\"\n data = await self.client._request(\n \"POST\",\n \"/isDialogAllow\",\n json={\"user_id\": user_id},\n )\n return data.get(\"allowed\", False)\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.update_settings","title":"update_settings async","text":"update_settings(settings)\n \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
Parameters:
Name Type Description Defaultsettings dict[str, Any] \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.
requiredReturns:
Type Descriptiondict[str, Any] \u041e\u0442\u0432\u0435\u0442 API \u0441 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.
Exampleawait client.other.update_settings({ \"email_notifications\": True, \"language\": \"ru\" })
Source code insrc/kwork_api/client.py async def update_settings(self, settings: dict[str, Any]) -> dict[str, Any]:\n \"\"\"\n \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n\n Args:\n settings: \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.\n \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.\n\n Returns:\n \u041e\u0442\u0432\u0435\u0442 API \u0441 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.\n\n Example:\n await client.other.update_settings({\n \"email_notifications\": True,\n \"language\": \"ru\"\n })\n \"\"\"\n return await self.client._request(\"POST\", \"/updateSettings\", json=settings)\n"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.validate_text","title":"validate_text async","text":"validate_text(text, context=None)\n \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c Kwork.
\u042d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438: - \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u043a\u0432\u043e\u0440\u043a\u043e\u0432 - \u0422\u0435\u043a\u0441\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 - \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043e\u0442\u0437\u044b\u0432\u043e\u0432
\u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: - \u0417\u0430\u043f\u0440\u0435\u0449\u0451\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b - \u041d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 - \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c
Parameters:
Name Type Description Defaulttext str \u0422\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.
requiredcontext Optional[str] \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \"kwork_description\", \"project_text\", \"message\".
None Returns:
Type DescriptionValidationResponse ValidationResponse \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438.
Exampleresult = await client.other.validate_text( \"\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0437\u0432\u043e\u043d\u0438\u0442\u0435 +7-999-000-00-00\" ) if not result.is_valid: print(\"\u0422\u0435\u043a\u0441\u0442 \u043d\u0435 \u043f\u0440\u043e\u0448\u0451\u043b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e:\") for issue in result.issues: print(f\" - {issue.message}\")
Source code insrc/kwork_api/client.py async def validate_text(self, text: str, context: Optional[str] = None) -> ValidationResponse:\n \"\"\"\n \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c Kwork.\n\n \u042d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:\n - \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u043a\u0432\u043e\u0440\u043a\u043e\u0432\n - \u0422\u0435\u043a\u0441\u0442\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432\n - \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043e\u0442\u0437\u044b\u0432\u043e\u0432\n\n \u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:\n - \u0417\u0430\u043f\u0440\u0435\u0449\u0451\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b\n - \u041d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438\n - \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c\n\n Args:\n text: \u0422\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.\n context: \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e).\n \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \"kwork_description\", \"project_text\", \"message\".\n\n Returns:\n ValidationResponse \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438.\n\n Example:\n result = await client.other.validate_text(\n \"\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0437\u0432\u043e\u043d\u0438\u0442\u0435 +7-999-000-00-00\"\n )\n if not result.is_valid:\n print(\"\u0422\u0435\u043a\u0441\u0442 \u043d\u0435 \u043f\u0440\u043e\u0448\u0451\u043b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e:\")\n for issue in result.issues:\n print(f\" - {issue.message}\")\n \"\"\"\n payload = {\"text\": text}\n if context:\n payload[\"context\"] = context\n\n data = await self.client._request(\n \"POST\",\n \"/api/validation/checktext\",\n json=payload,\n )\n return ValidationResponse.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI","title":"ProjectsAPI","text":"ProjectsAPI(client)\n API \u0431\u0438\u0440\u0436\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (\u0444\u0440\u0438\u043b\u0430\u043d\u0441 \u0437\u0430\u043a\u0430\u0437\u044b).
\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043a\u0430\u0437\u0430\u043c \u043d\u0430 \u0444\u0440\u0438\u043b\u0430\u043d\u0441: - \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 - \u0417\u0430\u043a\u0430\u0437\u044b \u0433\u0434\u0435 \u0432\u044b \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a (payer) - \u0417\u0430\u043a\u0430\u0437\u044b \u0433\u0434\u0435 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c (worker)
Example Source code insrc/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI--_1","title":"\u041d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b","text":"projects = await client.projects.get_list(page=1)
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI--_2","title":"\u041c\u043e\u0438 \u0437\u0430\u043a\u0430\u0437\u044b \u043a\u0430\u043a \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430","text":"my_orders = await client.projects.get_payer_orders()
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI--_3","title":"\u041c\u043e\u0438 \u0437\u0430\u043a\u0430\u0437\u044b \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f","text":"my_work = await client.projects.get_worker_orders()
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI.get_list","title":"get_listasync","text":"get_list(page=1, category_id=None)\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u0431\u0438\u0440\u0436\u0438.
\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u0433\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.
Parameters:
Name Type Description Defaultpage int \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).
1 category_id Optional[int] ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 None \u2014 \u0432\u0441\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.
None Returns:
Type DescriptionProjectsResponse ProjectsResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:
ProjectsResponse ProjectsResponse src/kwork_api/client.py async def get_list(\n self,\n page: int = 1,\n category_id: Optional[int] = None,\n) -> ProjectsResponse:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u0431\u0438\u0440\u0436\u0438.\n\n \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432.\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u0433\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.\n\n Args:\n page: \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).\n category_id: ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438.\n \u0415\u0441\u043b\u0438 None \u2014 \u0432\u0441\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.\n\n Returns:\n ProjectsResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:\n - projects: \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\n - pagination: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438\n\n Example:\n # \u0412\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b\n response = await client.projects.get_list(page=1)\n\n for project in response.projects:\n print(f\"{project.title}: {project.budget} {project.budget_type}\")\n\n # \u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\"\n dev_projects = await client.projects.get_list(\n page=1,\n category_id=5\n )\n \"\"\"\n data = await self.client._request(\n \"POST\",\n \"/projects\",\n json={\n \"page\": page,\n \"category_id\": category_id,\n },\n )\n return ProjectsResponse.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI.get_list--_1","title":"\u0412\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b","text":"response = await client.projects.get_list(page=1)
for project in response.projects: print(f\"{project.title}: {project.budget} {project.budget_type}\")
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI.get_list--_2","title":"\u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430\"","text":"dev_projects = await client.projects.get_list( page=1, category_id=5 )
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI.get_payer_orders","title":"get_payer_ordersasync","text":"get_payer_orders()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u044b \u0433\u0434\u0435 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 (\u043e\u0442\u043a\u0440\u044b\u0442, \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d).
Returns:
Type Descriptionlist[Project] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0433\u0434\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u2014 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a.
Exampleorders = await client.projects.get_payer_orders() for order in orders: print(f\"\u0417\u0430\u043a\u0430\u0437 #{order.id}: {order.status}\")
Source code insrc/kwork_api/client.py async def get_payer_orders(self) -> list[Project]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u044b \u0433\u0434\u0435 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c,\n \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 (\u043e\u0442\u043a\u0440\u044b\u0442, \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d).\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0433\u0434\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u2014 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a.\n\n Example:\n orders = await client.projects.get_payer_orders()\n for order in orders:\n print(f\"\u0417\u0430\u043a\u0430\u0437 #{order.id}: {order.status}\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/payerOrders\")\n return [Project.model_validate(p) for p in data.get(\"orders\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI.get_worker_orders","title":"get_worker_orders async","text":"get_worker_orders()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u044b \u0433\u0434\u0435 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0433\u0434\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c.
Returns:
Type Descriptionlist[Project] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0433\u0434\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c.
Examplework = await client.projects.get_worker_orders() active = [p for p in work if p.status == \"in_progress\"] print(f\"\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432: {len(active)}\")
Source code insrc/kwork_api/client.py async def get_worker_orders(self) -> list[Project]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u044b \u0433\u0434\u0435 \u0432\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0433\u0434\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\n \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0435\u043c.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0433\u0434\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c.\n\n Example:\n work = await client.projects.get_worker_orders()\n active = [p for p in work if p.status == \"in_progress\"]\n print(f\"\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043a\u0430\u0437\u043e\u0432: {len(active)}\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/workerOrders\")\n return [Project.model_validate(p) for p in data.get(\"orders\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI","title":"ReferenceAPI","text":"ReferenceAPI(client)\n \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u043e\u0435 API.
\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c Kwork: - \u0413\u043e\u0440\u043e\u0434\u0430, \u0441\u0442\u0440\u0430\u043d\u044b, \u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u044f\u0441\u0430 - \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f - \u0417\u043d\u0430\u0447\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439
\u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0434\u043a\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u044b.
Example Source code insrc/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI--_1","title":"\u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u044b","text":"countries = await client.reference.get_countries()
"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI--_2","title":"\u0412\u0441\u0435 \u0433\u043e\u0440\u043e\u0434\u0430","text":"cities = await client.reference.get_cities()
"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI--_3","title":"\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u0438\u0447\u0438","text":"features = await client.reference.get_features()
"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI.get_badges_info","title":"get_badges_infoasync","text":"get_badges_info()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u043d\u0430\u0447\u043a\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.
\u0417\u043d\u0430\u0447\u043a\u0438 (badges) \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044b: - \"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\" - \"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\" - \"\u041d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446\" - \u0438 \u0442.\u0434.
Returns:
Type Descriptionlist[Badge] \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u043a\u043e\u0432 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438.
Examplebadges = await client.reference.get_badges_info() for badge in badges: print(f\"{badge.name}: {badge.description}\")
Source code insrc/kwork_api/client.py async def get_badges_info(self) -> list[Badge]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u043d\u0430\u0447\u043a\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.\n\n \u0417\u043d\u0430\u0447\u043a\u0438 (badges) \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044b:\n - \"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\"\n - \"\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0442\"\n - \"\u041d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446\"\n - \u0438 \u0442.\u0434.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u043a\u043e\u0432 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438.\n\n Example:\n badges = await client.reference.get_badges_info()\n for badge in badges:\n print(f\"{badge.name}: {badge.description}\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/getBadgesInfo\")\n return [Badge.model_validate(b) for b in data.get(\"badges\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI.get_cities","title":"get_cities async","text":"get_cities()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432.
Returns:
Type Descriptionlist[City] \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0438\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 Kwork.
Examplecities = await client.reference.get_cities() moscow = next(c for c in cities if c.name == \"\u041c\u043e\u0441\u043a\u0432\u0430\")
Source code insrc/kwork_api/client.py async def get_cities(self) -> list[City]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0438\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 Kwork.\n\n Example:\n cities = await client.reference.get_cities()\n moscow = next(c for c in cities if c.name == \"\u041c\u043e\u0441\u043a\u0432\u0430\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/cities\")\n return [City.model_validate(c) for c in data.get(\"cities\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI.get_countries","title":"get_countries async","text":"get_countries()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d.
Returns:
Type Descriptionlist[Country] \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 \u0438 \u0433\u043e\u0440\u043e\u0434\u0430\u043c\u0438.
Examplecountries = await client.reference.get_countries() russia = next(c for c in countries if c.code == \"RU\")
Source code insrc/kwork_api/client.py async def get_countries(self) -> list[Country]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 \u0438 \u0433\u043e\u0440\u043e\u0434\u0430\u043c\u0438.\n\n Example:\n countries = await client.reference.get_countries()\n russia = next(c for c in countries if c.code == \"RU\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/countries\")\n return [Country.model_validate(c) for c in data.get(\"countries\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI.get_features","title":"get_features async","text":"get_features()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (features).
Features \u2014 \u044d\u0442\u043e \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a \u043a\u0432\u043e\u0440\u043a\u0430\u043c: - \u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u043e\u043a\u0438 - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 - \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 - \u0438 \u0442.\u0434.
Returns:
Type Descriptionlist[Feature] \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 features \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0446\u0435\u043d\u0430\u043c\u0438.
Examplefeatures = await client.reference.get_features() for f in features: print(f\"{f.name}: {f.price} RUB\")
Source code insrc/kwork_api/client.py async def get_features(self) -> list[Feature]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (features).\n\n Features \u2014 \u044d\u0442\u043e \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a \u043a\u0432\u043e\u0440\u043a\u0430\u043c:\n - \u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u043e\u043a\u0438\n - \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438\n - \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430\n - \u0438 \u0442.\u0434.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 features \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0446\u0435\u043d\u0430\u043c\u0438.\n\n Example:\n features = await client.reference.get_features()\n for f in features:\n print(f\"{f.name}: {f.price} RUB\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/getAvailableFeatures\")\n return [Feature.model_validate(f) for f in data.get(\"features\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI.get_public_features","title":"get_public_features async","text":"get_public_features()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.
\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e get_features(), \u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438.
Returns:
Type Descriptionlist[Feature] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 features.
Source code insrc/kwork_api/client.py async def get_public_features(self) -> list[Feature]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\n\n \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e get_features(), \u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e\n \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 features.\n \"\"\"\n data = await self.client._request(\"POST\", \"/getPublicFeatures\")\n return [Feature.model_validate(f) for f in data.get(\"features\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.ReferenceAPI.get_timezones","title":"get_timezones async","text":"get_timezones()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u043e\u0432.
Returns:
Type Descriptionlist[TimeZone] \u0421\u043f\u0438\u0441\u043e\u043a \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u043e\u0432 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u043c\u0438.
Exampletimezones = await client.reference.get_timezones() msks = next(tz for tz in timezones if \"Moscow\" in tz.name)
Source code insrc/kwork_api/client.py async def get_timezones(self) -> list[TimeZone]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u043e\u0432.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u044f\u0441\u043e\u0432 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u043c\u0438.\n\n Example:\n timezones = await client.reference.get_timezones()\n msks = next(tz for tz in timezones if \"Moscow\" in tz.name)\n \"\"\"\n data = await self.client._request(\"POST\", \"/timezones\")\n return [TimeZone.model_validate(t) for t in data.get(\"timezones\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI","title":"UserAPI","text":"UserAPI(client)\n \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 API.
\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: - \u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 - \u041e\u0442\u0437\u044b\u0432\u044b (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435) - \u0418\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043a\u0432\u043e\u0440\u043a\u0438
Example Source code insrc/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI--_1","title":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435","text":"info = await client.user.get_info()
"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI--_2","title":"\u041c\u043e\u0438 \u043e\u0442\u0437\u044b\u0432\u044b","text":"reviews = await client.user.get_reviews()
"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI--_3","title":"\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043a\u0432\u043e\u0440\u043a\u0438","text":"favorites = await client.user.get_favorite_kworks()
"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI.get_favorite_kworks","title":"get_favorite_kworksasync","text":"get_favorite_kworks()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u0432\u043e\u0440\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435.
Returns:
Type Descriptionlist[Kwork] \u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
Examplefavorites = await client.user.get_favorite_kworks() for kwork in favorites: print(f\"{kwork.title}: {kwork.price} RUB\")
Source code insrc/kwork_api/client.py async def get_favorite_kworks(self) -> list[Kwork]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u0432\u043e\u0440\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435.\n\n Returns:\n \u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.\n\n Example:\n favorites = await client.user.get_favorite_kworks()\n for kwork in favorites:\n print(f\"{kwork.title}: {kwork.price} RUB\")\n \"\"\"\n data = await self.client._request(\"POST\", \"/favoriteKworks\")\n return [Kwork.model_validate(k) for k in data.get(\"kworks\", [])]\n"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI.get_info","title":"get_info async","text":"get_info()\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435.
\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430: - ID, username, email - \u0411\u0430\u043b\u0430\u043d\u0441, \u0440\u0435\u0439\u0442\u0438\u043d\u0433 - \u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 - \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f
Returns:
Type Descriptiondict[str, Any] \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435.
dict[str, Any] \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 API.
Exampleinfo = await client.user.get_info() print(f\"User: {info.get('username')}\") print(f\"Balance: {info.get('balance')} RUB\")
Source code insrc/kwork_api/client.py async def get_info(self) -> dict[str, Any]:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435.\n\n \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430:\n - ID, username, email\n - \u0411\u0430\u043b\u0430\u043d\u0441, \u0440\u0435\u0439\u0442\u0438\u043d\u0433\n - \u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438\n - \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\n\n Returns:\n \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435.\n \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 API.\n\n Example:\n info = await client.user.get_info()\n print(f\"User: {info.get('username')}\")\n print(f\"Balance: {info.get('balance')} RUB\")\n \"\"\"\n return await self.client._request(\"POST\", \"/user\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI.get_reviews","title":"get_reviews async","text":"get_reviews(user_id=None, page=1)\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
\u0415\u0441\u043b\u0438 user_id \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0437\u044b\u0432\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u2014 \u043e\u0442\u0437\u044b\u0432\u044b \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e ID.
Parameters:
Name Type Description Defaultuser_id Optional[int] ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 None \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.
None page int \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438 (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).
1 Returns:
Type DescriptionReviewsResponse ReviewsResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:
ReviewsResponse ReviewsResponse ReviewsResponse src/kwork_api/client.py async def get_reviews(\n self,\n user_id: Optional[int] = None,\n page: int = 1,\n) -> ReviewsResponse:\n \"\"\"\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n\n \u0415\u0441\u043b\u0438 user_id \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0437\u044b\u0432\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.\n \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d \u2014 \u043e\u0442\u0437\u044b\u0432\u044b \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e ID.\n\n Args:\n user_id: ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 None \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.\n page: \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438 (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).\n\n Returns:\n ReviewsResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:\n - reviews: \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\n - pagination: \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438\n - average_rating: \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\n\n Example:\n # \u041c\u043e\u0438 \u043e\u0442\u0437\u044b\u0432\u044b\n my_reviews = await client.user.get_reviews()\n\n # \u041e\u0442\u0437\u044b\u0432\u044b \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n user_reviews = await client.user.get_reviews(user_id=12345)\n\n # \u0421 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0435\u0439\n page2 = await client.user.get_reviews(page=2)\n \"\"\"\n data = await self.client._request(\n \"POST\",\n \"/userReviews\",\n json={\"user_id\": user_id, \"page\": page},\n )\n return ReviewsResponse.model_validate(data)\n"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI.get_reviews--_1","title":"\u041c\u043e\u0438 \u043e\u0442\u0437\u044b\u0432\u044b","text":"my_reviews = await client.user.get_reviews()
"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI.get_reviews--_2","title":"\u041e\u0442\u0437\u044b\u0432\u044b \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f","text":"user_reviews = await client.user.get_reviews(user_id=12345)
"},{"location":"api/client/#kwork_api.client.KworkClient.UserAPI.get_reviews--_3","title":"\u0421 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0435\u0439","text":"page2 = await client.user.get_reviews(page=2)
"},{"location":"api/client/#kwork_api.client.KworkClient-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.close","title":"closeasync","text":"close()\n Close HTTP client.
Source code insrc/kwork_api/client.py async def close(self) -> None:\n \"\"\"Close HTTP client.\"\"\"\n if self._client and not self._client.is_closed:\n await self._client.aclose()\n"},{"location":"api/client/#kwork_api.client.KworkClient.login","title":"login async classmethod","text":"login(username, password, timeout=30.0)\n \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443 \u0438 \u043f\u0430\u0440\u043e\u043b\u044e.
\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 Kwork: 1. POST /signIn \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 session cookies 2. POST /getWebAuthToken \u2014 \u043e\u0431\u043c\u0435\u043d cookies \u043d\u0430 web_auth_token
\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438 cookies \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.
Parameters:
Name Type Description Defaultusername str \u041b\u043e\u0433\u0438\u043d \u0438\u043b\u0438 email \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Kwork.
requiredpassword str \u041f\u0430\u0440\u043e\u043b\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Kwork.
requiredtimeout float \u0422\u0430\u0439\u043c\u0430\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044d\u0442\u0430\u043f\u0443.
30.0 Returns:
Type DescriptionKworkClient \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 KworkClient,
KworkClient \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 API.
Raises:
Type DescriptionKworkAuthError \u0415\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043d/\u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b \u0438\u043b\u0438 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d.
KworkNetworkError \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0435\u0442\u0438.
Example Security\u041f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435. \u0422\u043e\u043b\u044c\u043a\u043e token \u0438 cookies. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c token \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f.
Note\u0422\u043e\u043a\u0435\u043d \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438. \u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 401 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 login().
Source code insrc/kwork_api/client.py @classmethod\nasync def login(\n cls,\n username: str,\n password: str,\n timeout: float = 30.0,\n) -> \"KworkClient\":\n \"\"\"\n \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443 \u0438 \u043f\u0430\u0440\u043e\u043b\u044e.\n\n \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0432\u0443\u0445\u044d\u0442\u0430\u043f\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 Kwork:\n 1. POST /signIn \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 session cookies\n 2. POST /getWebAuthToken \u2014 \u043e\u0431\u043c\u0435\u043d cookies \u043d\u0430 web_auth_token\n\n \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438 cookies \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.\n\n Args:\n username: \u041b\u043e\u0433\u0438\u043d \u0438\u043b\u0438 email \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Kwork.\n password: \u041f\u0430\u0440\u043e\u043b\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Kwork.\n timeout: \u0422\u0430\u0439\u043c\u0430\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044d\u0442\u0430\u043f\u0443.\n\n Returns:\n \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 KworkClient,\n \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 API.\n\n Raises:\n KworkAuthError: \u0415\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043d/\u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b \u0438\u043b\u0438 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d.\n KworkNetworkError: \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0435\u0442\u0438.\n\n Example:\n # \u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\n client = await KworkClient.login(\"myuser\", \"mypassword\")\n\n # \u0421 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c\n client = await KworkClient.login(\"user\", \"pass\", timeout=60.0)\n\n # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\n token = client._token\n # \u041f\u043e\u0437\u0436\u0435: client = KworkClient(token=token)\n\n Security:\n \u041f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0435. \u0422\u043e\u043b\u044c\u043a\u043e token \u0438 cookies.\n \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c token \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\n \u0432\u043c\u0435\u0441\u0442\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f.\n\n Note:\n \u0422\u043e\u043a\u0435\u043d \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438. \u041f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 401 \u043e\u0448\u0438\u0431\u043a\u0438\n \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 login().\n \"\"\"\n client = cls(timeout=timeout)\n\n try:\n async with client._get_httpx_client() as http_client:\n # Step 1: Login to get session cookies\n login_data = {\n \"login_or_email\": username,\n \"password\": password,\n }\n\n response = await http_client.post(\n cls.LOGIN_URL,\n data=login_data,\n headers={\"Referer\": \"https://kwork.ru/\"},\n )\n\n if response.status_code != 200:\n raise KworkAuthError(f\"Login failed: {response.status_code}\")\n\n # Extract cookies\n cookies = dict(response.cookies)\n\n if \"userId\" not in cookies:\n raise KworkAuthError(\"Login failed: no userId in cookies\")\n\n # Step 2: Get web auth token\n token_response = await http_client.post(\n cls.TOKEN_URL,\n json={},\n )\n\n if token_response.status_code != 200:\n raise KworkAuthError(f\"Token request failed: {token_response.status_code}\")\n\n token_data = token_response.json()\n web_token = token_data.get(\"web_auth_token\")\n\n if not web_token:\n raise KworkAuthError(\"No web_auth_token in response\")\n\n # Create new client with token\n return cls(token=web_token, cookies=cookies, timeout=timeout)\n\n except httpx.RequestError as e:\n raise KworkNetworkError(f\"Login request failed: {e}\")\n"},{"location":"api/client/#kwork_api.client.KworkClient.login--_1","title":"\u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435","text":"client = await KworkClient.login(\"myuser\", \"mypassword\")
"},{"location":"api/client/#kwork_api.client.KworkClient.login--_2","title":"\u0421 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c","text":"client = await KworkClient.login(\"user\", \"pass\", timeout=60.0)
"},{"location":"api/client/#kwork_api.client.KworkClient.login--_3","title":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f","text":"token = client._token
"},{"location":"api/client/#kwork_api.client.KworkClient.login--client-kworkclienttokentoken","title":"\u041f\u043e\u0437\u0436\u0435: client = KworkClient(token=token)","text":""},{"location":"api/errors/","title":"Errors","text":"Exception classes for API errors.
"},{"location":"api/errors/#kwork_api.errors","title":"kwork_api.errors","text":"\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Kwork API.
\u0412\u0441\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \u0418\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439:
KworkError (\u0431\u0430\u0437\u043e\u0432\u043e\u0435)\n\u251c\u2500\u2500 KworkAuthError (\u043e\u0448\u0438\u0431\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438)\n\u251c\u2500\u2500 KworkApiError (HTTP \u043e\u0448\u0438\u0431\u043a\u0438 API)\n\u2502 \u251c\u2500\u2500 KworkNotFoundError (404)\n\u2502 \u251c\u2500\u2500 KworkRateLimitError (429)\n\u2502 \u2514\u2500\u2500 KworkValidationError (400)\n\u2514\u2500\u2500 KworkNetworkError (\u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0442\u0438)\n"},{"location":"api/errors/#kwork_api.errors-classes","title":"Classes","text":""},{"location":"api/errors/#kwork_api.errors.KworkApiError","title":"KworkApiError","text":"KworkApiError(message, status_code=None, response=None)\n Bases: KworkError
\u041e\u0448\u0438\u0431\u043a\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a API (4xx, 5xx).
\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f HTTP \u043e\u0448\u0438\u0431\u043e\u043a API. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u0441\u0442\u0430\u0442\u0443\u0441\u0430.
Attributes:
Name Type Descriptionstatus_code HTTP \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 (400, 404, 500, etc.)
Exampletry: await client.catalog.get_details(999999) except KworkApiError as e: print(f\"HTTP {e.status_code}: {e.message}\")
Source code insrc/kwork_api/errors.py def __init__(\n self,\n message: str,\n status_code: Optional[int] = None,\n response: Optional[Any] = None,\n):\n self.status_code = status_code\n super().__init__(message, response)\n"},{"location":"api/errors/#kwork_api.errors.KworkAuthError","title":"KworkAuthError","text":"KworkAuthError(\n message=\"Authentication failed\", response=None\n)\n Bases: KworkError
\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438/\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.
\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438: - \u041d\u0435\u0432\u0435\u0440\u043d\u043e\u043c \u043b\u043e\u0433\u0438\u043d\u0435 \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u0435 - \u0418\u0441\u0442\u0451\u043a\u0448\u0435\u043c \u0438\u043b\u0438 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e\u043c \u0442\u043e\u043a\u0435\u043d\u0435 - \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (403)
Exampletry: client = await KworkClient.login(\"user\", \"wrong_password\") except KworkAuthError: print(\"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0443\u0447\u0451\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\")
Source code insrc/kwork_api/errors.py def __init__(self, message: str = \"Authentication failed\", response: Optional[Any] = None):\n super().__init__(message, response)\n"},{"location":"api/errors/#kwork_api.errors.KworkError","title":"KworkError","text":"KworkError(message, response=None)\n Bases: Exception
\u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a Kwork API.
\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.
Attributes:
Name Type Descriptionmessage \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.
response \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 HTTP response (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c).
Exampletry: await client.catalog.get_list() except KworkError as e: print(f\"\u041e\u0448\u0438\u0431\u043a\u0430: {e.message}\")
Source code insrc/kwork_api/errors.py def __init__(self, message: str, response: Optional[Any] = None):\n self.message = message\n self.response = response\n super().__init__(self.message)\n"},{"location":"api/errors/#kwork_api.errors.KworkNetworkError","title":"KworkNetworkError","text":"KworkNetworkError(message='Network error', response=None)\n Bases: KworkError
\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u0435\u0442\u0438/\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.
\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438: - \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f - \u0422\u0430\u0439\u043c\u0430\u0443\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 - \u041e\u0448\u0438\u0431\u043a\u0435 DNS - \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u0441 SSL
Exampletry: await client.catalog.get_list() except KworkNetworkError: print(\"\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443\")
Source code insrc/kwork_api/errors.py def __init__(self, message: str = \"Network error\", response: Optional[Any] = None):\n super().__init__(message, response)\n"},{"location":"api/errors/#kwork_api.errors.KworkNotFoundError","title":"KworkNotFoundError","text":"KworkNotFoundError(resource, response=None)\n Bases: KworkApiError
\u0420\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d (404).
\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u0432\u043e\u0440\u043a\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430.
Exampletry: await client.catalog.get_details(999999) except KworkNotFoundError: print(\"\u041a\u0432\u043e\u0440\u043a \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\")
Source code insrc/kwork_api/errors.py def __init__(self, resource: str, response: Optional[Any] = None):\n super().__init__(f\"Resource not found: {resource}\", 404, response)\n"},{"location":"api/errors/#kwork_api.errors.KworkRateLimitError","title":"KworkRateLimitError","text":"KworkRateLimitError(\n message=\"Rate limit exceeded\", response=None\n)\n Bases: KworkApiError
\u041f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (429).
\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a API. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0443\u0437\u0443 \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c.
Exampleimport asyncio
try: await client.catalog.get_list() except KworkRateLimitError: await asyncio.sleep(5) # \u041f\u0430\u0443\u0437\u0430 5 \u0441\u0435\u043a\u0443\u043d\u0434
Source code insrc/kwork_api/errors.py def __init__(self, message: str = \"Rate limit exceeded\", response: Optional[Any] = None):\n super().__init__(message, 429, response)\n"},{"location":"api/errors/#kwork_api.errors.KworkValidationError","title":"KworkValidationError","text":"KworkValidationError(\n message=\"Validation failed\", fields=None, response=None\n)\n Bases: KworkApiError
\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 (400).
\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.
Attributes:
Name Type Descriptionfields \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e \u043f\u043e\u043b\u044f\u043c {field: [errors]}.
Exampletry: await client.catalog.get_list(page=-1) except KworkValidationError as e: if e.fields: for field, errors in e.fields.items(): print(f\"{field}: {errors[0]}\")
Source code insrc/kwork_api/errors.py def __init__(\n self,\n message: str = \"Validation failed\",\n fields: Optional[dict[str, list[str]]] = None,\n response: Optional[Any] = None,\n):\n self.fields = fields or {}\n super().__init__(message, 400, response)\n"},{"location":"api/models/","title":"Models","text":"Pydantic models for API responses.
"},{"location":"api/models/#kwork_api.models","title":"kwork_api.models","text":"Pydantic \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 Kwork API.
\u0412\u0441\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 HAR \u0434\u0430\u043c\u043f\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0438 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API.
"},{"location":"api/models/#kwork_api.models-classes","title":"Classes","text":""},{"location":"api/models/#kwork_api.models.APIErrorResponse","title":"APIErrorResponse","text":" Bases: BaseModel
\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 API \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.
Attributes:
Name Type Descriptionsuccess bool \u0412\u0441\u0435\u0433\u0434\u0430 False \u0434\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a.
errors list[ErrorDetail] \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043e\u0448\u0438\u0431\u043e\u043a.
message Optional[str] \u041e\u0431\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.
"},{"location":"api/models/#kwork_api.models.AuthResponse","title":"AuthResponse","text":" Bases: BaseModel
\u041e\u0442\u0432\u0435\u0442 API \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.
Attributes:
Name Type Descriptionsuccess bool \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.
user_id Optional[int] ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
username Optional[str] \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
web_auth_token Optional[str] \u0422\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.
message Optional[str] \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435).
"},{"location":"api/models/#kwork_api.models.Badge","title":"Badge","text":" Bases: BaseModel
\u0417\u043d\u0430\u0447\u043e\u043a (\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0437\u043d\u0430\u0447\u043a\u0430.
name str \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u043a\u0430.
description Optional[str] \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f.
icon_url Optional[str] URL \u0438\u043a\u043e\u043d\u043a\u0438 \u0437\u043d\u0430\u0447\u043a\u0430.
"},{"location":"api/models/#kwork_api.models.CatalogResponse","title":"CatalogResponse","text":" Bases: BaseModel
\u041e\u0442\u0432\u0435\u0442 API \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
Attributes:
Name Type Descriptionkworks list[Kwork] \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.
pagination Optional[PaginationInfo] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.
filters Optional[dict[str, Any]] \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b.
sort_options list[str] \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438.
"},{"location":"api/models/#kwork_api.models.City","title":"City","text":" Bases: BaseModel
\u0413\u043e\u0440\u043e\u0434 \u0438\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0433\u043e\u0440\u043e\u0434\u0430.
name str \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430.
country_id Optional[int] ID \u0441\u0442\u0440\u0430\u043d\u044b.
"},{"location":"api/models/#kwork_api.models.Country","title":"Country","text":" Bases: BaseModel
\u0421\u0442\u0440\u0430\u043d\u0430 \u0438\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0441\u0442\u0440\u0430\u043d\u044b.
name str \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u044b.
code Optional[str] \u041a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b (ISO).
cities list[City] \u0421\u043f\u0438\u0441\u043e\u043a \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u043d\u0435.
"},{"location":"api/models/#kwork_api.models.DataResponse","title":"DataResponse","text":" Bases: BaseModel
\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 API \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.
\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API.
Attributes:
Name Type Descriptionsuccess bool \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430.
data Optional[dict[str, Any]] \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441\u043b\u043e\u0432\u0430\u0440\u044c).
message Optional[str] \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.
"},{"location":"api/models/#kwork_api.models.Dialog","title":"Dialog","text":" Bases: BaseModel
\u0414\u0438\u0430\u043b\u043e\u0433 (\u0447\u0430\u0442) \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0434\u0438\u0430\u043b\u043e\u0433\u0430.
participant Optional[KworkUser] \u0421\u043e\u0431\u0435\u0441\u0435\u0434\u043d\u0438\u043a.
last_message Optional[str] \u0422\u0435\u043a\u0441\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.
unread_count int \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.
updated_at Optional[datetime] \u0412\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.
"},{"location":"api/models/#kwork_api.models.ErrorDetail","title":"ErrorDetail","text":" Bases: BaseModel
\u0414\u0435\u0442\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 API.
Attributes:
Name Type Descriptioncode str \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438.
message str \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.
field Optional[str] \u041f\u043e\u043b\u0435, \u0432\u044b\u0437\u0432\u0430\u0432\u0448\u0435\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 (\u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e).
"},{"location":"api/models/#kwork_api.models.Feature","title":"Feature","text":" Bases: BaseModel
\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f (feature) \u0434\u043b\u044f \u043a\u0432\u043e\u0440\u043a\u0430.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0444\u0443\u043d\u043a\u0446\u0438\u0438.
name str \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.
description Optional[str] \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.
price float \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0440\u0443\u0431\u043b\u044f\u0445.
type str \u0422\u0438\u043f: \"extra\", \"premium\", etc.
"},{"location":"api/models/#kwork_api.models.Kwork","title":"Kwork","text":" Bases: BaseModel
\u041a\u0432\u043e\u0440\u043a \u2014 \u0443\u0441\u043b\u0443\u0433\u0430 \u043d\u0430 Kwork.
\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u0432\u043e\u0440\u043a\u0430 \u0441 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u043a\u0432\u043e\u0440\u043a\u0430.
title str \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043a\u0432\u043e\u0440\u043a\u0430.
description Optional[str] \u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.
price float \u0426\u0435\u043d\u0430 \u0432 \u0440\u0443\u0431\u043b\u044f\u0445.
currency str \u0412\u0430\u043b\u044e\u0442\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e RUB).
category_id Optional[int] ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.
seller Optional[KworkUser] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u0435.
images list[str] \u0421\u043f\u0438\u0441\u043e\u043a URL \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439.
rating Optional[float] \u0420\u0435\u0439\u0442\u0438\u043d\u0433 \u043a\u0432\u043e\u0440\u043a\u0430 (0-5).
reviews_count int \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0437\u044b\u0432\u043e\u0432.
created_at Optional[datetime] \u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.
updated_at Optional[datetime] \u0414\u0430\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.
"},{"location":"api/models/#kwork_api.models.KworkCategory","title":"KworkCategory","text":" Bases: BaseModel
\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f \u043a\u0432\u043e\u0440\u043a\u043e\u0432.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.
name str \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.
slug str URL-safe \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.
parent_id Optional[int] ID \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438.
"},{"location":"api/models/#kwork_api.models.KworkDetails","title":"KworkDetails","text":" Bases: Kwork
\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u0432\u043e\u0440\u043a\u0435.
\u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f Kwork \u043f\u043b\u044e\u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438.
Attributes:
Name Type Descriptionfull_description Optional[str] \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0441\u043b\u0443\u0433\u0438.
requirements Optional[str] \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0443.
delivery_time Optional[int] \u0421\u0440\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u043d\u044f\u0445.
revisions Optional[int] \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a.
features list[str] \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0446\u0438\u0439.
faq list[dict[str, str]] \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.
"},{"location":"api/models/#kwork_api.models.KworkUser","title":"KworkUser","text":" Bases: BaseModel
\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 Kwork.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
username str \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043b\u043e\u0433\u0438\u043d).
avatar_url Optional[str] URL \u0430\u0432\u0430\u0442\u0430\u0440\u0430 \u0438\u043b\u0438 None.
is_online bool \u0421\u0442\u0430\u0442\u0443\u0441 \u043e\u043d\u043b\u0430\u0439\u043d.
rating Optional[float] \u0420\u0435\u0439\u0442\u0438\u043d\u0433 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (0-5).
Exampleuser = KworkUser(id=123, username=\"seller\", rating=4.9) print(f\"{user.username}: {user.rating} \u2605\")
"},{"location":"api/models/#kwork_api.models.Notification","title":"Notification","text":" Bases: BaseModel
\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.
type str \u0422\u0438\u043f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \"message\", \"order\", \"system\", etc.
title str \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.
message str \u0422\u0435\u043a\u0441\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.
is_read bool \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e \u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435.
created_at Optional[datetime] \u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.
link Optional[str] \u0421\u0441\u044b\u043b\u043a\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c).
"},{"location":"api/models/#kwork_api.models.NotificationsResponse","title":"NotificationsResponse","text":" Bases: BaseModel
\u041e\u0442\u0432\u0435\u0442 API \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.
Attributes:
Name Type Descriptionnotifications list[Notification] \u0421\u043f\u0438\u0441\u043e\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.
unread_count int \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.
"},{"location":"api/models/#kwork_api.models.PaginationInfo","title":"PaginationInfo","text":" Bases: BaseModel
\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.
Attributes:
Name Type Descriptioncurrent_page int \u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1).
total_pages int \u041e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446.
total_items int \u041e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.
items_per_page int \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435.
has_next bool \u0415\u0441\u0442\u044c \u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.
has_prev bool \u0415\u0441\u0442\u044c \u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.
"},{"location":"api/models/#kwork_api.models.Project","title":"Project","text":" Bases: BaseModel
\u041f\u0440\u043e\u0435\u043a\u0442 (\u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0431\u0438\u0440\u0436\u0435 \u0444\u0440\u0438\u043b\u0430\u043d\u0441\u0430).
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u043f\u0440\u043e\u0435\u043a\u0442\u0430.
title str \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430.
description Optional[str] \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.
budget Optional[float] \u0411\u044e\u0434\u0436\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.
budget_type str \u0422\u0438\u043f \u0431\u044e\u0434\u0436\u0435\u0442\u0430: \"fixed\" (\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439) \u0438\u043b\u0438 \"hourly\" (\u043f\u043e\u0447\u0430\u0441\u043e\u0432\u043e\u0439).
category_id Optional[int] ID \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.
customer Optional[KworkUser] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0435.
status str \u0421\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \"open\", \"in_progress\", \"completed\", \"cancelled\".
created_at Optional[datetime] \u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.
updated_at Optional[datetime] \u0414\u0430\u0442\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.
bids_count int \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u0432.
skills list[str] \u0422\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438.
"},{"location":"api/models/#kwork_api.models.ProjectsResponse","title":"ProjectsResponse","text":" Bases: BaseModel
\u041e\u0442\u0432\u0435\u0442 API \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.
Attributes:
Name Type Descriptionprojects list[Project] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.
pagination Optional[PaginationInfo] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.
"},{"location":"api/models/#kwork_api.models.Review","title":"Review","text":" Bases: BaseModel
\u041e\u0442\u0437\u044b\u0432 \u043e \u043a\u0432\u043e\u0440\u043a\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0435.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u043e\u0442\u0437\u044b\u0432\u0430.
rating int \u041e\u0446\u0435\u043d\u043a\u0430 \u043e\u0442 1 \u0434\u043e 5.
comment Optional[str] \u0422\u0435\u043a\u0441\u0442 \u043e\u0442\u0437\u044b\u0432\u0430.
author Optional[KworkUser] \u0410\u0432\u0442\u043e\u0440 \u043e\u0442\u0437\u044b\u0432\u0430.
kwork_id Optional[int] ID \u043a\u0432\u043e\u0440\u043a\u0430 (\u0435\u0441\u043b\u0438 \u043e\u0442\u0437\u044b\u0432 \u043e \u043a\u0432\u043e\u0440\u043a\u0435).
created_at Optional[datetime] \u0414\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.
"},{"location":"api/models/#kwork_api.models.ReviewsResponse","title":"ReviewsResponse","text":" Bases: BaseModel
\u041e\u0442\u0432\u0435\u0442 API \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0442\u0437\u044b\u0432\u043e\u0432.
Attributes:
Name Type Descriptionreviews list[Review] \u0421\u043f\u0438\u0441\u043e\u043a \u043e\u0442\u0437\u044b\u0432\u043e\u0432.
pagination Optional[PaginationInfo] \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.
average_rating Optional[float] \u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433.
"},{"location":"api/models/#kwork_api.models.TimeZone","title":"TimeZone","text":" Bases: BaseModel
\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441.
Attributes:
Name Type Descriptionid int \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID.
name str \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u044f\u0441\u0430.
offset str \u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 UTC (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \"+03:00\").
"},{"location":"api/models/#kwork_api.models.ValidationIssue","title":"ValidationIssue","text":" Bases: BaseModel
\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430.
Attributes:
Name Type Descriptiontype str \u0422\u0438\u043f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \"error\", \"warning\", \"suggestion\".
code str \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \"SPELLING\", \"GRAMMAR\", \"LENGTH\").
message str \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.
position Optional[int] \u041f\u043e\u0437\u0438\u0446\u0438\u044f \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 (\u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e).
suggestion Optional[str] \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c).
"},{"location":"api/models/#kwork_api.models.ValidationResponse","title":"ValidationResponse","text":" Bases: BaseModel
\u041e\u0442\u0432\u0435\u0442 API \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0441\u0442\u0430.
\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 /api/validation/checktext.
Attributes:
Name Type Descriptionsuccess bool \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438.
is_valid bool \u0422\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e (\u043d\u0435\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a).
issues list[ValidationIssue] \u0421\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.
score Optional[int] \u041e\u0446\u0435\u043d\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 (0-100, \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430).
message Optional[str] \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.
"}]}