From 1db59149f443c9ff951e952ceb8211cfbfdcb287 Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:32:43 +0300 Subject: [PATCH 1/8] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=B8=D0=BB=20get=5Fhastags=20=D0=BD=D0=B0=20get=5Fhashtags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/itd/client.py b/itd/client.py index 714f5cd..54c4786 100644 --- a/itd/client.py +++ b/itd/client.py @@ -1,3 +1,4 @@ +from warnings import deprecated from uuid import UUID from _io import BufferedReader from typing import cast @@ -490,11 +491,23 @@ class Client: raise Forbidden('delete comment') res.raise_for_status() - + @deprecated("get_hastags устарел используйте get_hashtags") @refresh_on_error def get_hastags(self, limit: int = 10) -> list[Hashtag]: """Получить список популярных хэштэгов + Args: + limit (int, optional): Лимит. Defaults to 10. + + Returns: + list[Hashtag]: Список хэштэгов + """ + return self.get_hashtags(10) + + @refresh_on_error + def get_hashtags(self, limit: int = 10) -> list[Hashtag]: + """Получить список популярных хэштэгов + Args: limit (int, optional): Лимит. Defaults to 10. From c9a5dcad10733b0d15ed20ba0d660877baac8a0e Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:33:28 +0300 Subject: [PATCH 2/8] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D1=81=D0=BB=D0=BE=D0=B2=D0=B5=20=D0=A1=D1=82=D0=B0?= =?UTF-8?q?=D1=80=D1=8B=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itd/client.py b/itd/client.py index 54c4786..0823fc3 100644 --- a/itd/client.py +++ b/itd/client.py @@ -81,7 +81,7 @@ class Client: """Смена пароля Args: - old (str): Страый пароль + old (str): Старый пароль new (str): Новый пароль Raises: From af0b2a1acc576048cee24528d7373e1686e2afae Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:41:34 +0300 Subject: [PATCH 3/8] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D1=81=D0=BB=D0=BE=D0=B2=D0=B5=20verificate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/itd/client.py b/itd/client.py index 0823fc3..487cbd4 100644 --- a/itd/client.py +++ b/itd/client.py @@ -281,7 +281,7 @@ class Client: return [UserFollower.model_validate(user) for user in res.json()['data']['users']], Pagination.model_validate(res.json()['data']['pagination']) - + @deprecated("verificate устарел используйте verify") @refresh_on_error def verificate(self, file_url: str) -> Verification: """Отправить запрос на верификацию @@ -295,6 +295,21 @@ class Client: Returns: Verification: Верификация """ + return self.verify(file_url) + + @refresh_on_error + def verify(self, file_url: str) -> Verification: + """Отправить запрос на верификацию + + Args: + file_url (str): Ссылка на видео + + Raises: + PendingRequestExists: Запрос уже отправлен + + Returns: + Verification: Верификация + """ res = verificate(self.token, file_url) if res.json().get('error', {}).get('code') == 'PENDING_REQUEST_EXISTS': raise PendingRequestExists() @@ -314,7 +329,6 @@ class Client: return VerificationStatus.model_validate(res.json()) - @refresh_on_error def get_who_to_follow(self) -> list[UserWhoToFollow]: """Получить список популярнык пользователей (кого читать) From 2ccd26fc9bb3f5b99cf58ef6d51e81fcec11e738 Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:42:55 +0300 Subject: [PATCH 4/8] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D1=81=D0=BB=D0=BE=D0=B2=D0=B5=20=D0=BF=D0=BE=D0=BF?= =?UTF-8?q?=D1=83=D0=BB=D1=8F=D1=80=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itd/client.py b/itd/client.py index 487cbd4..2bfaf24 100644 --- a/itd/client.py +++ b/itd/client.py @@ -331,7 +331,7 @@ class Client: @refresh_on_error def get_who_to_follow(self) -> list[UserWhoToFollow]: - """Получить список популярнык пользователей (кого читать) + """Получить список популярных пользователей (кого читать) Returns: list[UserWhoToFollow]: Список пользователей From 3ad003a0b1d0a7c0eb6092516da007e4d2099891 Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:45:06 +0300 Subject: [PATCH 5/8] user limit --- itd/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itd/client.py b/itd/client.py index 2bfaf24..217a237 100644 --- a/itd/client.py +++ b/itd/client.py @@ -516,7 +516,7 @@ class Client: Returns: list[Hashtag]: Список хэштэгов """ - return self.get_hashtags(10) + return self.get_hashtags(limit) @refresh_on_error def get_hashtags(self, limit: int = 10) -> list[Hashtag]: From 7ce699e42a1f1651ce6610f4fe4e2cadfd07aeb8 Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:48:08 +0300 Subject: [PATCH 6/8] =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B0=D1=80=D0=B3=D1=83=D0=BC=D0=B5=D0=BD=D1=82=20=D0=B2=20doc?= =?UTF-8?q?string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/itd/client.py b/itd/client.py index 217a237..c4f5602 100644 --- a/itd/client.py +++ b/itd/client.py @@ -373,7 +373,6 @@ class Client: Args: post_id (str): UUID поста content (str): Содержание - reply_comment_id (UUID | None, optional): ID коммента для ответа. Defaults to None. Raises: ValidationError: Ошибка валидации From 80a5a3344379136178917c57f446d0f0faf0abef Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:55:33 +0300 Subject: [PATCH 7/8] =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=D1=85?= =?UTF-8?q?=20get=5Fhastags=20=D0=B8=20get=5Fposts=5Fby=5Fhastag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 6 +++--- itd/routes/hashtags.py | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/itd/client.py b/itd/client.py index c4f5602..48c83cd 100644 --- a/itd/client.py +++ b/itd/client.py @@ -8,7 +8,7 @@ from requests.exceptions import HTTPError, ConnectionError from itd.routes.users import get_user, update_profile, follow, unfollow, get_followers, get_following, update_privacy from itd.routes.etc import get_top_clans, get_who_to_follow, get_platform_status from itd.routes.comments import get_comments, add_comment, delete_comment, like_comment, unlike_comment, add_reply_comment -from itd.routes.hashtags import get_hastags, get_posts_by_hastag +from itd.routes.hashtags import get_hashtags, get_posts_by_hashtag from itd.routes.notifications import get_notifications, mark_as_read, mark_all_as_read, get_unread_notifications_count from itd.routes.posts import create_post, get_posts, get_post, edit_post, delete_post, pin_post, repost, view_post, get_liked_posts from itd.routes.reports import report @@ -527,7 +527,7 @@ class Client: Returns: list[Hashtag]: Список хэштэгов """ - res = get_hastags(self.token, limit) + res = get_hashtags(self.token, limit) res.raise_for_status() return [Hashtag.model_validate(hashtag) for hashtag in res.json()['data']['hashtags']] @@ -546,7 +546,7 @@ class Client: list[Post]: Посты Pagination: Пагинация """ - res = get_posts_by_hastag(self.token, hashtag, limit, cursor) + res = get_posts_by_hashtag(self.token, hashtag, limit, cursor) res.raise_for_status() data = res.json()['data'] diff --git a/itd/routes/hashtags.py b/itd/routes/hashtags.py index 72404c4..cd4a836 100644 --- a/itd/routes/hashtags.py +++ b/itd/routes/hashtags.py @@ -1,8 +1,17 @@ +from warnings import deprecated from uuid import UUID from itd.request import fetch +@deprecated("get_hastags устарела используйте get_hashtags") def get_hastags(token: str, limit: int = 10): return fetch(token, 'get', 'hashtags/trending', {'limit': limit}) +def get_hashtags(token: str, limit: int = 10): + return fetch(token, 'get', 'hashtags/trending', {'limit': limit}) + +@deprecated("get_posts_by_hastag устерла используй get_posts_by_hashtag") def get_posts_by_hastag(token: str, hashtag: str, limit: int = 20, cursor: UUID | None = None): return fetch(token, 'get', f'hashtags/{hashtag}/posts', {'limit': limit, 'cursor': cursor}) + +def get_posts_by_hashtag(token: str, hashtag: str, limit: int = 20, cursor: UUID | None = None): + return fetch(token, 'get', f'hashtags/{hashtag}/posts', {'limit': limit, 'cursor': cursor}) From 0c212e41cb8b90a87add5152584c0a85031ef33d Mon Sep 17 00:00:00 2001 From: Rationess Date: Tue, 3 Feb 2026 20:58:22 +0300 Subject: [PATCH 8/8] =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8=20ver?= =?UTF-8?q?ificate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itd/client.py | 4 ++-- itd/routes/verification.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/itd/client.py b/itd/client.py index 48c83cd..2ed3ac0 100644 --- a/itd/client.py +++ b/itd/client.py @@ -15,7 +15,7 @@ from itd.routes.reports import report from itd.routes.search import search from itd.routes.files import upload_file from itd.routes.auth import refresh_token, change_password, logout -from itd.routes.verification import verificate, get_verification_status +from itd.routes.verification import verify, get_verification_status from itd.models.comment import Comment from itd.models.notification import Notification @@ -310,7 +310,7 @@ class Client: Returns: Verification: Верификация """ - res = verificate(self.token, file_url) + res = verify(self.token, file_url) if res.json().get('error', {}).get('code') == 'PENDING_REQUEST_EXISTS': raise PendingRequestExists() res.raise_for_status() diff --git a/itd/routes/verification.py b/itd/routes/verification.py index 8c66426..ec643d5 100644 --- a/itd/routes/verification.py +++ b/itd/routes/verification.py @@ -1,8 +1,14 @@ +from warnings import deprecated from itd.request import fetch -def verificate(token: str, file_url: str): +def verify(token: str, file_url: str): # {"success":true,"request":{"id":"fc54e54f-8586-4d8c-809e-df93161f99da","userId":"9096a85b-c319-483e-8940-6921be427ad0","videoUrl":"https://943701f000610900cbe86b72234e451d.bckt.ru/videos/354f28a6-9ac7-48a6-879a-a454062b1d6b.mp4","status":"pending","rejectionReason":null,"reviewedBy":null,"reviewedAt":null,"createdAt":"2026-01-30T12:58:14.228Z","updatedAt":"2026-01-30T12:58:14.228Z"}} return fetch(token, 'post', 'verification/submit', {'videoUrl': file_url}) +@deprecated("verificate устарела используйте verify") +def verificate(token: str, file_url: str): + return verify(token, file_url) + + def get_verification_status(token: str): return fetch(token, 'get', 'verification/status') \ No newline at end of file