duneanalytics / dune-client

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

Refactor: DuneInterface.refresh return type #26

Closed bh2smith closed 1 year ago

bh2smith commented 1 year ago

In order for users to cache results, they need access to the JOB ID of their execution. The refresh method now returns more enriched data giving these advanced options to the user.

We lost the convenience of not having to check for an optional field, but introduced a similar convenience in the ResultsResponse (i.e. the new method get_rows which performs the necessary assertion check) and always returns a list of dune records.

Bonus feature is the Queryhash implementation which will allow people to cache results of different executions of the same query with different parameters.

Closes #25 and closes #27

bh2smith commented 1 year ago

This is an interface breaking change so we will have to bump the version to 0.1.0