shopify_api 10.0.1 → 10.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +6 -6
- data/README.md +2 -6
- data/docs/usage/rest.md +5 -5
- data/lib/shopify_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ee0632a9922b5545aa35982111686fe4296040ef7277fd2a94f4cd2b0d355d3
|
4
|
+
data.tar.gz: 616678196beefce5c6ada1cac1d96c06bf4d01beec431c2606a36792c1280154
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0428496927f7d0f77c79e22457385c084f8c7a2aa05839cb0bd2c7e43b85d7e830d78995994af4a843ac9339a2a4ff64132f19054372a600e2af4d22c649b8b3'
|
7
|
+
data.tar.gz: 7d72d4177e0d8abd8a4dd6b1bcf1706e13b2325cf383021e12751a35adb02ecbfdf020e1ccc37ef94f47b753e5c95d71d22b1aab8cb47cf188190bdb23768c08
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
shopify_api (10.0.
|
4
|
+
shopify_api (10.0.2)
|
5
5
|
concurrent-ruby
|
6
6
|
hash_diff
|
7
7
|
httparty
|
@@ -79,11 +79,11 @@ GEM
|
|
79
79
|
rubocop (>= 0.90.0)
|
80
80
|
ruby-progressbar (1.11.0)
|
81
81
|
securerandom (0.2.0)
|
82
|
-
sorbet (0.5.
|
83
|
-
sorbet-static (= 0.5.
|
84
|
-
sorbet-runtime (0.5.
|
85
|
-
sorbet-static (0.5.
|
86
|
-
sorbet-static (0.5.
|
82
|
+
sorbet (0.5.9874)
|
83
|
+
sorbet-static (= 0.5.9874)
|
84
|
+
sorbet-runtime (0.5.9874)
|
85
|
+
sorbet-static (0.5.9874-universal-darwin-21)
|
86
|
+
sorbet-static (0.5.9874-x86_64-linux)
|
87
87
|
spoom (1.1.8)
|
88
88
|
sorbet (>= 0.5.9204)
|
89
89
|
sorbet-runtime (>= 0.5.9204)
|
data/README.md
CHANGED
@@ -4,12 +4,6 @@
|
|
4
4
|
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
|
5
5
|
![Build Status](https://github.com/Shopify/shopify_api/workflows/CI/badge.svg?branch=main)
|
6
6
|
|
7
|
-
## A Note About Versions
|
8
|
-
|
9
|
-
The latest release of `shopify_api` is v9. The main branch of this repo reflects the upcoming v10 release, which has some major changes. If you’re looking for the documentation / instructions for v9, you can find them [in this branch](https://github.com/Shopify/shopify_api/tree/v9).
|
10
|
-
|
11
|
-
## v10
|
12
|
-
|
13
7
|
This library provides support for Ruby [Shopify apps](https://apps.shopify.com/) to access the [Shopify Admin API](https://shopify.dev/api/admin), by making it easier to perform the following actions:
|
14
8
|
|
15
9
|
- Creating [online](https://shopify.dev/concepts/about-apis/authentication#online-access) or [offline](https://shopify.dev/concepts/about-apis/authentication#offline-access) access tokens for the Admin API via OAuth
|
@@ -21,6 +15,8 @@ In addition to the Admin API, this library also allows querying the [Storefront
|
|
21
15
|
|
22
16
|
You can use this library in any application that has a Ruby backend, since it doesn't rely on any specific framework — you can include it alongside your preferred stack and use the features that you need to build your app.
|
23
17
|
|
18
|
+
**Note**: These instructions apply to v10 or later of this package. If you're running v9 in your app, you can find the documentation [in this branch](https://github.com/Shopify/shopify_api/tree/v9).
|
19
|
+
|
24
20
|
## Requirements
|
25
21
|
|
26
22
|
To follow these usage guides, you will need to:
|
data/docs/usage/rest.md
CHANGED
@@ -22,7 +22,7 @@ The Rest Admin client offers the 4 core request methods: `get`, `delete`, `post`
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
# Load the current session to get the `accessToken`.
|
25
|
-
session = ShopifyAPI::
|
25
|
+
session = ShopifyAPI::Utils::SessionUtils.load_current_session(headers, cookies, is_online)
|
26
26
|
|
27
27
|
# Create a new client.
|
28
28
|
client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
|
@@ -38,7 +38,7 @@ some_function(response.body)
|
|
38
38
|
|
39
39
|
```ruby
|
40
40
|
# Load the current session to get the `accessToken`.
|
41
|
-
session = ShopifyAPI::
|
41
|
+
session = ShopifyAPI::Utils::SessionUtils.load_current_session(headers, cookies, is_online)
|
42
42
|
|
43
43
|
# Create a new client.
|
44
44
|
client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
|
@@ -71,7 +71,7 @@ After making a request, the `next_page_info` and `prev_page_info` can be found o
|
|
71
71
|
An example of this is shown below:
|
72
72
|
|
73
73
|
```ruby
|
74
|
-
session = ShopifyAPI::
|
74
|
+
session = ShopifyAPI::Utils::SessionUtils.load_current_session(headers, cookies, is_online)
|
75
75
|
client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
|
76
76
|
|
77
77
|
response = client.get(path: "products", query: { limit: 10 })
|
@@ -88,7 +88,7 @@ Similarly, when using REST resources the `next_page_info` and `prev_page_info` c
|
|
88
88
|
An example of this is shown below:
|
89
89
|
|
90
90
|
```ruby
|
91
|
-
session = ShopifyAPI::
|
91
|
+
session = ShopifyAPI::Utils::SessionUtils.load_current_session(headers, cookies, is_online)
|
92
92
|
|
93
93
|
products = ShopifyAPI::Product.all(session: session, limit: 10)
|
94
94
|
|
@@ -104,7 +104,7 @@ The next/previous page_info strings can also be retrieved from the response obje
|
|
104
104
|
An example of this is shown below:
|
105
105
|
|
106
106
|
```ruby
|
107
|
-
session = ShopifyAPI::
|
107
|
+
session = ShopifyAPI::Utils::SessionUtils.load_current_session(headers, cookies, is_online)
|
108
108
|
client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
|
109
109
|
|
110
110
|
response = client.get(path: "products", query: { limit: 10 })
|
data/lib/shopify_api/version.rb
CHANGED