Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ragaeeb/shamela/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The network utilities provide low-level functions for constructing authenticated API URLs and making HTTP requests. These are primarily used internally by the library but are exported for advanced use cases.buildUrl()
Constructs authenticated API URLs with query parameters and optional API key injection.Signature
Parameters
The API endpoint URL
Query parameters to append to the URL
Whether to include the API key in the query parameters
Returns
Returns aURL object with the endpoint, query parameters, and optional API key.
Example
The API key is automatically included when
useAuth is true (default) and will be read from the configuration.httpsGet()
Makes HTTPS GET requests using the configured fetch implementation, automatically parsing JSON responses and returning binary data otherwise.Signature
Parameters
The URL to fetch
Optional custom fetch implementation. Uses the configured fetch or global fetch if not provided.
Returns
Returns a Promise that resolves to:Record<string, any>- If the response is JSONUint8Array- If the response is binary data
Example
Custom Fetch Implementation
Use Cases
These utilities are useful when:- Building custom API integrations with Shamela
- Implementing custom caching or request middleware
- Debugging API calls
- Creating custom download managers
Related
- configure() - Configure fetch implementation
- getBookMetadata() - Uses these utilities internally
- getMasterMetadata() - Uses these utilities internally