8000 updated readme · boostsup/wp-api-python@1dea17e · GitHub
[go: up one dir, main page]

Skip to content

Commit 1dea17e

Browse files
author
derwentx
committed
updated readme
thanks Paul
1 parent 1de6d03 commit 1dea17e

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

README.rst

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Setup for the old Wordpress API:
9595
)
9696
9797
Setup for the new WP REST API v2:
98+
(Note: the username and password are required so that it can fill out the oauth request token form automatically for you)
9899

99100
.. code-block:: python
100101
@@ -107,7 +108,9 @@ Setup for the new WP REST API v2:
107108
api="wp-json",
108109
version="wp/v2",
109110
wp_user="XXXX",
110-
wp_pass="XXXX"
111+
wp_pass="XXXX",
112+
oauth1a_3leg=True,
113+
creds_store="~/.wc-api-creds.json"
111114
)
112115
113116
Setup for the old WooCommerce API v3:
@@ -141,27 +144,29 @@ Setup for the new WP REST API integration (WooCommerce 2.6 or later):
141144
Options
142145
~~~~~~~
143146

144-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
145-
| Option | Type | Required | Description |
146-
+=======================+=============+==========+=======================================================================================================+
147-
| ``url`` | ``string`` | yes | Your Store URL, example: http://wp.dev/ |
148-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
149-
| ``consumerKey`` | ``string`` | yes | Your API consumer key |
150-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
151-
| ``consumerSecret`` | ``string`` | yes | Your API consumer secret |
152-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
153-
| ``api`` | ``string`` | no | Determines which api to use, defaults to ``wp-json``, can be arbitrary: ``wc-api``, ``oembed`` |
154-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
155-
| ``version`` | ``string`` | no | API version, default is ``wp/v2``, can be ``v3`` or ``wc/v1`` if using ``wc-api`` |
156-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
157-
| ``timeout`` | ``integer`` | no | Connection timeout, default is ``5`` |
158-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
159-
| ``verify_ssl`` | ``bool`` | no | Verify SSL when connect, use this option as ``False`` when need to test with self-signed certificates |
160-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
161-
| ``basic_auth`` | ``bool`` | no | Force Basic Authentication, can be through query string or headers (default) |
162-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
163-
| ``query_string_auth`` | ``bool`` | no | Force Basic Authentication as query string when ``True`` and using under HTTPS, default is ``False`` |
164-
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
147+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
148+
| Option | Type | Required | Description |
149+
+=======================+=============+==========+==================================================================================================================+
150+
| ``url`` | ``string`` | yes | Your Store URL, example: http://wp.dev/ |
151+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
152+
| ``consumerKey`` | ``string`` | yes | Your API consumer key |
153+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
154+
| ``consumerSecret`` | ``string`` | yes | Your API consumer secret |
155+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
156+
| ``api`` | ``string`` | no | Determines which api to use, defaults to ``wp-json``, can be arbitrary: ``wc-api``, ``oembed`` |
157+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
158+
| ``version`` | ``string`` | no | API version, default is ``wp/v2``, can be ``v3`` or ``wc/v1`` if using ``wc-api`` |
159+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
160+
| ``timeout`` | ``integer`` | no | Connection timeout, default is ``5`` |
161+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
162+
| ``verify_ssl`` | ``bool`` | no | Verify SSL when connect, use this option as ``False`` when need to test with self-signed certificates |
163+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
164+
| ``basic_auth`` | ``bool`` | no | Force Basic Authentication, can be through query string or headers (default) |
165+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
166+
| ``query_string_auth`` | ``bool`` | no | Use query string for Basic Authentication when ``True`` and using HTTPS, default is ``False`` which uses header |
167+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
168+
| ``creds_store`` | ``string`` | no | JSON file where oauth verifier is stored (only used with OAuth_3Leg) |
169+
+-----------------------+-------------+----------+------------------------------------------------------------------------------------------------------------------+
165170

166171
Methods
167172
-------

0 commit comments

Comments
 (0)
0