shoptet 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shoptet.rb +6 -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: 0af32468ec0d563160e540965a801fd5858a58b3593732b93203d14e793a529b
|
|
4
|
+
data.tar.gz: a27bca5defca806f300ed29f026e626048d63c5b5ba09fa1257322f161c90657
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ba0f050445811ba5c97bc2dab23d159a38a7d290596e85da0f5d0822168ea53c3d96133293122774b4d6973d3d018fb280bfa4eccc839d28fd186d58a6bce89
|
|
7
|
+
data.tar.gz: bb7076454c31e61efbb28c9304aa97b92bd9192283337562b06c0aadc66e80061f6373a14c2d4156d668767b395ab0a555f638de16f4fa0bd20aa404e9f4f1fc
|
data/lib/shoptet.rb
CHANGED
|
@@ -28,7 +28,7 @@ class Shoptet
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def self.version
|
|
31
|
-
'0.0.
|
|
31
|
+
'0.0.48'
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def self.ar_on_token_error(model)
|
|
@@ -200,6 +200,11 @@ class Shoptet
|
|
|
200
200
|
enumerize("https://api.myshoptet.com/api/articles", api_params)
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
+
def article(id, api_params = {})
|
|
204
|
+
result = get("https://api.myshoptet.com/api/articles/#{id}", api_params)
|
|
205
|
+
result['data']['article']
|
|
206
|
+
end
|
|
207
|
+
|
|
203
208
|
def new_api_token
|
|
204
209
|
headers = { 'Authorization' => "Bearer #{@oauth_token}" }
|
|
205
210
|
|