metricq / aiocouch

🛋 An asynchronous client library for CouchDB 2.x and 3.x
https://aiocouch.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
29 stars 10 forks source link

Adds ViewResponse dataclass to allow access to all return values #46

Closed bmario closed 2 years ago

bmario commented 2 years ago

This PR changes the View.get() and View.post() methods to return the new ViewResponse dataclass. This class looks like the JSON response of the view endpoint but also provides some nice accessor methods to parse the response.

Fixes #45

codecov[bot] commented 2 years ago

Codecov Report

Merging #46 (5680bc2) into master (629822e) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   97.10%   97.13%   +0.03%     
==========================================
  Files          13       13              
  Lines         932      944      +12     
==========================================
+ Hits          905      917      +12     
  Misses         27       27              
Impacted Files Coverage Δ
aiocouch/view.py 100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more