mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
docs: update troubleshooting and installation documentation, clarify Python version, and improve quickstart example formatting
This commit is contained in:
@@ -50,7 +50,7 @@ Actions:
|
|||||||
|
|
||||||
## SSL-related broadcast failures
|
## SSL-related broadcast failures
|
||||||
|
|
||||||
If you get SSL-related transaction errors:
|
If you get SSL-related errors during **TON transaction broadcast** (not Fragment page loading — those use curl_cffi with bundled SSL):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install --upgrade certifi
|
pip install --upgrade certifi
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ You can be up and running in under a minute.
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Python 3.10 – 3.14
|
- Python 3.11 – 3.14
|
||||||
|
|
||||||
## Install from PyPI
|
## Install from PyPI
|
||||||
|
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ async def main() -> None:
|
|||||||
api_provider="tonapi", # or "toncenter"
|
api_provider="tonapi", # or "toncenter"
|
||||||
) as client:
|
) as client:
|
||||||
wallet = await client.get_wallet()
|
wallet = await client.get_wallet()
|
||||||
print(f"GRAM: {wallet.gram_balance} | USDT: {wallet.usdt_balance}")
|
print("GRAM: %s | USDT: %s" % (wallet.gram_balance, wallet.usdt_balance))
|
||||||
|
|
||||||
recipient = "https://t.me/username" # also: @username, username
|
recipient = "https://t.me/username" # also: @username, username
|
||||||
|
|
||||||
stars = await client.purchase_stars(recipient, amount=500, payment_method=PaymentMethod.USDT_GRAM)
|
stars = await client.purchase_stars(recipient, amount=500, payment_method=PaymentMethod.USDT_GRAM)
|
||||||
print(f"Sent {stars.amount} Stars to {stars.username} | tx: {stars.transaction_id}")
|
print("Sent %s Stars to %s | tx: %s" % (stars.amount, stars.username, stars.transaction_id))
|
||||||
|
|
||||||
premium = await client.purchase_premium(recipient, months=6, payment_method=PaymentMethod.GRAM)
|
premium = await client.purchase_premium(recipient, months=6, payment_method=PaymentMethod.GRAM)
|
||||||
print(f"Sent Premium {premium.amount}m to {premium.username} | tx: {premium.transaction_id}")
|
print("Sent Premium %sm to %s | tx: %s" % (premium.amount, premium.username, premium.transaction_id))
|
||||||
|
|
||||||
|
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
|
|||||||
Reference in New Issue
Block a user