woocommerce / wc-api-python

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

Documentation Error #75

Closed chrisg44 closed 2 years ago

chrisg44 commented 2 years ago

N.B. I'm trying to help and leave a quick "you may have an issue here" - sorry I'm not wading through the overly long instructions that you provide.

In this documentation: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-orders

The Python code is stated as:

print(wcapi.get("orders").json())

for me this returns []

However

print(wcapi.get("orders/#").json())

returns a list of dictionaries of the orders.

Very minor / I might be wrong but the as written code doesn't seem to work.

rodelgc commented 2 years ago

Hi @chrisg44,

Thank you for opening the issue! I am adding the needs developer feedback label to this issue so that the Core team could take a look if the Python code was correct or not.

Please note it may take a few days for them to get to this issue. Thank you for your patience.

vedanshujain commented 2 years ago

Thanks for the report, I have transferred this issue to the API repo. This looks like a bug, we will take a look and fix.

claudiosanches commented 2 years ago

I just tested and seems to be working as expected, note that there's more parameters to check the response, like .headers, see the library examples: https://github.com/woocommerce/wc-api-python#response

I'm closing for now since I can't reproduce this error and wcapi.get("orders").json() returns a list of orders to me. But please let me know if you are still having issues.