dune

package
v1.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a minimal Dune API v1 client. Initialize with NewClient and use FetchCSV to execute a query and stream its CSV results.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a new Dune API client. apiKey is required.

func (*Client) FetchCSV

func (c *Client) FetchCSV(ctx context.Context, queryID int, timeout time.Duration) (io.ReadCloser, error)

FetchCSV triggers execution of the given query and, once completed, returns a ReadCloser streaming the CSV results. The caller must Close the returned ReadCloser.

func (*Client) FetchCSVWithLimit

func (c *Client) FetchCSVWithLimit(ctx context.Context, queryID int, timeout time.Duration, limitRows int) (io.ReadCloser, error)

FetchCSVWithLimit behaves like FetchCSV, but if limitRows > 0 it will request the server-side row limit using the `limit` query parameter on the CSV endpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL