Skip to content

Commit c86fba6

Browse files
authored
Merge branch 'master' into feat/ipython-console
2 parents c1df763 + 763a82e commit c86fba6

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

CHANGELOG

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
== Unreleased
22

3-
== 12.4.0
3+
- Remove `cgi` import to avoid triggering a `DeprecationWarning` on Python 3.11.
4+
5+
== Version 12.4.0
46

57
- Update API version with 2023-07, 2023-10, 2024-01 releases ([#694](https://github.com/Shopify/shopify_python_api/pull/694))
68

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ pip install --upgrade ShopifyAPI
4646
1. We then need to supply these keys to the Shopify Session Class so that it knows how to authenticate.
4747

4848
```python
49+
import shopify
50+
4951
shopify.Session.setup(api_key=API_KEY, secret=API_SECRET)
5052
```
5153
1. In order to access a shop's data, apps need an access token from that specific shop. We need to authenticate with that shop using OAuth, which we can start in the following way:
5254

5355
```python
5456
shop_url = "SHOP_NAME.myshopify.com"
55-
api_version = '2020-10'
57+
api_version = '2024-01'
5658
state = binascii.b2a_hex(os.urandom(15)).decode("utf-8")
5759
redirect_uri = "http://myapp.com/auth/shopify/callback"
5860
scopes = ['read_products', 'read_orders']
@@ -160,6 +162,12 @@ product.destroy()
160162
# Delete the resource from the remote server (i.e. Shopify)
161163
```
162164

165+
Here is another example to retrieve a list of open orders using certain parameters:
166+
167+
```python
168+
new_orders = shopify.Order.find(status="open", limit="50")
169+
```
170+
163171
### Prefix options
164172

165173
Some resources such as `Fulfillment` are prefixed by a parent resource in the Shopify API (e.g. `orders/450789469/fulfillments/255858046`). In order to interact with these resources, you must specify the identifier of the parent resource in your request.
@@ -242,7 +250,7 @@ python setup.py test
242250
## Relative Cursor Pagination
243251
Cursor based pagination support has been added in 6.0.0.
244252

245-
```
253+
```python
246254
import shopify
247255

248256
page1 = shopify.Product.find()

shopify/collection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
from pyactiveresource.collection import Collection
2-
from six.moves.urllib.parse import urlparse, parse_qs
3-
import cgi
42

53

64
class PaginatedCollection(Collection):

0 commit comments

Comments
 (0)