mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
ae164d4fe7
- Added MarketplaceService for searching usernames, numbers, and gifts. - Introduced PurchasesService for purchasing stars and premium subscriptions. - Created WalletService for wallet operations including balance checks and top-ups. - Developed transaction handling for TON and USDT transfers. - Added models for payments, marketplace results, and wallet information. - Implemented error handling for various operations including wallet and transaction errors. - Established domain structure for purchases, marketplace, and wallet functionalities.
72 lines
1.9 KiB
Python
72 lines
1.9 KiB
Python
# Copyright (c) 2026 bohd4nx
|
|
#
|
|
# This source code is licensed under the MIT License found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
from importlib.metadata import version
|
|
|
|
from pyfragment.client import FragmentClient
|
|
from pyfragment.core.cookies import get_cookies_from_browser
|
|
from pyfragment.exceptions import (
|
|
AnonymousNumberError,
|
|
ClientError,
|
|
ConfigurationError,
|
|
CookieError,
|
|
FragmentAPIError,
|
|
FragmentError,
|
|
FragmentPageError,
|
|
OperationError,
|
|
ParseError,
|
|
TransactionError,
|
|
UnexpectedError,
|
|
UserNotFoundError,
|
|
VerificationError,
|
|
WalletError,
|
|
)
|
|
from pyfragment.models.anonymous_numbers import LoginCodeResult, TerminateSessionsResult
|
|
from pyfragment.models.cookies import CookieResult
|
|
from pyfragment.models.enums import PaymentMethod
|
|
from pyfragment.models.giveaways import PremiumGiveawayResult, StarsGiveawayResult
|
|
from pyfragment.models.marketplace import GiftsResult, NumbersResult, UsernamesResult
|
|
from pyfragment.models.payments import AdsRechargeResult, AdsTopupResult, PremiumResult, StarsResult
|
|
from pyfragment.models.wallet import WalletInfo
|
|
|
|
__version__: str = version("pyfragment")
|
|
|
|
__all__ = [
|
|
"__version__",
|
|
"FragmentClient",
|
|
# results
|
|
"StarsResult",
|
|
"StarsGiveawayResult",
|
|
"PremiumResult",
|
|
"PremiumGiveawayResult",
|
|
"WalletInfo",
|
|
"AdsTopupResult",
|
|
"AdsRechargeResult",
|
|
"CookieResult",
|
|
"GiftsResult",
|
|
"LoginCodeResult",
|
|
"NumbersResult",
|
|
"TerminateSessionsResult",
|
|
"UsernamesResult",
|
|
# exceptions
|
|
"FragmentError",
|
|
"FragmentAPIError",
|
|
"FragmentPageError",
|
|
"ConfigurationError",
|
|
"UserNotFoundError",
|
|
"WalletError",
|
|
"VerificationError",
|
|
"TransactionError",
|
|
"AnonymousNumberError",
|
|
"ClientError",
|
|
"CookieError",
|
|
"OperationError",
|
|
"ParseError",
|
|
"UnexpectedError",
|
|
# literal types
|
|
"PaymentMethod",
|
|
"get_cookies_from_browser",
|
|
]
|