Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

paginate_events

Fetch every record in the indexer's events connection, paginating forward.

Signature

pub async fn paginate_events(
    &self,
    page_size: i64,
    variables: events::Variables,
) -> Result<Vec<events::EventsEventsNodes>, anyhow::Error>;

Example

use {
    anyhow::Result,
    dango_sdk::{HttpClient, events},
};
 
#[tokio::main]
async fn main() -> Result<()> {
    let client = HttpClient::new("https://api-mainnet.dango.zone")?;
 
    let evs = client
        .paginate_events(100, events::Variables::default())
        .await?;
 
    println!("{} events", evs.len());
    Ok(())
}

Parameters

page_sizei64. Items per request. Indexer caps first at 100.

variablesevents::Variables. Only pagination + sort_by fields are exposed by the indexer schema today; filter client-side on the returned nodes (e.g. node.r#type). Pagination cursors are overwritten by the helper.

Returns

Vec<events::EventsEventsNodes> — every event matching the filter.

See also