iobis / pyobis

OBIS Python client
https://iobis.github.io/pyobis
MIT License
14 stars 10 forks source link

[feature-update] Created a response class for all modules #76

Closed ayushanand18 closed 2 years ago

ayushanand18 commented 2 years ago

Overview

This is a long PR (very long, I believe) and I am really sorry for that.

This PR aims to add response class OBISQueryResult to every module.

Changes introduced

A response class in each module has

Additional Changes

Thanks!

ayushanand18 commented 2 years ago

Once again, I am sorry for this huge PR.

ayushanand18 commented 2 years ago

I don't like the reuse of the name OBISQueryResult for all of these classes.

I also see you have duplicate code for get_search_url in several of these classes. You can define the methods once in a parent class or you can define the functions in a common module and attach them, either will remove the duplication.

Thank you for the review!

Update: I have made those changes and updated the docstrings.

7yl4r commented 2 years ago

relevant discussions regarding this reorganization are on #69 and #70