Refactor pyfragment structure: Move models to domain-specific modules

- Moved PaymentMethod and other enums from models to enums.py for better organization.
- Refactored imports in various files to reflect the new structure.
- Created new model files for ads, anonymous numbers, giveaways, marketplace, purchases, and tonapi.
- Removed the old models.py file to clean up the codebase.
- Updated all relevant imports in the codebase to use the new model locations.
This commit is contained in:
bohd4nx
2026-06-16 01:02:28 +03:00
parent 8f865f4911
commit 9f11ccb3ee
37 changed files with 73 additions and 90 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ Channel can be "@channel", "channel", or "https://t.me/channel".
import asyncio
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
from pyfragment.models.enums import PaymentMethod
from pyfragment.enums import PaymentMethod
SEED = "word1 word2 ... word24"
API_KEY = "YOUR_TONAPI_KEY"
+1 -1
View File
@@ -9,7 +9,7 @@ Channel can be "@channel", "channel", or "https://t.me/channel".
import asyncio
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
from pyfragment.models.enums import PaymentMethod
from pyfragment.enums import PaymentMethod
SEED = "word1 word2 ... word24"
API_KEY = "YOUR_TONAPI_KEY"
+1 -1
View File
@@ -9,7 +9,7 @@ Username can be "@username", "username", or "https://t.me/username".
import asyncio
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
from pyfragment.models.enums import PaymentMethod
from pyfragment.enums import PaymentMethod
SEED = "word1 word2 ... word24"
API_KEY = "YOUR_TONAPI_KEY"
+1 -1
View File
@@ -9,7 +9,7 @@ Username can be "@username", "username", or "https://t.me/username".
import asyncio
from pyfragment import ConfigurationError, FragmentClient, UserNotFoundError
from pyfragment.models.enums import PaymentMethod
from pyfragment.enums import PaymentMethod
SEED = "word1 word2 ... word24"
API_KEY = "YOUR_TONAPI_KEY"