You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
## Unreleased
2
+
3
+
-[#891](https://github.com/Shopify/shopify_api/pull/891) Removed the upper bound on the `activeresource` dependency to allow apps to use the latest version
4
+
1
5
## Version 9.5
2
6
3
7
*[#883](https://github.com/Shopify/shopify_api/pull/883) Add support for Ruby 3.0
Copy file name to clipboardExpand all lines: README.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ For more information and detailed documentation about the API visit https://deve
61
61
62
62
This gem requires Ruby 2.4 as of version 7.0.
63
63
64
+
**Note**: when we release the next major version, we will be dropping support for Ruby 2.4 and 2.5, which have now reached EOL, as per [the releases page](https://www.ruby-lang.org/en/downloads/branches/).
65
+
64
66
## Installation
65
67
66
68
Add `shopify_api` to your `Gemfile`:
@@ -87,13 +89,13 @@ ShopifyAPI sessions need to be configured with a fully authorized URL of a parti
87
89
88
90
### 1) Create an app
89
91
90
-
First, create a new application in either the partners admin or your store admin.
92
+
First, create a new application in either the partners admin or your store admin.
91
93
92
94
**Private apps** are used for merchant-owned scripts and apps that run silently in the background on a single shop. Private apps aren't able to render any content in the admin. Private apps are created through the store admin.
93
95
94
96
**Custom apps** are also used for a single shop, but they have access to [app extensions](https://shopify.dev/docs/app-extensions) that allow the app to render content in the admin and are managed and created through the partners dashboard.
95
97
96
-
**Public apps** can be installed on many stores, and can be added to the Shopify App Store to generate revenue for the developer.
98
+
**Public apps** can be installed on many stores, and can be added to the Shopify App Store to generate revenue for the developer.
97
99
98
100
For a private app, you'll need the API_KEY and the PASSWORD; otherwise, you'll need the API_KEY and SHARED_SECRET.
99
101
@@ -112,7 +114,7 @@ For a private App you just need to set the base site url as follows:
112
114
That's it; you're done! Next, skip to step 6 and start using the API!
113
115
114
116
### 2B) Public and Custom Apps
115
-
117
+
116
118
For public and custom apps, you will need to supply two parameters to the Session class before you instantiate it:
117
119
118
120
```ruby
@@ -130,11 +132,11 @@ Public and Custom apps need an access token from each shop to access that shop's
130
132
```ruby
131
133
# We need to instantiate the session object before using it
After creating the permission URL, the user should be directed to this URL to approve the app.
139
141
140
142
Under the hood, the `create_permission_url` method is preparing the app to make the following request :
@@ -167,8 +169,8 @@ Once authorized, the shop redirects the owner to the return URL of your applicat
167
169
token = shopify_session.request_token(params)
168
170
```
169
171
170
-
This method will save the token to the session object and return it. All fields returned by Shopify, other than the access token itself, are stored in the session's `extra` attribute. For a list of all fields returned by Shopify, read [our OAuth documentation](https://shopify.dev/tutorials/authenticate-with-oauth#confirming-installation).
171
-
172
+
This method will save the token to the session object and return it. All fields returned by Shopify, other than the access token itself, are stored in the session's `extra` attribute. For a list of all fields returned by Shopify, read [our OAuth documentation](https://shopify.dev/tutorials/authenticate-with-oauth#confirming-installation).
173
+
172
174
If you prefer to exchange the token manually, you can make a POST request to the shop with the following parameters :
173
175
174
176
```
@@ -198,7 +200,7 @@ Once authorized, the shop redirects the owner to the return URL of your applicat
198
200
1) The list of scopes in `shopify_session.extra['scope']` is the same as you requested.
199
201
2) If you requested an online-mode access token, `shopify_session.extra['associated_user']` must be present.
200
202
Failing either of these tests means the end-user may have tampered with the URL parameters during the OAuth authentication phase. You should avoid using this access token and revoke it immediately. If you use the [`omniauth-shopify-oauth2`](https://github.com/Shopify/omniauth-shopify-oauth2) gem, these checks are done automatically for you.
201
-
203
+
202
204
### 5) Activating the session
203
205
204
206
Once you have a token, simply pass in the `token` and `extra` hash (optional) when creating the session object:
@@ -333,7 +335,7 @@ If you were previously using Shopify's [activeresource fork](https://github.com/
333
335
334
336
## Bulk Operations
335
337
336
-
With the GraphQL Admin API, you can use bulk operations to asynchronously fetch data in bulk. The API is designed to reduce complexity and improve performance when dealing with large volumes of data.
338
+
With the GraphQL Admin API, you can use bulk operations to asynchronously fetch data in bulk. The API is designed to reduce complexity and improve performance when dealing with large volumes of data.
337
339
338
340
Instead of manually paginating results and managing a client-side throttle, you can instead run a bulk query operation. Shopify’s infrastructure does the hard work of executing your query, and then provides you with a URL where you can download all of the data.
339
341
@@ -465,7 +467,7 @@ end
465
467
466
468
## Pagination
467
469
468
-
Shopify uses [Relative cursor-based pagination](https://shopify.dev/tutorials/make-paginated-requests-to-rest-admin-api) to provide more than a single page of results.
470
+
Shopify uses [Relative cursor-based pagination](https://shopify.dev/tutorials/make-paginated-requests-to-rest-admin-api) to provide more than a single page of results.
puts("\nshopify_api: NOTE: Support for Ruby #{RUBY_VERSION} will be dropped in the next major release. Please update to Ruby 2.6 or newer before updating this gem.\n\n")
0 commit comments