[+] Profile.from_response

This commit is contained in:
SantaSpeen committed 2025-04-02 18:07:54 +03:00
1 parent bb852d2b3a
commit 9c94b68d55
3 files changed
+17 -7

No files matched your search

+2 -3
View File
@@ -11,9 +11,8 @@ anix = AnixartAPI() # По умолчанию используется гост
if __name__ == '__main__':
try:
raw = anix.execute("GET", endpoints.PROFILE.format(1))
profile = {"is_my_profile": raw['is_my_profile'], **raw['profile']}
print(Profile(**profile))
raw = anix.get(endpoints.PROFILE, 1)
print(Profile.from_response(raw))
except AnixartAPIRequestError as e:
print(e.message)
print(e.code)