Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

[Feature]: Query Builder, Query, and Query Exception Classes #29

Open
4 tasks
thinkjrs opened this issue Dec 4, 2020 · 0 comments
Open
4 tasks

[Feature]: Query Builder, Query, and Query Exception Classes #29

thinkjrs opened this issue Dec 4, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@thinkjrs
Copy link
Member

thinkjrs commented Dec 4, 2020

Is your feature request related to a problem? Please describe.
Each endpoint uses a chain of functions, which, after months of scrappy use and rapid prototyping, throw some side effects and occasionally spit errors.

This is sub-optimal in production environments, as consistency and reasonable error propagation are necessities.

Describe the solution you'd like
I'd like to see a class for each query request with proper error encapsulation. This will likely need a query exceptions class, in tandem.

Objectives:

  • Every API call is self-contained
  • Every API call is identical, other than query and updated header authorization, if necessary
  • Every query is built by exactly the same process
  • Every client function (e.g. artist.charts) instantiates a Query via the constructor params, which create a QueryBuilder and call the API

Describe alternatives you've considered
The semi-"functional" approach we take now is frustrating to use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant