Skip to content

Break Client into Family of Classes #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bh2smith opened this issue Sep 5, 2023 · 0 comments · Fixed by #72
Closed

Break Client into Family of Classes #69

bh2smith opened this issue Sep 5, 2023 · 0 comments · Fixed by #72

Comments

@bh2smith
Copy link
Collaborator

bh2smith commented Sep 5, 2023

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant