feat: update privacy data

This commit is contained in:
firedotguy
2026-02-12 23:40:59 +03:00
parent 62730b48e9
commit b3b109613b
5 changed files with 64 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
from uuid import UUID
from itd.request import fetch
from itd.models.user import UserPrivacyData
def get_user(token: str, username: str):
@@ -26,6 +27,9 @@ def update_privacy(token: str, wall_closed: bool = False, private: bool = False)
data['isPrivate'] = private
return fetch(token, 'put', 'users/me/privacy', data)
def update_privacy_new(token: str, privacy: UserPrivacyData):
return fetch(token, 'put', 'users/me/privacy', privacy.to_dict())
def follow(token: str, username: str):
return fetch(token, 'post', f'users/{username}/follow')