File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 26
26
27
27
.. code-block :: python
28
28
<
8000
/div>
29
- from woocommerce import WooCommerce
29
+ from woocommerce import API
30
30
31
- wcapi = woocommerce.api (
31
+ wcapi = API (
32
32
url = " http://example.com" ,
33
33
consumer_key = " ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ,
34
34
consumer_secret = " cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
@@ -92,14 +92,14 @@ Example of returned data:
92
92
93
93
.. code-block :: bash
94
94
95
- >>> woocommerce .get(" products" )
96
- >>> woocommerce .status_code
95
+ >>> wcapi .get(" products" )
96
+ >>> wcapi .status_code
97
97
200
98
- >>> woocommerce .headers[' content-type' ]
98
+ >>> wcapi .headers[' content-type' ]
99
99
' application/json; charset=UTF-8'
100
- >>> woocommerce .encoding
100
+ >>> wcapi .encoding
101
101
' UTF-8'
102
- >>> woocommerce .text
102
+ >>> wcapi .text
103
103
u' {"products":[{"title":"Flying Ninja","id":70,...' // Json text
104
- >>> woocommerce .json ()
104
+ >>> wcapi .json ()
105
105
{u' products' : [{u' sold_individually' : False,... // Dictionary data
You can’t perform that action at this time.
0 commit comments