mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
feat: add anonymous number management methods; implement get_login_code, toggle_login_codes, and terminate_sessions with associated results and error handling
This commit is contained in:
@@ -67,6 +67,13 @@ class UserNotFoundError(FragmentAPIError):
|
||||
)
|
||||
|
||||
|
||||
class AnonymousNumberError(FragmentAPIError):
|
||||
"""Raised for Fragment anonymous number API failures."""
|
||||
|
||||
NOT_OWNED = "Number '{number}' is not associated with your Fragment account or has no active sessions to terminate."
|
||||
TERMINATE_FAILED = "Failed to terminate sessions for '{number}': {error}"
|
||||
|
||||
|
||||
class TransactionError(FragmentAPIError):
|
||||
"""Raised when a TON transaction fails to build or broadcast."""
|
||||
|
||||
@@ -133,6 +140,7 @@ __all__ = [
|
||||
"CookieError",
|
||||
"FragmentAPIError",
|
||||
"FragmentPageError",
|
||||
"AnonymousNumberError",
|
||||
"UserNotFoundError",
|
||||
"TransactionError",
|
||||
"ParseError",
|
||||
|
||||
Reference in New Issue
Block a user