diff --git a/site/objects.inv b/site/objects.inv
index f411e19..baa2486 100644
Binary files a/site/objects.inv and b/site/objects.inv differ
diff --git a/site/search/search_index.json b/site/search/search_index.json
index 211ae8a..b7f3400 100644
--- a/site/search/search_index.json
+++ b/site/search/search_index.json
@@ -1 +1 @@
-{"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 Documentation","text":"Unofficial Python client for Kwork.ru API.
"},{"location":"#quick-start","title":"Quick Start","text":""},{"location":"#installation","title":"Installation","text":"pip install kwork-api\n
"},{"location":"#authentication","title":"Authentication","text":"from kwork_api import KworkClient\n\n# Login with credentials\nclient = await KworkClient.login(\"username\", \"password\")\n\n# Or restore from token\nclient = KworkClient(token=\"your_web_auth_token\")\n
"},{"location":"#basic-usage","title":"Basic Usage","text":"async with KworkClient(token=\"token\") as client:\n # Get catalog\n catalog = await client.catalog.get_list(page=1)\n\n # Get kwork details\n details = await client.catalog.get_details(kwork_id=123)\n\n # Get projects\n projects = await client.projects.get_list()\n
"},{"location":"#documentation-sections","title":"Documentation Sections","text":" - API Reference \u2014 All endpoints and methods
- Models \u2014 Pydantic models
- Errors \u2014 Exception classes
- Examples \u2014 Usage examples
"},{"location":"#features","title":"Features","text":" - \u2705 Full API coverage (45 endpoints)
- \u2705 Async/await support
- \u2705 Pydantic models for type safety
- \u2705 Clear error handling
- \u2705 Session management
"},{"location":"#rate-limiting","title":"Rate Limiting","text":"Rate limiting is not implemented in the library. Handle it in your code:
import asyncio\n\nfor page in range(1, 10):\n catalog = await client.catalog.get_list(page=page)\n await asyncio.sleep(1) # 1 second delay\n
"},{"location":"#error-handling","title":"Error Handling","text":"from kwork_api import KworkAuthError, KworkApiError\n\ntry:\n catalog = await client.catalog.get_list()\nexcept KworkAuthError as e:\n print(f\"Auth failed: {e}\")\nexcept KworkApiError as e:\n print(f\"API error [{e.status_code}]: {e.message}\")\n
Documentation auto-generated from source code.
"},{"location":"api-reference/","title":"API Reference","text":"Auto-generated API documentation.
Last updated: kwork-api
"},{"location":"api-reference/#kworkclient","title":"KworkClient","text":"Kwork.ru API client.
Usage: # Login with credentials client = await KworkClient.login(\"username\", \"password\")
# Or restore from token\nclient = KworkClient(token=\"your_web_auth_token\")\n\n# Make requests\ncatalog = await client.catalog.get_list(page=1)\n
"},{"location":"api-reference/#methods","title":"Methods","text":""},{"location":"api-reference/#catalog","title":"catalog()","text":"Catalog API.
"},{"location":"api-reference/#projects","title":"projects()","text":"Projects API.
"},{"location":"api-reference/#user","title":"user()","text":"User API.
"},{"location":"api-reference/#reference","title":"reference()","text":"Reference data API.
"},{"location":"api-reference/#notifications","title":"notifications()","text":"Notifications API.
"},{"location":"api-reference/#other","title":"other()","text":"Other endpoints.
"},{"location":"api-reference/#catalogapi","title":"CatalogAPI","text":"Catalog/Kworks API endpoints.
"},{"location":"api-reference/#projectsapi","title":"ProjectsAPI","text":"Projects (freelance orders) API endpoints.
"},{"location":"api-reference/#userapi","title":"UserAPI","text":"User API endpoints.
"},{"location":"api-reference/#referenceapi","title":"ReferenceAPI","text":"Reference data (cities, countries, etc.) endpoints.
"},{"location":"api-reference/#notificationsapi","title":"NotificationsAPI","text":"Notifications and messages endpoints.
"},{"location":"api-reference/#otherapi","title":"OtherAPI","text":"Other API endpoints.
"},{"location":"api-reference/#models","title":"Models","text":"Pydantic models used in API responses.
"},{"location":"api-reference/#kworkuser","title":"KworkUser","text":"User information.
"},{"location":"api-reference/#fields","title":"Fields","text":"Field Type Description id - - username - - avatar_url - - is_online - - rating - -"},{"location":"api-reference/#kworkcategory","title":"KworkCategory","text":"Category information.
"},{"location":"api-reference/#fields_1","title":"Fields","text":"Field Type Description id - - name - - slug - - parent_id - -"},{"location":"api-reference/#kwork","title":"Kwork","text":"Kwork (service) information.
"},{"location":"api-reference/#fields_2","title":"Fields","text":"Field Type Description id - - title - - description - - price - - currency - - category_id - - seller - - images - - rating - - reviews_count - - created_at - - updated_at - -"},{"location":"api-reference/#kworkdetails","title":"KworkDetails","text":"Extended kwork details.
"},{"location":"api-reference/#fields_3","title":"Fields","text":"Field Type Description full_description - - requirements - - delivery_time - - revisions - - features - - faq - -"},{"location":"api-reference/#paginationinfo","title":"PaginationInfo","text":"Pagination metadata.
"},{"location":"api-reference/#fields_4","title":"Fields","text":"Field Type Description current_page - - total_pages - - total_items - - items_per_page - - has_next - - has_prev - -"},{"location":"api-reference/#catalogresponse","title":"CatalogResponse","text":"Catalog response with kworks and pagination.
"},{"location":"api-reference/#fields_5","title":"Fields","text":"Field Type Description kworks - - pagination - - filters - - sort_options - -"},{"location":"api-reference/#project","title":"Project","text":"Project (freelance order) information.
"},{"location":"api-reference/#fields_6","title":"Fields","text":"Field Type Description id - - title - - description - - budget - - budget_type - - category_id - - customer - - status - - created_at - - updated_at - - bids_count - - skills - -"},{"location":"api-reference/#projectsresponse","title":"ProjectsResponse","text":"Projects list response.
"},{"location":"api-reference/#fields_7","title":"Fields","text":"Field Type Description projects - - pagination - -"},{"location":"api-reference/#review","title":"Review","text":"Review information.
"},{"location":"api-reference/#fields_8","title":"Fields","text":"Field Type Description id - - rating - - comment - - author - - kwork_id - - created_at - -"},{"location":"api-reference/#reviewsresponse","title":"ReviewsResponse","text":"Reviews list response.
"},{"location":"api-reference/#fields_9","title":"Fields","text":"Field Type Description reviews - - pagination - - average_rating - -"},{"location":"api-reference/#notification","title":"Notification","text":"Notification information.
"},{"location":"api-reference/#fields_10","title":"Fields","text":"Field Type Description id - - type - - title - - message - - is_read - - created_at - - link - -"},{"location":"api-reference/#notificationsresponse","title":"NotificationsResponse","text":"Notifications list response.
"},{"location":"api-reference/#fields_11","title":"Fields","text":"Field Type Description notifications - - unread_count - -"},{"location":"api-reference/#dialog","title":"Dialog","text":"Dialog (chat) information.
"},{"location":"api-reference/#fields_12","title":"Fields","text":"Field Type Description id - - participant - - last_message - - unread_count - - updated_at - -"},{"location":"api-reference/#authresponse","title":"AuthResponse","text":"Authentication response.
"},{"location":"api-reference/#fields_13","title":"Fields","text":"Field Type Description success - - user_id - - username - - web_auth_token - - message - -"},{"location":"api-reference/#errordetail","title":"ErrorDetail","text":"Error detail from API.
"},{"location":"api-reference/#fields_14","title":"Fields","text":"Field Type Description code - - message - - field - -"},{"location":"api-reference/#apierrorresponse","title":"APIErrorResponse","text":"Standard API error response.
"},{"location":"api-reference/#fields_15","title":"Fields","text":"Field Type Description success - - errors - - message - -"},{"location":"api-reference/#city","title":"City","text":"City information.
"},{"location":"api-reference/#fields_16","title":"Fields","text":"Field Type Description id - - name - - country_id - -"},{"location":"api-reference/#country","title":"Country","text":"Country information.
"},{"location":"api-reference/#fields_17","title":"Fields","text":"Field Type Description id - - name - - code - - cities - -"},{"location":"api-reference/#timezone","title":"TimeZone","text":"Timezone information.
"},{"location":"api-reference/#fields_18","title":"Fields","text":"Field Type Description id - - name - - offset - -"},{"location":"api-reference/#feature","title":"Feature","text":"Feature/addon information.
"},{"location":"api-reference/#fields_19","title":"Fields","text":"Field Type Description id - - name - - description - - price - - type - -"},{"location":"api-reference/#badge","title":"Badge","text":"User badge information.
"},{"location":"api-reference/#fields_20","title":"Fields","text":"Field Type Description id - - name - - description - - icon_url - -"},{"location":"api-reference/#dataresponse","title":"DataResponse","text":"Generic data response wrapper.
"},{"location":"api-reference/#fields_21","title":"Fields","text":"Field Type Description success - - data - - message - -"},{"location":"api-reference/#errors","title":"Errors","text":"Exception classes for error handling.
"},{"location":"api-reference/#kworkerror","title":"KworkError","text":"Base exception for all Kwork API errors.
"},{"location":"api-reference/#kworkautherror","title":"KworkAuthError","text":"Authentication/authorization error.
"},{"location":"api-reference/#kworkapierror","title":"KworkApiError","text":"API request error (4xx, 5xx).
"},{"location":"api-reference/#kworknotfounderror","title":"KworkNotFoundError","text":"Resource not found (404).
"},{"location":"api-reference/#kworkratelimiterror","title":"KworkRateLimitError","text":"Rate limit exceeded (429).
"},{"location":"api-reference/#kworkvalidationerror","title":"KworkValidationError","text":"Validation error (400).
"},{"location":"api-reference/#kworknetworkerror","title":"KworkNetworkError","text":"Network/connection error.
"},{"location":"examples/","title":"Usage Examples","text":""},{"location":"examples/#catalog","title":"Catalog","text":""},{"location":"examples/#get-catalog-list","title":"Get Catalog List","text":"from kwork_api import KworkClient\n\nasync with KworkClient(token=\"token\") as client:\n catalog = await client.catalog.get_list(page=1, category_id=5)\n\n for kwork in catalog.kworks:\n print(f\"{kwork.title}: {kwork.price} RUB\")\n\n # Pagination\n if catalog.pagination:\n print(f\"Page {catalog.pagination.current_page} of {catalog.pagination.total_pages}\")\n
"},{"location":"examples/#get-kwork-details","title":"Get Kwork Details","text":"details = await client.catalog.get_details(kwork_id=123)\n\nprint(f\"Title: {details.title}\")\nprint(f\"Price: {details.price}\")\nprint(f\"Description: {details.full_description}\")\nprint(f\"Delivery: {details.delivery_time} days\")\n
"},{"location":"examples/#projects","title":"Projects","text":""},{"location":"examples/#get-projects-list","title":"Get Projects List","text":"projects = await client.projects.get_list(page=1)\n\nfor project in projects.projects:\n print(f\"{project.title} - {project.budget} RUB\")\n
"},{"location":"examples/#get-customer-orders","title":"Get Customer Orders","text":"orders = await client.projects.get_payer_orders()\n\nfor order in orders:\n print(f\"Order #{order.id}: {order.status}\")\n
"},{"location":"examples/#get-performer-orders","title":"Get Performer Orders","text":"orders = await client.projects.get_worker_orders()\n\nfor order in orders:\n print(f\"Work #{order.id}: {order.status}\")\n
"},{"location":"examples/#user","title":"User","text":""},{"location":"examples/#get-user-info","title":"Get User Info","text":"user_info = await client.user.get_info()\nprint(f\"Username: {user_info.get('username')}\")\n
"},{"location":"examples/#get-reviews","title":"Get Reviews","text":"reviews = await client.user.get_reviews(page=1)\n\nfor review in reviews.reviews:\n print(f\"Rating: {review.rating}/5 - {review.comment}\")\n
"},{"location":"examples/#get-favorite-kworks","title":"Get Favorite Kworks","text":"favorites = await client.user.get_favorite_kworks()\n\nfor kwork in favorites:\n print(f\"Favorite: {kwork.title}\")\n
"},{"location":"examples/#reference-data","title":"Reference Data","text":""},{"location":"examples/#get-cities","title":"Get Cities","text":"cities = await client.reference.get_cities()\n\nfor city in cities:\n print(f\"{city.id}: {city.name}\")\n
"},{"location":"examples/#get-countries","title":"Get Countries","text":"countries = await client.reference.get_countries()\n\nfor country in countries:\n print(f\"{country.id}: {country.name}\")\n
"},{"location":"examples/#get-timezones","title":"Get Timezones","text":"timezones = await client.reference.get_timezones()\n\nfor tz in timezones:\n print(f\"{tz.id}: {tz.name} ({tz.offset})\")\n
"},{"location":"examples/#notifications","title":"Notifications","text":""},{"location":"examples/#get-notifications","title":"Get Notifications","text":"notifications = await client.notifications.get_list()\n\nfor notif in notifications.notifications:\n print(f\"{notif.title}: {notif.message}\")\n\nprint(f\"Unread: {notifications.unread_count}\")\n
"},{"location":"examples/#fetch-new-notifications","title":"Fetch New Notifications","text":"new_notifications = await client.notifications.fetch()\nprint(f\"New: {len(new_notifications.notifications)}\")\n
"},{"location":"examples/#get-dialogs","title":"Get Dialogs","text":"dialogs = await client.notifications.get_dialogs()\n\nfor dialog in dialogs:\n print(f\"Dialog with {dialog.participant.username}: {dialog.last_message}\")\n
"},{"location":"examples/#error-handling","title":"Error Handling","text":"from kwork_api import KworkAuthError, KworkApiError, KworkNotFoundError\n\ntry:\n catalog = await client.catalog.get_list()\nexcept KworkAuthError as e:\n print(f\"Authentication failed: {e}\")\nexcept KworkNotFoundError as e:\n print(f\"Resource not found: {e}\")\nexcept KworkApiError as e:\n print(f\"API error [{e.status_code}]: {e.message}\")\nexcept Exception as e:\n print(f\"Unexpected error: {e}\")\n
"},{"location":"examples/#rate-limiting","title":"Rate Limiting","text":"import asyncio\n\nasync def fetch_all_pages():\n all_kworks = []\n\n for page in range(1, 10):\n try:\n catalog = await client.catalog.get_list(page=page)\n all_kworks.extend(catalog.kworks)\n\n if not catalog.pagination or not catalog.pagination.has_next:\n break\n\n # Delay to avoid rate limiting\n await asyncio.sleep(1)\n\n except KworkRateLimitError:\n print(\"Rate limited, waiting...\")\n await asyncio.sleep(5)\n\n return all_kworks\n
"},{"location":"examples/#pagination-helper","title":"Pagination Helper","text":"async def fetch_all_catalog():\n \"\"\"Fetch all kworks from catalog with pagination.\"\"\"\n all_kworks = []\n page = 1\n\n while True:\n catalog = await client.catalog.get_list(page=page)\n all_kworks.extend(catalog.kworks)\n\n if not catalog.pagination or not catalog.pagination.has_next:\n break\n\n page += 1\n await asyncio.sleep(0.5) # Rate limiting\n\n return all_kworks\n
More examples in the API Reference.
"}]}
\ No newline at end of file
+{"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 Documentation","text":"Unofficial Python client for Kwork.ru API.
"},{"location":"#quick-start","title":"Quick Start","text":""},{"location":"#installation","title":"Installation","text":"pip install kwork-api\n
"},{"location":"#authentication","title":"Authentication","text":"from kwork_api import KworkClient\n\n# Login with credentials\nclient = await KworkClient.login(\"username\", \"password\")\n\n# Or restore from token\nclient = KworkClient(token=\"your_web_auth_token\")\n
"},{"location":"#basic-usage","title":"Basic Usage","text":"async with KworkClient(token=\"token\") as client:\n # Get catalog\n catalog = await client.catalog.get_list(page=1)\n\n # Get kwork details\n details = await client.catalog.get_details(kwork_id=123)\n\n # Get projects\n projects = await client.projects.get_list()\n
"},{"location":"#documentation-sections","title":"Documentation Sections","text":" - API Reference \u2014 All endpoints and methods
- Models \u2014 Pydantic models
- Errors \u2014 Exception classes
- Examples \u2014 Usage examples
"},{"location":"#features","title":"Features","text":" - \u2705 Full API coverage (45 endpoints)
- \u2705 Async/await support
- \u2705 Pydantic models for type safety
- \u2705 Clear error handling
- \u2705 Session management
"},{"location":"#rate-limiting","title":"Rate Limiting","text":"Rate limiting is not implemented in the library. Handle it in your code:
import asyncio\n\nfor page in range(1, 10):\n catalog = await client.catalog.get_list(page=page)\n await asyncio.sleep(1) # 1 second delay\n
"},{"location":"#error-handling","title":"Error Handling","text":"from kwork_api import KworkAuthError, KworkApiError\n\ntry:\n catalog = await client.catalog.get_list()\nexcept KworkAuthError as e:\n print(f\"Auth failed: {e}\")\nexcept KworkApiError as e:\n print(f\"API error [{e.status_code}]: {e.message}\")\n
Documentation auto-generated from source code.
"},{"location":"api-reference/","title":"API Reference","text":"Auto-generated API documentation using mkdocstrings.
"},{"location":"api-reference/#client","title":"Client","text":""},{"location":"api-reference/#kwork_api.client.KworkClient","title":"kwork_api.client.KworkClient","text":"KworkClient(\n token=None, cookies=None, timeout=30.0, base_url=None\n)\n
Kwork.ru API client.
Usage Initialize client.
Parameters:
Name Type Description Default token Optional[str] Web auth token (from getWebAuthToken)
None cookies Optional[dict[str, str]] Session cookies (optional, will be set from token)
None timeout float Request timeout in seconds
30.0 base_url Optional[str] Custom base URL (for testing)
None Source code in 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 Initialize client.\n\n Args:\n token: Web auth token (from getWebAuthToken)\n cookies: Session cookies (optional, will be set from token)\n timeout: Request timeout in seconds\n base_url: Custom base URL (for testing)\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-reference/#kwork_api.client.KworkClient--login-with-credentials","title":"Login with credentials","text":"client = await KworkClient.login(\"username\", \"password\")
"},{"location":"api-reference/#kwork_api.client.KworkClient--or-restore-from-token","title":"Or restore from token","text":"client = KworkClient(token=\"your_web_auth_token\")
"},{"location":"api-reference/#kwork_api.client.KworkClient--make-requests","title":"Make requests","text":"catalog = await client.catalog.get_list(page=1)
"},{"location":"api-reference/#kwork_api.client.KworkClient-attributes","title":"Attributes","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.catalog","title":"catalog property","text":"catalog\n
Catalog API.
"},{"location":"api-reference/#kwork_api.client.KworkClient.notifications","title":"notifications property","text":"notifications\n
Notifications API.
"},{"location":"api-reference/#kwork_api.client.KworkClient.other","title":"other property","text":"other\n
Other endpoints.
"},{"location":"api-reference/#kwork_api.client.KworkClient.projects","title":"projects property","text":"projects\n
Projects API.
"},{"location":"api-reference/#kwork_api.client.KworkClient.reference","title":"reference property","text":"reference\n
Reference data API.
"},{"location":"api-reference/#kwork_api.client.KworkClient.user","title":"user property","text":"user\n
User API.
"},{"location":"api-reference/#kwork_api.client.KworkClient-classes","title":"Classes","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.CatalogAPI","title":"CatalogAPI","text":"CatalogAPI(client)\n
Catalog/Kworks API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.CatalogAPI-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.CatalogAPI.get_details","title":"get_details async","text":"get_details(kwork_id)\n
Get kwork details.
Parameters:
Name Type Description Default kwork_id int Kwork ID
required Returns:
Type Description KworkDetails KworkDetails with full information
Source code in src/kwork_api/client.py async def get_details(self, kwork_id: int) -> KworkDetails:\n \"\"\"\n Get kwork details.\n\n Args:\n kwork_id: Kwork ID\n\n Returns:\n KworkDetails with full information\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-reference/#kwork_api.client.KworkClient.CatalogAPI.get_details_extra","title":"get_details_extra async","text":"get_details_extra(kwork_id)\n
Get additional kwork details.
Parameters:
Name Type Description Default kwork_id int Kwork ID
required Returns:
Type Description dict[str, Any] Extra details dict
Source code in src/kwork_api/client.py async def get_details_extra(self, kwork_id: int) -> dict[str, Any]:\n \"\"\"\n Get additional kwork details.\n\n Args:\n kwork_id: Kwork ID\n\n Returns:\n Extra details dict\n \"\"\"\n return await self.client._request(\n \"POST\",\n \"/getKworkDetailsExtra\",\n json={\"kwork_id\": kwork_id},\n )\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.CatalogAPI.get_list","title":"get_list async","text":"get_list(page=1, category_id=None, sort='recommend')\n
Get kworks catalog.
Parameters:
Name Type Description Default page int Page number
1 category_id Optional[int] Category filter
None sort str Sort option (recommend, price_asc, price_desc, etc.)
'recommend' Returns:
Type Description CatalogResponse CatalogResponse with kworks and pagination
Source code in 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 Get kworks catalog.\n\n Args:\n page: Page number\n category_id: Category filter\n sort: Sort option (recommend, price_asc, price_desc, etc.)\n\n Returns:\n CatalogResponse with kworks and pagination\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-reference/#kwork_api.client.KworkClient.NotificationsAPI","title":"NotificationsAPI","text":"NotificationsAPI(client)\n
Notifications and messages endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.NotificationsAPI-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.NotificationsAPI.fetch","title":"fetch async","text":"fetch()\n
Fetch new notifications.
Source code in src/kwork_api/client.py async def fetch(self) -> NotificationsResponse:\n \"\"\"Fetch new notifications.\"\"\"\n data = await self.client._request(\"POST\", \"/notificationsFetch\")\n return NotificationsResponse.model_validate(data)\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.NotificationsAPI.get_blocked_dialogs","title":"get_blocked_dialogs async","text":"get_blocked_dialogs()\n
Get blocked dialogs.
Source code in src/kwork_api/client.py async def get_blocked_dialogs(self) -> list[Dialog]:\n \"\"\"Get blocked dialogs.\"\"\"\n data = await self.client._request(\"POST\", \"/blockedDialogList\")\n return [Dialog.model_validate(d) for d in data.get(\"dialogs\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.NotificationsAPI.get_dialogs","title":"get_dialogs async","text":"get_dialogs()\n
Get dialogs list.
Source code in src/kwork_api/client.py async def get_dialogs(self) -> list[Dialog]:\n \"\"\"Get dialogs list.\"\"\"\n data = await self.client._request(\"POST\", \"/dialogs\")\n return [Dialog.model_validate(d) for d in data.get(\"dialogs\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.NotificationsAPI.get_list","title":"get_list async","text":"get_list()\n
Get notifications list.
Source code in src/kwork_api/client.py async def get_list(self) -> NotificationsResponse:\n \"\"\"Get notifications list.\"\"\"\n data = await self.client._request(\"POST\", \"/notifications\")\n return NotificationsResponse.model_validate(data)\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI","title":"OtherAPI","text":"OtherAPI(client)\n
Other API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_actor","title":"get_actor async","text":"get_actor()\n
Get actor info.
Source code in src/kwork_api/client.py async def get_actor(self) -> dict[str, Any]:\n \"\"\"Get actor info.\"\"\"\n return await self.client._request(\"POST\", \"/actor\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_channel","title":"get_channel async","text":"get_channel()\n
Get channel info.
Source code in src/kwork_api/client.py async def get_channel(self) -> dict[str, Any]:\n \"\"\"Get channel info.\"\"\"\n return await self.client._request(\"POST\", \"/getChannel\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_exchange_info","title":"get_exchange_info async","text":"get_exchange_info()\n
Get exchange info.
Source code in src/kwork_api/client.py async def get_exchange_info(self) -> dict[str, Any]:\n \"\"\"Get exchange info.\"\"\"\n return await self.client._request(\"POST\", \"/exchangeInfo\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_favorite_categories","title":"get_favorite_categories async","text":"get_favorite_categories()\n
Get favorite categories.
Source code in src/kwork_api/client.py async def get_favorite_categories(self) -> list[int]:\n \"\"\"Get favorite categories.\"\"\"\n data = await self.client._request(\"POST\", \"/favoriteCategories\")\n return data.get(\"categories\", [])\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_in_app_notification","title":"get_in_app_notification async","text":"get_in_app_notification()\n
Get in-app notification.
Source code in src/kwork_api/client.py async def get_in_app_notification(self) -> dict[str, Any]:\n \"\"\"Get in-app notification.\"\"\"\n return await self.client._request(\"POST\", \"/getInAppNotification\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_kworks_status","title":"get_kworks_status async","text":"get_kworks_status()\n
Get kworks status.
Source code in src/kwork_api/client.py async def get_kworks_status(self) -> dict[str, Any]:\n \"\"\"Get kworks status.\"\"\"\n return await self.client._request(\"POST\", \"/kworksStatusList\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_offers","title":"get_offers async","text":"get_offers()\n
Get offers.
Source code in src/kwork_api/client.py async def get_offers(self) -> dict[str, Any]:\n \"\"\"Get offers.\"\"\"\n return await self.client._request(\"POST\", \"/offers\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_security_user_data","title":"get_security_user_data async","text":"get_security_user_data()\n
Get security user data.
Source code in src/kwork_api/client.py async def get_security_user_data(self) -> dict[str, Any]:\n \"\"\"Get security user data.\"\"\"\n return await self.client._request(\"POST\", \"/getSecurityUserData\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_viewed_kworks","title":"get_viewed_kworks async","text":"get_viewed_kworks()\n
Get viewed kworks.
Source code in src/kwork_api/client.py async def get_viewed_kworks(self) -> list[Kwork]:\n \"\"\"Get viewed kworks.\"\"\"\n data = await self.client._request(\"POST\", \"/viewedCatalogKworks\")\n return [Kwork.model_validate(k) for k in data.get(\"kworks\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_wants","title":"get_wants async","text":"get_wants()\n
Get user wants.
Source code in src/kwork_api/client.py async def get_wants(self) -> dict[str, Any]:\n \"\"\"Get user wants.\"\"\"\n return await self.client._request(\"POST\", \"/myWants\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.get_wants_status","title":"get_wants_status async","text":"get_wants_status()\n
Get wants status.
Source code in src/kwork_api/client.py async def get_wants_status(self) -> dict[str, Any]:\n \"\"\"Get wants status.\"\"\"\n return await self.client._request(\"POST\", \"/wantsStatusList\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.go_offline","title":"go_offline async","text":"go_offline()\n
Set user status to offline.
Source code in src/kwork_api/client.py async def go_offline(self) -> dict[str, Any]:\n \"\"\"Set user status to offline.\"\"\"\n return await self.client._request(\"POST\", \"/offline\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.OtherAPI.is_dialog_allow","title":"is_dialog_allow async","text":"is_dialog_allow(user_id)\n
Check if dialog is allowed.
Source code in src/kwork_api/client.py async def is_dialog_allow(self, user_id: int) -> bool:\n \"\"\"Check if dialog is allowed.\"\"\"\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-reference/#kwork_api.client.KworkClient.OtherAPI.update_settings","title":"update_settings async","text":"update_settings(settings)\n
Update user settings.
Source code in src/kwork_api/client.py async def update_settings(self, settings: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Update user settings.\"\"\"\n return await self.client._request(\"POST\", \"/updateSettings\", json=settings)\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ProjectsAPI","title":"ProjectsAPI","text":"ProjectsAPI(client)\n
Projects (freelance orders) API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ProjectsAPI-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.ProjectsAPI.get_list","title":"get_list async","text":"get_list(page=1, category_id=None)\n
Get projects list.
Parameters:
Name Type Description Default page int Page number
1 category_id Optional[int] Category filter
None Returns:
Type Description ProjectsResponse ProjectsResponse with projects and pagination
Source code in 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 Get projects list.\n\n Args:\n page: Page number\n category_id: Category filter\n\n Returns:\n ProjectsResponse with projects and pagination\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-reference/#kwork_api.client.KworkClient.ProjectsAPI.get_payer_orders","title":"get_payer_orders async","text":"get_payer_orders()\n
Get orders where user is customer.
Returns:
Type Description list[Project] List of projects
Source code in src/kwork_api/client.py async def get_payer_orders(self) -> list[Project]:\n \"\"\"\n Get orders where user is customer.\n\n Returns:\n List of projects\n \"\"\"\n data = await self.client._request(\"POST\", \"/payerOrders\")\n return [Project.model_validate(p) for p in data.get(\"orders\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ProjectsAPI.get_worker_orders","title":"get_worker_orders async","text":"get_worker_orders()\n
Get orders where user is performer.
Returns:
Type Description list[Project] List of projects
Source code in src/kwork_api/client.py async def get_worker_orders(self) -> list[Project]:\n \"\"\"\n Get orders where user is performer.\n\n Returns:\n List of projects\n \"\"\"\n data = await self.client._request(\"POST\", \"/workerOrders\")\n return [Project.model_validate(p) for p in data.get(\"orders\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI","title":"ReferenceAPI","text":"ReferenceAPI(client)\n
Reference data (cities, countries, etc.) endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI.get_badges_info","title":"get_badges_info async","text":"get_badges_info()\n
Get badges info.
Source code in src/kwork_api/client.py async def get_badges_info(self) -> list[Badge]:\n \"\"\"Get badges info.\"\"\"\n data = await self.client._request(\"POST\", \"/getBadgesInfo\")\n return [Badge.model_validate(b) for b in data.get(\"badges\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI.get_cities","title":"get_cities async","text":"get_cities()\n
Get all cities.
Source code in src/kwork_api/client.py async def get_cities(self) -> list[City]:\n \"\"\"Get all cities.\"\"\"\n data = await self.client._request(\"POST\", \"/cities\")\n return [City.model_validate(c) for c in data.get(\"cities\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI.get_countries","title":"get_countries async","text":"get_countries()\n
Get all countries.
Source code in src/kwork_api/client.py async def get_countries(self) -> list[Country]:\n \"\"\"Get all countries.\"\"\"\n data = await self.client._request(\"POST\", \"/countries\")\n return [Country.model_validate(c) for c in data.get(\"countries\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI.get_features","title":"get_features async","text":"get_features()\n
Get available features.
Source code in src/kwork_api/client.py async def get_features(self) -> list[Feature]:\n \"\"\"Get available features.\"\"\"\n data = await self.client._request(\"POST\", \"/getAvailableFeatures\")\n return [Feature.model_validate(f) for f in data.get(\"features\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI.get_public_features","title":"get_public_features async","text":"get_public_features()\n
Get public features.
Source code in src/kwork_api/client.py async def get_public_features(self) -> list[Feature]:\n \"\"\"Get public features.\"\"\"\n data = await self.client._request(\"POST\", \"/getPublicFeatures\")\n return [Feature.model_validate(f) for f in data.get(\"features\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.ReferenceAPI.get_timezones","title":"get_timezones async","text":"get_timezones()\n
Get all timezones.
Source code in src/kwork_api/client.py async def get_timezones(self) -> list[TimeZone]:\n \"\"\"Get all timezones.\"\"\"\n data = await self.client._request(\"POST\", \"/timezones\")\n return [TimeZone.model_validate(t) for t in data.get(\"timezones\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.UserAPI","title":"UserAPI","text":"UserAPI(client)\n
User API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.UserAPI-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.UserAPI.get_favorite_kworks","title":"get_favorite_kworks async","text":"get_favorite_kworks()\n
Get favorite kworks.
Returns:
Type Description list[Kwork] List of kworks
Source code in src/kwork_api/client.py async def get_favorite_kworks(self) -> list[Kwork]:\n \"\"\"\n Get favorite kworks.\n\n Returns:\n List of kworks\n \"\"\"\n data = await self.client._request(\"POST\", \"/favoriteKworks\")\n return [Kwork.model_validate(k) for k in data.get(\"kworks\", [])]\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.UserAPI.get_info","title":"get_info async","text":"get_info()\n
Get current user info.
Returns:
Type Description dict[str, Any] User info dict
Source code in src/kwork_api/client.py async def get_info(self) -> dict[str, Any]:\n \"\"\"\n Get current user info.\n\n Returns:\n User info dict\n \"\"\"\n return await self.client._request(\"POST\", \"/user\")\n
"},{"location":"api-reference/#kwork_api.client.KworkClient.UserAPI.get_reviews","title":"get_reviews async","text":"get_reviews(user_id=None, page=1)\n
Get user reviews.
Parameters:
Name Type Description Default user_id Optional[int] User ID (None for current user)
None page int Page number
1 Returns:
Type Description ReviewsResponse ReviewsResponse
Source code in 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 Get user reviews.\n\n Args:\n user_id: User ID (None for current user)\n page: Page number\n\n Returns:\n ReviewsResponse\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-reference/#kwork_api.client.KworkClient-functions","title":"Functions","text":""},{"location":"api-reference/#kwork_api.client.KworkClient.close","title":"close async","text":"close()\n
Close HTTP client.
Source code in src/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-reference/#kwork_api.client.KworkClient.login","title":"login async classmethod","text":"login(username, password, timeout=30.0)\n
Login with username and password.
Parameters:
Name Type Description Default username str Kwork username or email
required password str Kwork password
required timeout float Request timeout
30.0 Returns:
Type Description KworkClient Authenticated KworkClient instance
Raises:
Type Description KworkAuthError If login fails
Source code in src/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 Login with username and password.\n\n Args:\n username: Kwork username or email\n password: Kwork password\n timeout: Request timeout\n\n Returns:\n Authenticated KworkClient instance\n\n Raises:\n KworkAuthError: If login fails\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-reference/#models","title":"Models","text":""},{"location":"api-reference/#kwork_api.models.Kwork","title":"kwork_api.models.Kwork","text":" Bases: BaseModel
Kwork (service) information.
"},{"location":"api-reference/#kwork_api.models.KworkDetails","title":"kwork_api.models.KworkDetails","text":" Bases: Kwork
Extended kwork details.
"},{"location":"api-reference/#kwork_api.models.Project","title":"kwork_api.models.Project","text":" Bases: BaseModel
Project (freelance order) information.
"},{"location":"api-reference/#kwork_api.models.CatalogResponse","title":"kwork_api.models.CatalogResponse","text":" Bases: BaseModel
Catalog response with kworks and pagination.
"},{"location":"api-reference/#errors","title":"Errors","text":""},{"location":"api-reference/#kwork_api.errors.KworkError","title":"kwork_api.errors.KworkError","text":"KworkError(message, response=None)\n
Bases: Exception
Base exception for all Kwork API errors.
Source code in src/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-reference/#kwork_api.errors.KworkAuthError","title":"kwork_api.errors.KworkAuthError","text":"KworkAuthError(\n message=\"Authentication failed\", response=None\n)\n
Bases: KworkError
Authentication/authorization error.
Source code in src/kwork_api/errors.py def __init__(self, message: str = \"Authentication failed\", response: Optional[Any] = None):\n super().__init__(message, response)\n
"},{"location":"api-reference/#kwork_api.errors.KworkApiError","title":"kwork_api.errors.KworkApiError","text":"KworkApiError(message, status_code=None, response=None)\n
Bases: KworkError
API request error (4xx, 5xx).
Source code in src/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":"examples/","title":"Usage Examples","text":""},{"location":"examples/#catalog","title":"Catalog","text":""},{"location":"examples/#get-catalog-list","title":"Get Catalog List","text":"from kwork_api import KworkClient\n\nasync with KworkClient(token=\"token\") as client:\n catalog = await client.catalog.get_list(page=1, category_id=5)\n\n for kwork in catalog.kworks:\n print(f\"{kwork.title}: {kwork.price} RUB\")\n\n # Pagination\n if catalog.pagination:\n print(f\"Page {catalog.pagination.current_page} of {catalog.pagination.total_pages}\")\n
"},{"location":"examples/#get-kwork-details","title":"Get Kwork Details","text":"details = await client.catalog.get_details(kwork_id=123)\n\nprint(f\"Title: {details.title}\")\nprint(f\"Price: {details.price}\")\nprint(f\"Description: {details.full_description}\")\nprint(f\"Delivery: {details.delivery_time} days\")\n
"},{"location":"examples/#projects","title":"Projects","text":""},{"location":"examples/#get-projects-list","title":"Get Projects List","text":"projects = await client.projects.get_list(page=1)\n\nfor project in projects.projects:\n print(f\"{project.title} - {project.budget} RUB\")\n
"},{"location":"examples/#get-customer-orders","title":"Get Customer Orders","text":"orders = await client.projects.get_payer_orders()\n\nfor order in orders:\n print(f\"Order #{order.id}: {order.status}\")\n
"},{"location":"examples/#get-performer-orders","title":"Get Performer Orders","text":"orders = await client.projects.get_worker_orders()\n\nfor order in orders:\n print(f\"Work #{order.id}: {order.status}\")\n
"},{"location":"examples/#user","title":"User","text":""},{"location":"examples/#get-user-info","title":"Get User Info","text":"user_info = await client.user.get_info()\nprint(f\"Username: {user_info.get('username')}\")\n
"},{"location":"examples/#get-reviews","title":"Get Reviews","text":"reviews = await client.user.get_reviews(page=1)\n\nfor review in reviews.reviews:\n print(f\"Rating: {review.rating}/5 - {review.comment}\")\n
"},{"location":"examples/#get-favorite-kworks","title":"Get Favorite Kworks","text":"favorites = await client.user.get_favorite_kworks()\n\nfor kwork in favorites:\n print(f\"Favorite: {kwork.title}\")\n
"},{"location":"examples/#reference-data","title":"Reference Data","text":""},{"location":"examples/#get-cities","title":"Get Cities","text":"cities = await client.reference.get_cities()\n\nfor city in cities:\n print(f\"{city.id}: {city.name}\")\n
"},{"location":"examples/#get-countries","title":"Get Countries","text":"countries = await client.reference.get_countries()\n\nfor country in countries:\n print(f\"{country.id}: {country.name}\")\n
"},{"location":"examples/#get-timezones","title":"Get Timezones","text":"timezones = await client.reference.get_timezones()\n\nfor tz in timezones:\n print(f\"{tz.id}: {tz.name} ({tz.offset})\")\n
"},{"location":"examples/#notifications","title":"Notifications","text":""},{"location":"examples/#get-notifications","title":"Get Notifications","text":"notifications = await client.notifications.get_list()\n\nfor notif in notifications.notifications:\n print(f\"{notif.title}: {notif.message}\")\n\nprint(f\"Unread: {notifications.unread_count}\")\n
"},{"location":"examples/#fetch-new-notifications","title":"Fetch New Notifications","text":"new_notifications = await client.notifications.fetch()\nprint(f\"New: {len(new_notifications.notifications)}\")\n
"},{"location":"examples/#get-dialogs","title":"Get Dialogs","text":"dialogs = await client.notifications.get_dialogs()\n\nfor dialog in dialogs:\n print(f\"Dialog with {dialog.participant.username}: {dialog.last_message}\")\n
"},{"location":"examples/#error-handling","title":"Error Handling","text":"from kwork_api import KworkAuthError, KworkApiError, KworkNotFoundError\n\ntry:\n catalog = await client.catalog.get_list()\nexcept KworkAuthError as e:\n print(f\"Authentication failed: {e}\")\nexcept KworkNotFoundError as e:\n print(f\"Resource not found: {e}\")\nexcept KworkApiError as e:\n print(f\"API error [{e.status_code}]: {e.message}\")\nexcept Exception as e:\n print(f\"Unexpected error: {e}\")\n
"},{"location":"examples/#rate-limiting","title":"Rate Limiting","text":"import asyncio\n\nasync def fetch_all_pages():\n all_kworks = []\n\n for page in range(1, 10):\n try:\n catalog = await client.catalog.get_list(page=page)\n all_kworks.extend(catalog.kworks)\n\n if not catalog.pagination or not catalog.pagination.has_next:\n break\n\n # Delay to avoid rate limiting\n await asyncio.sleep(1)\n\n except KworkRateLimitError:\n print(\"Rate limited, waiting...\")\n await asyncio.sleep(5)\n\n return all_kworks\n
"},{"location":"examples/#pagination-helper","title":"Pagination Helper","text":"async def fetch_all_catalog():\n \"\"\"Fetch all kworks from catalog with pagination.\"\"\"\n all_kworks = []\n page = 1\n\n while True:\n catalog = await client.catalog.get_list(page=page)\n all_kworks.extend(catalog.kworks)\n\n if not catalog.pagination or not catalog.pagination.has_next:\n break\n\n page += 1\n await asyncio.sleep(0.5) # Rate limiting\n\n return all_kworks\n
More examples in the API Reference.
"},{"location":"api/client/","title":"Client API","text":""},{"location":"api/client/#kwork_api.client.KworkClient","title":"kwork_api.client.KworkClient","text":"KworkClient(\n token=None, cookies=None, timeout=30.0, base_url=None\n)\n
Kwork.ru API client.
Usage Initialize client.
Parameters:
Name Type Description Default token Optional[str] Web auth token (from getWebAuthToken)
None cookies Optional[dict[str, str]] Session cookies (optional, will be set from token)
None timeout float Request timeout in seconds
30.0 base_url Optional[str] Custom base URL (for testing)
None Source code in 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 Initialize client.\n\n Args:\n token: Web auth token (from getWebAuthToken)\n cookies: Session cookies (optional, will be set from token)\n timeout: Request timeout in seconds\n base_url: Custom base URL (for testing)\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--login-with-credentials","title":"Login with credentials","text":"client = await KworkClient.login(\"username\", \"password\")
"},{"location":"api/client/#kwork_api.client.KworkClient--or-restore-from-token","title":"Or restore from token","text":"client = KworkClient(token=\"your_web_auth_token\")
"},{"location":"api/client/#kwork_api.client.KworkClient--make-requests","title":"Make requests","text":"catalog = await client.catalog.get_list(page=1)
"},{"location":"api/client/#kwork_api.client.KworkClient-attributes","title":"Attributes","text":""},{"location":"api/client/#kwork_api.client.KworkClient.catalog","title":"catalog property","text":"catalog\n
Catalog API.
"},{"location":"api/client/#kwork_api.client.KworkClient.notifications","title":"notifications property","text":"notifications\n
Notifications API.
"},{"location":"api/client/#kwork_api.client.KworkClient.other","title":"other property","text":"other\n
Other endpoints.
"},{"location":"api/client/#kwork_api.client.KworkClient.projects","title":"projects property","text":"projects\n
Projects API.
"},{"location":"api/client/#kwork_api.client.KworkClient.reference","title":"reference property","text":"reference\n
Reference data API.
"},{"location":"api/client/#kwork_api.client.KworkClient.user","title":"user property","text":"user\n
User 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
Catalog/Kworks API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.CatalogAPI.get_details","title":"get_details async","text":"get_details(kwork_id)\n
Get kwork details.
Parameters:
Name Type Description Default kwork_id int Kwork ID
required Returns:
Type Description KworkDetails KworkDetails with full information
Source code in src/kwork_api/client.py async def get_details(self, kwork_id: int) -> KworkDetails:\n \"\"\"\n Get kwork details.\n\n Args:\n kwork_id: Kwork ID\n\n Returns:\n KworkDetails with full information\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
Get additional kwork details.
Parameters:
Name Type Description Default kwork_id int Kwork ID
required Returns:
Type Description dict[str, Any] Extra details dict
Source code in src/kwork_api/client.py async def get_details_extra(self, kwork_id: int) -> dict[str, Any]:\n \"\"\"\n Get additional kwork details.\n\n Args:\n kwork_id: Kwork ID\n\n Returns:\n Extra details dict\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
Get kworks catalog.
Parameters:
Name Type Description Default page int Page number
1 category_id Optional[int] Category filter
None sort str Sort option (recommend, price_asc, price_desc, etc.)
'recommend' Returns:
Type Description CatalogResponse CatalogResponse with kworks and pagination
Source code in 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 Get kworks catalog.\n\n Args:\n page: Page number\n category_id: Category filter\n sort: Sort option (recommend, price_asc, price_desc, etc.)\n\n Returns:\n CatalogResponse with kworks and pagination\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.NotificationsAPI","title":"NotificationsAPI","text":"NotificationsAPI(client)\n
Notifications and messages endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.NotificationsAPI.fetch","title":"fetch async","text":"fetch()\n
Fetch new notifications.
Source code in src/kwork_api/client.py async def fetch(self) -> NotificationsResponse:\n \"\"\"Fetch new notifications.\"\"\"\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
Get blocked dialogs.
Source code in src/kwork_api/client.py async def get_blocked_dialogs(self) -> list[Dialog]:\n \"\"\"Get blocked dialogs.\"\"\"\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
Get dialogs list.
Source code in src/kwork_api/client.py async def get_dialogs(self) -> list[Dialog]:\n \"\"\"Get dialogs list.\"\"\"\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
Get notifications list.
Source code in src/kwork_api/client.py async def get_list(self) -> NotificationsResponse:\n \"\"\"Get notifications list.\"\"\"\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
Other API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.OtherAPI.get_actor","title":"get_actor async","text":"get_actor()\n
Get actor info.
Source code in src/kwork_api/client.py async def get_actor(self) -> dict[str, Any]:\n \"\"\"Get actor info.\"\"\"\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
Get channel info.
Source code in src/kwork_api/client.py async def get_channel(self) -> dict[str, Any]:\n \"\"\"Get channel info.\"\"\"\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
Get exchange info.
Source code in src/kwork_api/client.py async def get_exchange_info(self) -> dict[str, Any]:\n \"\"\"Get exchange info.\"\"\"\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
Get favorite categories.
Source code in src/kwork_api/client.py async def get_favorite_categories(self) -> list[int]:\n \"\"\"Get favorite categories.\"\"\"\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
Get in-app notification.
Source code in src/kwork_api/client.py async def get_in_app_notification(self) -> dict[str, Any]:\n \"\"\"Get in-app notification.\"\"\"\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
Get kworks status.
Source code in src/kwork_api/client.py async def get_kworks_status(self) -> dict[str, Any]:\n \"\"\"Get kworks status.\"\"\"\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
Get offers.
Source code in src/kwork_api/client.py async def get_offers(self) -> dict[str, Any]:\n \"\"\"Get offers.\"\"\"\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
Get security user data.
Source code in src/kwork_api/client.py async def get_security_user_data(self) -> dict[str, Any]:\n \"\"\"Get security user data.\"\"\"\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
Get viewed kworks.
Source code in src/kwork_api/client.py async def get_viewed_kworks(self) -> list[Kwork]:\n \"\"\"Get viewed kworks.\"\"\"\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
Get user wants.
Source code in src/kwork_api/client.py async def get_wants(self) -> dict[str, Any]:\n \"\"\"Get user wants.\"\"\"\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
Get wants status.
Source code in src/kwork_api/client.py async def get_wants_status(self) -> dict[str, Any]:\n \"\"\"Get wants status.\"\"\"\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
Set user status to offline.
Source code in src/kwork_api/client.py async def go_offline(self) -> dict[str, Any]:\n \"\"\"Set user status to offline.\"\"\"\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
Check if dialog is allowed.
Source code in src/kwork_api/client.py async def is_dialog_allow(self, user_id: int) -> bool:\n \"\"\"Check if dialog is allowed.\"\"\"\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
Update user settings.
Source code in src/kwork_api/client.py async def update_settings(self, settings: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Update user settings.\"\"\"\n return await self.client._request(\"POST\", \"/updateSettings\", json=settings)\n
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI","title":"ProjectsAPI","text":"ProjectsAPI(client)\n
Projects (freelance orders) API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.ProjectsAPI.get_list","title":"get_list async","text":"get_list(page=1, category_id=None)\n
Get projects list.
Parameters:
Name Type Description Default page int Page number
1 category_id Optional[int] Category filter
None Returns:
Type Description ProjectsResponse ProjectsResponse with projects and pagination
Source code in 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 Get projects list.\n\n Args:\n page: Page number\n category_id: Category filter\n\n Returns:\n ProjectsResponse with projects and pagination\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_payer_orders","title":"get_payer_orders async","text":"get_payer_orders()\n
Get orders where user is customer.
Returns:
Type Description list[Project] List of projects
Source code in src/kwork_api/client.py async def get_payer_orders(self) -> list[Project]:\n \"\"\"\n Get orders where user is customer.\n\n Returns:\n List of projects\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
Get orders where user is performer.
Returns:
Type Description list[Project] List of projects
Source code in src/kwork_api/client.py async def get_worker_orders(self) -> list[Project]:\n \"\"\"\n Get orders where user is performer.\n\n Returns:\n List of projects\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
Reference data (cities, countries, etc.) endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"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_info async","text":"get_badges_info()\n
Get badges info.
Source code in src/kwork_api/client.py async def get_badges_info(self) -> list[Badge]:\n \"\"\"Get badges info.\"\"\"\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
Get all cities.
Source code in src/kwork_api/client.py async def get_cities(self) -> list[City]:\n \"\"\"Get all cities.\"\"\"\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
Get all countries.
Source code in src/kwork_api/client.py async def get_countries(self) -> list[Country]:\n \"\"\"Get all countries.\"\"\"\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
Get available features.
Source code in src/kwork_api/client.py async def get_features(self) -> list[Feature]:\n \"\"\"Get available features.\"\"\"\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
Get public features.
Source code in src/kwork_api/client.py async def get_public_features(self) -> list[Feature]:\n \"\"\"Get public features.\"\"\"\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
Get all timezones.
Source code in src/kwork_api/client.py async def get_timezones(self) -> list[TimeZone]:\n \"\"\"Get all timezones.\"\"\"\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
User API endpoints.
Source code in src/kwork_api/client.py def __init__(self, client: \"KworkClient\"):\n self.client = client\n
"},{"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_kworks async","text":"get_favorite_kworks()\n
Get favorite kworks.
Returns:
Type Description list[Kwork] List of kworks
Source code in src/kwork_api/client.py async def get_favorite_kworks(self) -> list[Kwork]:\n \"\"\"\n Get favorite kworks.\n\n Returns:\n List of kworks\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
Get current user info.
Returns:
Type Description dict[str, Any] User info dict
Source code in src/kwork_api/client.py async def get_info(self) -> dict[str, Any]:\n \"\"\"\n Get current user info.\n\n Returns:\n User info dict\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
Get user reviews.
Parameters:
Name Type Description Default user_id Optional[int] User ID (None for current user)
None page int Page number
1 Returns:
Type Description ReviewsResponse ReviewsResponse
Source code in 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 Get user reviews.\n\n Args:\n user_id: User ID (None for current user)\n page: Page number\n\n Returns:\n ReviewsResponse\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-functions","title":"Functions","text":""},{"location":"api/client/#kwork_api.client.KworkClient.close","title":"close async","text":"close()\n
Close HTTP client.
Source code in src/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
Login with username and password.
Parameters:
Name Type Description Default username str Kwork username or email
required password str Kwork password
required timeout float Request timeout
30.0 Returns:
Type Description KworkClient Authenticated KworkClient instance
Raises:
Type Description KworkAuthError If login fails
Source code in src/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 Login with username and password.\n\n Args:\n username: Kwork username or email\n password: Kwork password\n timeout: Request timeout\n\n Returns:\n Authenticated KworkClient instance\n\n Raises:\n KworkAuthError: If login fails\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/errors/","title":"Errors","text":"Exception classes for error handling.
"},{"location":"api/errors/#kworkerror","title":"KworkError","text":""},{"location":"api/errors/#kwork_api.errors.KworkError","title":"kwork_api.errors.KworkError","text":"KworkError(message, response=None)\n
Bases: Exception
Base exception for all Kwork API errors.
Source code in src/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/#kworkautherror","title":"KworkAuthError","text":""},{"location":"api/errors/#kwork_api.errors.KworkAuthError","title":"kwork_api.errors.KworkAuthError","text":"KworkAuthError(\n message=\"Authentication failed\", response=None\n)\n
Bases: KworkError
Authentication/authorization error.
Source code in src/kwork_api/errors.py def __init__(self, message: str = \"Authentication failed\", response: Optional[Any] = None):\n super().__init__(message, response)\n
"},{"location":"api/errors/#kworkapierror","title":"KworkApiError","text":""},{"location":"api/errors/#kwork_api.errors.KworkApiError","title":"kwork_api.errors.KworkApiError","text":"KworkApiError(message, status_code=None, response=None)\n
Bases: KworkError
API request error (4xx, 5xx).
Source code in src/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/#kworknotfounderror","title":"KworkNotFoundError","text":""},{"location":"api/errors/#kwork_api.errors.KworkNotFoundError","title":"kwork_api.errors.KworkNotFoundError","text":"KworkNotFoundError(resource, response=None)\n
Bases: KworkApiError
Resource not found (404).
Source code in src/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/#kworkratelimiterror","title":"KworkRateLimitError","text":""},{"location":"api/errors/#kwork_api.errors.KworkRateLimitError","title":"kwork_api.errors.KworkRateLimitError","text":"KworkRateLimitError(\n message=\"Rate limit exceeded\", response=None\n)\n
Bases: KworkApiError
Rate limit exceeded (429).
Source code in src/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/models/","title":"Models","text":"Pydantic models used in API responses.
"},{"location":"api/models/#kwork","title":"Kwork","text":""},{"location":"api/models/#kwork_api.models.Kwork","title":"kwork_api.models.Kwork","text":" Bases: BaseModel
Kwork (service) information.
"},{"location":"api/models/#kworkdetails","title":"KworkDetails","text":""},{"location":"api/models/#kwork_api.models.KworkDetails","title":"kwork_api.models.KworkDetails","text":" Bases: Kwork
Extended kwork details.
"},{"location":"api/models/#project","title":"Project","text":""},{"location":"api/models/#kwork_api.models.Project","title":"kwork_api.models.Project","text":" Bases: BaseModel
Project (freelance order) information.
"},{"location":"api/models/#catalogresponse","title":"CatalogResponse","text":""},{"location":"api/models/#kwork_api.models.CatalogResponse","title":"kwork_api.models.CatalogResponse","text":" Bases: BaseModel
Catalog response with kworks and pagination.
"},{"location":"api/models/#paginationinfo","title":"PaginationInfo","text":""},{"location":"api/models/#kwork_api.models.PaginationInfo","title":"kwork_api.models.PaginationInfo","text":" Bases: BaseModel
Pagination metadata.
"}]}
\ No newline at end of file
diff --git a/site/sitemap.xml b/site/sitemap.xml
index 961b512..bd271b5 100644
--- a/site/sitemap.xml
+++ b/site/sitemap.xml
@@ -12,4 +12,16 @@
https://github.com/claw/kwork-api/examples/
2026-03-23
+
+ https://github.com/claw/kwork-api/api/client/
+ 2026-03-23
+
+
+ https://github.com/claw/kwork-api/api/errors/
+ 2026-03-23
+
+
+ https://github.com/claw/kwork-api/api/models/
+ 2026-03-23
+
\ No newline at end of file
diff --git a/site/sitemap.xml.gz b/site/sitemap.xml.gz
index 88d4371..2dadf0c 100644
Binary files a/site/sitemap.xml.gz and b/site/sitemap.xml.gz differ