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 Part II: Split DuneClient Class #72

Closed bh2smith closed 1 year ago

bh2smith commented 1 year ago

We split the DuneClient class up with an inheritance structure described vaguely as follows:

    Inheritance Hierarchy sketched as follows:

    DuneClient
        |
        |--- QueryAPI(BaseRouter)
        |       - Contains CRUD Operations on Queries
        |
        |--- ExtendedAPI
                | - Contains compositions of execution methods like `run_query` (formerly refresh)
                |
                |--- ExecutionAPI(BaseRouter)
                        - Contains query execution methods.

Note that this is based on #64 (which should be merged first).

Closes #69

cc @TheEdgeOfRage & @diegoximenes for additional review.

bh2smith commented 1 year ago

Note that we can circle back and clean this up even more later. This is mostly just an initial proposal for the final structure and servers as a starting point from which we can move things around as we see fit.

bh2smith commented 1 year ago

Thanks @RichardKeo for your careful review. I will create relevant issues and make suggested changes here accordingly first thing tomorrow!

bh2smith commented 1 year ago

Okie, I have addressed all the comments and suggestions here (@RichardKeo). Please let me know if this is ready for 🚢 . Everything else will follow much easier from here (as everything is currently based on this branch).

bh2smith commented 1 year ago

In light of the backlog depending on this and all the comments addressed, I will merge this now. We can always double back and make additional changes upon request.