8000 Fix wrong example in README. · wolfhesse/wc-api-python@057b251 · GitHub
[go: up one dir, main page]

Skip to content

Commit 057b251

Browse files
committed
Fix wrong example in README.
The returned method should be Response object instead of Request object.
1 parent 8ad1ce5 commit 057b251

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ DELETE
8989
Response
9090
--------
9191

92-
All methods will return `Requests <http://docs.python-requests.org/en/latest/>`_ object.
92+
All methods will return `Response <http://docs.python-requests.org/en/latest/api/#requests.Response>`_ object.
9393

9494
Example of returned data:
9595

9696
.. code-block:: bash
9797
98-
>>> wcapi.get("products")
99-
>>> wcapi.status_code
98+
>>> r = wcapi.get("products")
99+
>>> r.status_code
100100
200
101-
>>> wcapi.headers['content-type']
101+
>>> r.headers['content-type']
102102
'application/json; charset=UTF-8'
103-
>>> wcapi.encoding
103+
>>> r.encoding
104104
'UTF-8'
105-
>>> wcapi.text
105+
>>> r.text
106106
u'{"products":[{"title":"Flying Ninja","id":70,...' // Json text
107-
>>> wcapi.json()
107+
>>> r.json()
108108
{u'products': [{u'sold_individually': False,... // Dictionary data
109109
110110

0 commit comments

Comments
 (0)
0