duneanalytics / dune-client

A framework for interacting with Dune Analytics' officially supported API service
Apache License 2.0
85 stars 22 forks source link

Fix formatting of columns parameter #120

Closed bernatfp closed 6 months ago

bernatfp commented 6 months ago

The current implementation that builds the columns parameter wraps each column in double quotes, which is not something the API's parser supports. This leads to errors such as this one:

image

We see that doing curl -H "X-Dune-API-Key:$key" "https://api.dune.com/api/v1/query/3567562/results/csv?columns=donor_fname%2Covertip_amount%2Cdays_overtipped%2Coverall_tip_given_amount%2Coverall_avg_tip_amount&filters=overtip_amount%3E0&sort_by=overall_tip_given_amount%20desc&limit=1" instead works.

bernatfp commented 6 months ago
Screenshot 2024-04-03 at 19 29 09