pub struct StreamsApiClient { /* private fields */ }Expand description
Client for the Quicknode Streams REST API. Create, list, update, and control blockchain data streams that deliver filtered on-chain events to configured destinations.
Implementations§
Source§impl StreamsApiClient
impl StreamsApiClient
pub fn new(config: SdkConfig) -> Self
Sourcepub async fn create_stream(
&self,
params: &CreateStreamParams,
) -> Result<Stream, SdkError>
pub async fn create_stream( &self, params: &CreateStreamParams, ) -> Result<Stream, SdkError>
Creates a new Stream on a given blockchain network and dataset, delivering batches to the configured destination. Start from a specific block for backfills or from the tip for real-time streaming, and optionally attach a base64-encoded JavaScript filter to transform data before delivery. The stream can be created in an active or paused state and supports reorg handling, distance-from-tip, elastic batching, notification emails, and extra destinations for multi-destination delivery.
Sourcepub async fn list_streams(
&self,
params: &ListStreamsParams,
) -> Result<ListStreamsResponse, SdkError>
pub async fn list_streams( &self, params: &ListStreamsParams, ) -> Result<ListStreamsResponse, SdkError>
Returns a paginated list of streams on the account. Each stream includes
its full configuration — identifiers, timestamps, network and dataset,
filter, block range, destination settings, and operational status — and
surfaces advanced features such as elastic batching and extra
destinations, where batches must be delivered to every configured
destination before the stream advances. Supports pagination via
offset/limit and sorting via order_by/order_direction, and can
filter by stream type.
Sourcepub async fn delete_all_streams(&self) -> Result<(), SdkError>
pub async fn delete_all_streams(&self) -> Result<(), SdkError>
Removes every stream on the account. Takes no filters and cannot be undone.
Sourcepub async fn get_stream(&self, id: &str) -> Result<Stream, SdkError>
pub async fn get_stream(&self, id: &str) -> Result<Stream, SdkError>
Returns a single stream by ID, including its full configuration and current status.
Sourcepub async fn update_stream(
&self,
id: &str,
params: &UpdateStreamParams,
) -> Result<Stream, SdkError>
pub async fn update_stream( &self, id: &str, params: &UpdateStreamParams, ) -> Result<Stream, SdkError>
Updates an existing stream’s configuration. Only fields present on
params are modified; omitted fields are left unchanged.
Sourcepub async fn delete_stream(&self, id: &str) -> Result<(), SdkError>
pub async fn delete_stream(&self, id: &str) -> Result<(), SdkError>
Deletes a single stream by ID.
Sourcepub async fn activate_stream(&self, id: &str) -> Result<(), SdkError>
pub async fn activate_stream(&self, id: &str) -> Result<(), SdkError>
Activates a stream by ID, resuming delivery from its current position.
Sourcepub async fn pause_stream(&self, id: &str) -> Result<(), SdkError>
pub async fn pause_stream(&self, id: &str) -> Result<(), SdkError>
Pauses a stream by ID, halting delivery until it is activated again.
Sourcepub async fn test_filter(
&self,
params: &TestFilterParams,
) -> Result<TestFilterResponse, SdkError>
pub async fn test_filter( &self, params: &TestFilterParams, ) -> Result<TestFilterResponse, SdkError>
Runs a filter function against a specified block on a given network and dataset, returning the filter’s output so it can be validated before being attached to a live stream.
Sourcepub async fn get_enabled_count(
&self,
stream_type: Option<&str>,
) -> Result<EnabledCountResponse, SdkError>
pub async fn get_enabled_count( &self, stream_type: Option<&str>, ) -> Result<EnabledCountResponse, SdkError>
Returns the total count of currently enabled (active) streams on the account, optionally filtered by stream type.
Trait Implementations§
Source§impl Clone for StreamsApiClient
impl Clone for StreamsApiClient
Source§fn clone(&self) -> StreamsApiClient
fn clone(&self) -> StreamsApiClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more