mirror of
https://github.com/SantaSpeen/anixart.git
synced 2026-10-26 05:50:35 +00:00
[+] Profile.from_response
This commit is contained in:
1 parent
bb852d2b3a
commit
9c94b68d55
3 files changed
+17
-7
No files matched your search
+2
-3
@@ -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)
|
||||
Reference in new issue
Block a user