mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
dc9661134d
- Removed the old CookieResult model from pyfragment.core.models and created a new one in pyfragment.services.cookies.models. - Implemented get_cookies_from_browser function in pyfragment.services.cookies.service to extract cookies directly from supported browsers. - Updated imports across various modules to reflect the new structure and removed unused imports. - Cleaned up models in ads, anonymous_numbers, giveaways, marketplace, and purchases domains by removing unnecessary __all__ declarations. - Added new example scripts for cookie extraction and various purchase functionalities. - Consolidated constants into a new pyfragment.core.constants module for better organization.
32 lines
762 B
Python
32 lines
762 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
from typing import Any
|
|
|
|
|
|
@dataclass
|
|
class UsernamesResult:
|
|
items: list[dict[str, Any]]
|
|
next_offset_id: str | None
|
|
|
|
def __repr__(self) -> str:
|
|
return f"UsernamesResult(items={len(self.items)}, next_offset_id={self.next_offset_id!r})"
|
|
|
|
|
|
@dataclass
|
|
class NumbersResult:
|
|
items: list[dict[str, Any]]
|
|
next_offset_id: str | None
|
|
|
|
def __repr__(self) -> str:
|
|
return f"NumbersResult(items={len(self.items)}, next_offset_id={self.next_offset_id!r})"
|
|
|
|
|
|
@dataclass
|
|
class GiftsResult:
|
|
items: list[dict[str, Any]]
|
|
next_offset: int | None
|
|
|
|
def __repr__(self) -> str:
|
|
return f"GiftsResult(items={len(self.items)}, next_offset={self.next_offset!r})"
|