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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shoptet.rb +6 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afa1545fe6d8f26c47a02e80a4ae9a38c7a507f26a43c672ce95c535b12483b3
4
- data.tar.gz: 061653f624102ffe84ccd5bf8c80d6c1a6e10a1a43344565ea5071f1c33da816
3
+ metadata.gz: 0af32468ec0d563160e540965a801fd5858a58b3593732b93203d14e793a529b
4
+ data.tar.gz: a27bca5defca806f300ed29f026e626048d63c5b5ba09fa1257322f161c90657
5
5
  SHA512:
6
- metadata.gz: 0c7433b0d9873b7c3e2292bea93831df1edf357d8d17b983dc17c37704d9b1edcad11e1223160bde07630334a06a141f87978fbe536f99312cf9a97784274986
7
- data.tar.gz: bdef7d0883e4b40fe0c92f8ded32addaff3cea66d4daae5b96d7b823fd9af84c39e9a4c88dfc73b26443daaa99febfbf642e9cce3bd4e79d2103409d394d4e58
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.47'
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoptet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.47
4
+ version: 0.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Premysl Donat