mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-08-02 17:51:37 +00:00
refactor: restructure as installable PyPI package
- Rename app/ → fragmentapi/ for proper package naming - Add FragmentClient class with gift_premium, gift_stars, topup_ton methods - Restructure core/ → types/ (exceptions, results, constants) - Merge utils/hash.py into utils/client.py - Replace _version.py with importlib.metadata - Add input validation with min/max bounds - Add unit tests: decode, client init/cookies - Rename 002_test_hash → 003_test_hash - Clean up pyproject.toml: pin deps, production classifiers
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Copyright (c) 2025 bohd4nx
|
||||
#
|
||||
# This source code is licensed under the MIT License found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
from fragmentapi.client import FragmentClient
|
||||
from fragmentapi.types import (
|
||||
AdsTopupResult,
|
||||
ClientError,
|
||||
ConfigError,
|
||||
CookiesError,
|
||||
FragmentAPIError,
|
||||
FragmentError,
|
||||
HashFetchError,
|
||||
OperationError,
|
||||
PremiumResult,
|
||||
RequestError,
|
||||
StarsResult,
|
||||
TransactionError,
|
||||
UnexpectedError,
|
||||
UserNotFoundError,
|
||||
VerificationError,
|
||||
WalletError,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"FragmentClient",
|
||||
"AdsTopupResult",
|
||||
"PremiumResult",
|
||||
"StarsResult",
|
||||
"ClientError",
|
||||
"ConfigError",
|
||||
"CookiesError",
|
||||
"FragmentAPIError",
|
||||
"FragmentError",
|
||||
"HashFetchError",
|
||||
"OperationError",
|
||||
"RequestError",
|
||||
"TransactionError",
|
||||
"UnexpectedError",
|
||||
"UserNotFoundError",
|
||||
"VerificationError",
|
||||
"WalletError",
|
||||
]
|
||||
Reference in New Issue
Block a user