woocommerce / wc-api-python

A Python wrapper for the WooCommerce API.
https://pypi.org/project/WooCommerce/
MIT License
212 stars 112 forks source link

api accepts url params and additional keyword args for requests module #34

Closed timjen3 closed 5 years ago

timjen3 commented 6 years ago

Currently the url params that are sent to Woo-Commerce are a closed box. They should be exposed outside of the function. Additionally, there are cases where a developer needs to pass additional parameters to the requests library. These should also be exposed outside of the function.

I've been meaning to make a pull request for this. I have previously sub-classed the woocommerce.api.API object in order to do this and think it would be helpful to others who like me need to do more complicated requests.

timjen3 commented 6 years ago

I really like how simple this package is, so I don't know if it fits in with your vision... But would you be interested in adding a "getPaged" method to the API class? If so, I can make a pull request once we get this one sorted out.

foresmac commented 6 years ago

Fixes #37

timjen3 commented 6 years ago

After opening this pull request originally I found out that the code would not work when extra params are used with OAuth. I updated the code just now to what should work from memory. Unfortunately I don't have access to a woo shop to test my work today. I can test this either this weekend or next.

claudiosanches commented 5 years ago

Thanks for your help.