mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
feat: Implement marketplace and purchases services
- 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.
This commit is contained in:
@@ -10,9 +10,10 @@ Use next_offset for pagination.
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
from pyfragment import FragmentClient, GiftsResult
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import FragmentClient, GiftsResult
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Use next_offset_id for pagination.
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
from pyfragment import FragmentClient, NumbersResult
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import FragmentClient, NumbersResult
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Use next_offset_id for pagination.
|
||||
import asyncio
|
||||
import json
|
||||
|
||||
from pyfragment import FragmentClient, UsernamesResult
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import FragmentClient, UsernamesResult
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ Defaults to the Fragment base URL.
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import FragmentClient
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import FragmentClient
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@ wallet_version defaults to "V5R1" — change to "V4R2" for older wallets.
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import FragmentClient
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import FragmentClient
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -8,9 +8,10 @@ Use terminate_sessions() to forcefully end all active Telegram sessions.
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import AnonymousNumberError, FragmentClient
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import AnonymousNumberError, FragmentClient
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -7,13 +7,14 @@ Your wallet must satisfy the current minimum TON threshold and transaction cost.
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import (
|
||||
AdsRechargeResult,
|
||||
ConfigurationError,
|
||||
FragmentClient,
|
||||
WalletError,
|
||||
)
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
@@ -9,9 +9,10 @@ Channel can be "@channel", "channel", or "https://t.me/channel".
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Channel can be "@channel", "channel", or "https://t.me/channel".
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Username can be "@username", "username", or "https://t.me/username".
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Username can be "@username", "username", or "https://t.me/username".
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
|
||||
@@ -9,13 +9,14 @@ Your wallet must satisfy the current minimum TON threshold and transaction cost.
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
from pyfragment import (
|
||||
ConfigurationError,
|
||||
FragmentClient,
|
||||
UserNotFoundError,
|
||||
WalletError,
|
||||
)
|
||||
from pyfragment.utils import get_cookies_from_browser # noqa: F401
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
Reference in New Issue
Block a user