mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 14:24:31 +00:00
994 B
994 B
Raw API Calls
Use client.call() when you need a Fragment API method that does not yet have a dedicated wrapper.
result = await client.call(
"searchPremiumGiftRecipient",
{"query": "@username", "months": 3},
page_url="https://fragment.com/premium/gift",
)
Signature:
await client.call(
method: str,
data: dict[str, Any] | None = None,
*,
page_url: str = "https://fragment.com",
) -> dict[str, Any]
Parameters
method: Fragment API method namedata: optional request payload as dictionarypage_url: page URL used for referer/hash context (defaults tohttps://fragment.com)
Return
dict[str, Any]: raw Fragment API response
Use this carefully:
- request/response shape is Fragment-defined,
- undocumented methods can change without notice,
- you are responsible for validating returned fields.
Recommended approach
Use dedicated wrappers first, and fallback to call() only for missing API surface.