@@ -27,6 +27,8 @@ Check out the WooCommerce API endpoints and data that can be manipulated in http
2727Setup
2828-----
2929
30+ Setup for the old WooCommerce API v3:
31+
3032.. code-block :: python
3133
3234 from woocommerce import API
3739 consumer_secret = " cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
3840 )
3941
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+ )
4055
4156 Options
4257~~~~~~~
@@ -50,6 +65,8 @@ Options
5065+--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
5166| ``consumerSecret `` | ``string `` | yes | Your API consumer secret |
5267+--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
68+ | ``wp_api `` | ``bool `` | no | Allow requests to the WP REST API |
69+ +--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
5370| ``version `` | ``string `` | no | API version, default is ``v3 `` |
5471+--------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
5572| ``timeout `` | ``integer `` | no | Connection timeout, default is ``5 `` |
@@ -88,6 +105,11 @@ DELETE
88105
89106- ``.delete(endpoint) ``
90107
108+ OPTIONS
109+ ~~~~~~~
110+
111+ - ``.options(endpoint) ``
112+
91113Response
92114--------
93115
@@ -113,6 +135,12 @@ Example of returned data:
113135Changelog
114136---------
115137
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+
1161441.0.5 - 2015/12/07
117145~ ~~~~~~~~~~~~~~~~~
118146
0 commit comments