mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
Refactor FragmentAPI to pyfragment
- Renamed the package from `fragmentapi` to `pyfragment` across all modules and tests. - Removed the old wallet utility functions and replaced them with new implementations. - Updated the `pyproject.toml` to reflect the new package name and repository links. - Adjusted all import statements in tests to use the new package name. - Implemented new methods for gifting Telegram Premium, Stars, and topping up TON balance. - Added exception handling for various error scenarios in the API interactions. - Created new utility functions for handling HTTP requests and decoding payloads. - Established a clear structure for types and constants used throughout the library.
This commit is contained in:
@@ -7,7 +7,7 @@ wallet_version defaults to "V5R1" — change to "V4R2" for older wallets.
|
||||
|
||||
import asyncio
|
||||
|
||||
from fragmentapi import FragmentClient
|
||||
from pyfragment import FragmentClient
|
||||
|
||||
SEED = "word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13 word14 word15 word16 word17 word18 word19 word20 word21 word22 word23 word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
@@ -7,7 +7,7 @@ Set show_sender=False to send anonymously.
|
||||
|
||||
import asyncio
|
||||
|
||||
from fragmentapi import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
@@ -7,7 +7,7 @@ Set show_sender=False to send anonymously.
|
||||
|
||||
import asyncio
|
||||
|
||||
from fragmentapi import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
@@ -7,7 +7,7 @@ Your wallet must hold at least the topup amount + ~0.056 TON for gas.
|
||||
|
||||
import asyncio
|
||||
|
||||
from fragmentapi import ConfigurationError, FragmentClient, UserNotFoundError, WalletError
|
||||
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError, WalletError
|
||||
|
||||
SEED = "word1 word2 ... word24"
|
||||
API_KEY = "YOUR_TONAPI_KEY"
|
||||
|
||||
Reference in New Issue
Block a user