8000 Version 2.0.0 · tomriverman/wc-api-python@d6983dc · GitHub
[go: up one dir, main page]

Skip to content

Commit d6983dc

Browse files
Version 2.0.0
1 parent 782a822 commit d6983dc

File tree

3 files changed

+22
-25
lines changed

3 files changed

+22
-25
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015, WooThemes (https://woocommerce.com/)
3+
Copyright (c) 2019, Automattic (https://woocommerce.com/)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,13 @@ Installation
2020
Getting started
2121
---------------
2222

23-
Generate API credentials (Consumer Key & Consumer Secret) following this instructions http://docs.woocommerce.com/document/woocommerce-rest-api/.
23+
Generate API credentials (Consumer Key & Consumer Secret) following this instructions http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys.
2424

2525
Check out the WooCommerce API endpoints and data that can be manipulated in http://woocommerce.github.io/woocommerce-rest-api-docs/.
2626

2727
Setup
2828
-----
2929

30-
Setup for the old WooCommerce API v3:
31-
32-
.. code-block:: python
33-
34-
from woocommerce import API
35-
36-
wcapi = API(
37-
url="http://example.com",
38-
consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
39-
consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
40-
)
41-
42-
Setup for the new WP REST API integration (WooCommerce 2.6 or later):
43-
4430
.. code-block:: python
4531
4632
from woocommerce import API
@@ -50,7 +36,7 @@ Setup for the new WP REST API integration (WooCommerce 2.6 or later):
5036
consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5137
consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5238
wp_api=True,
53-
version="wc/v1"
39+
version="wc/v3"
5440
)
5541
5642
Options
@@ -75,6 +61,8 @@ Options
7561
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
7662
| ``query_string_auth`` | ``bool`` | no | Force Basic Authentication as query string when ``True`` and using under HTTPS, default is ``False`` |
7763
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
64+
| ``oauth_timestamp`` | ``integer`` | no | Custom timestamp for requests made with oAuth1.0a |
65+
+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+
7866

7967
Methods
8068
-------
@@ -86,31 +74,33 @@ Methods
8674
+--------------+----------------+------------------------------------------------------------------+
8775
| ``data`` | ``dictionary`` | Data that will be converted to JSON |
8876
+--------------+----------------+------------------------------------------------------------------+
77+
| ``**kwargs`` | ``dictionary`` | Accepts ``params``, also other Requests arguments |
78+
+--------------+----------------+------------------------------------------------------------------+
8979

9080
GET
9181
~~~
9282

93-
- ``.get(endpoint)``
83+
- ``.get(endpoint, **kwargs)``
9484

9585
POST
9686
~~~~
9787

98-
- ``.post(endpoint, data)``
88+
- ``.post(endpoint, data, **kwargs)``
9989

10090
PUT
10191
~~~
10292

103-
- ``.put(endpoint, data)``
93+
- ``.put(endpoint, data), **kwargs``
10494

10595
DELETE
10696
~~~~~~
10797

108-
- ``.delete(endpoint)``
98+
- ``.delete(endpoint, **kwargs)``
10999

110100
OPTIONS
111101
~~~~~~~
112102

113-
- ``.options(endpoint)``
103+
- ``.options(endpoint, **kwargs)``
114104

115105
Response
116106
--------
@@ -137,6 +127,13 @@ Example of returned data:
137127
Changelog
138128
---------
139129
130+
2.0.0 - 2019/01/15
131+
~~~~~~~~~~~~~~~~~~
132+
133+
- Updated "Requests" library to version 2.20.0.
134+
- Added support for custom timestamps in oAuth1.0a requests with ``oauth_timestamp``.
135+
- Allow pass custom arguments to "Requests" library.
136+
140137
1.2.1 - 2016/12/14
141138
~~~~~~~~~~~~~~~~~~
142139

woocommerce/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
~~~~~~~~~~~~~~~
66
A Python wrapper for WooCommerce API.
77
8-
:copyright: (c) 2015 by WooThemes.
8+
:copyright: (c) 2019 by Automattic.
99
:license: MIT, see LICENSE for details.
1010
"""
1111

1212
__title__ = "woocommerce"
13-
__version__ = "1.2.1"
14-
__author__ = "Claudio Sanches @ WooThemes"
13+
__version__ = "2.0.0"
14+
__author__ = "Claudio Sanches @ Automattic"
1515
__license__ = "MIT"
1616

1717
from woocommerce.api import API

0 commit comments

Comments
 (0)
0