duneanalytics/dune-client

Break Client into Family of Classes

Closed this issue · 0 comments

DuneClient should inherit from (DuneExecutionsAPI, DuneQueryAPI, DuneUploadAPI…) where

Executions:
execute_query() -> executionID
get_execution_status()
get_execution_results()
get_execution_results_csv()
cancel_execution()

Query:
create_query()
update_query()
archive_query()
get_query_results()
get_query_results_csv()

Upload
upload_csv()

Helper/higher-level-functionality

run_sql(sql :string) -> results
download_csv(queryID)
This is just an alias for: get_query_results_csv()
run_query() → this is the current refresh()
w/ maxAge=1hour for default ?
results_into_dataframe() ? (allows for an executionID or a queryID ?)
	
A simple function that accepts either of an executionID or a queryID, in case
	It is a query ID it will use “get_query_results_csv()” and load into pandas df
	If it specifies maxAge: it will trigger a new execution and use that executionID
	It is a execution ID it will use “get_execution_results_csv()” and load into pandas df