@@ -27,6 +27,8 @@ Check out the WooCommerce API endpoints and data that can be manipulated in http
27
27
Setup
28
28
-----
29
29
30
+ Setup for the old WooCommerce API v3:
31
+
30
32
.. code-block :: python
31
33
32
34
from woocommerce import API
37
39
consumer_secret = " cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
38
40
)
39
41
42
+ Setup for the new WP REST API integration:
43
+
44
+ .. code-block :: python
45
+
46
+ from woocommerce import API
47
+
48
+ wcapi = API(
49
+ url = " http://example.com" ,
50
+ consumer_key = " ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ,
51
+ consumer_secret = " cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ,
52
+ wp_api = True ,
53
+ version = " wc/v1"
54
+ )
40
55
41
56
Options
42
57
~~~~~~~
@@ -50,6 +65,8 @@ Options
50
65
+--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
51
66
| ``consumerSecret `` | ``string `` | yes | Your API consumer secret |
52
67
+--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
68
+ | ``wp_api `` | ``bool `` | no | Allow requests to the WP REST API |
69
+ +--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
53
70
| ``version `` | ``string `` | no | API version, default is ``v3 `` |
54
71
+--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
55
72
| ``timeout `` | ``integer `` | no | Connection timeout, default is ``5 `` |
@@ -88,6 +105,11 @@ DELETE
88
105
89
106
- ``.delete(endpoint) ``
90
107
108
+ OPTIONS
109
+ ~~~~~~~
110
+
111
+ - ``.options(endpoint) ``
112
+
91
113
Response
92
114
--------
93
115
@@ -113,6 +135,12 @@ Example of returned data:
113
135
Changelog
114
136
---------
115
137
138
+ 1.1.0 - 2016/05/09
139
+ ~ ~~~~~~~~~~~~~~~~~
140
+
141
+ - Added support for WP REST API.
142
+ - Added method to do HTTP OPTIONS requests.
143
+
116
144
1.0.5 - 2015/12/07
117
145
~ ~~~~~~~~~~~~~~~~~
118
146
0 commit comments