Skip to main content

fetch_documentation

Function fetch_documentation 

Source
pub async fn fetch_documentation(
    client: &Client,
    key: &str,
    library_id: &str,
    query: Option<&str>,
) -> Result<DocumentationResponse, Context7Error>
Expand description

Fetches documentation for library_id with an optional query filter (JSON mode).

Always requests type=json. Use fetch_documentation_text for plain-text output. Returns Err(Context7Error) on HTTP errors to enable retry in run_with_retry.