akeneo 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ceae0d98a3a51eb730060c096c934d7f14b3dff228fc244403a131c0674ad80
4
- data.tar.gz: 387550bb60ddf5244911e8f165e6f6f80393ed5ec29d54462c6340ff63c12051
3
+ metadata.gz: e23e9957d939ac3ec1b78110e9c1488e9b7603661a635bb2c0ea6ec7ea6de067
4
+ data.tar.gz: 03c61f430ae6e7df2ea18d687b6a0a4fbe969d983bcfca02fe8c72e27d213a4f
5
5
  SHA512:
6
- metadata.gz: ead5fb44cb4e481a6898549a277449ec60b9f42b4e53b0596bf3cab02dac607fd44592a9d96960798cba356e16e79956d78a3df43ff21a8ce0d30484e9eeb95f
7
- data.tar.gz: b38e87a0894c3e7e9a9e4c95d24a138747a772e6bdc49b48fb0fbb82f29c6881c6174483b81cb35b06e50f8b30640bd27afeec69404c1b0d654e9921432d20ff
6
+ metadata.gz: 24adead0b454a21ba3f9d5e01c08f8bfc03284451b29deedafa6ff1b971d030839d0f66fd3a0e5264e7c92accf24e3aee2f7a0c837e320eced2b469f1acaffaf
7
+ data.tar.gz: 1b73fae84742e1e1a94066f96db9186e5795a31d28d0a6c9db5b41cbe1ad18ca1b3cec0697b115634d00d54b406114d29d5a96fcf5f4b0ce0e20c12e70cf4c97
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- akeneo (1.4.0)
4
+ akeneo (1.5.0)
5
5
  httparty
6
6
  mime-types
7
7
  redis
data/akeneo.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'akeneo'
8
- spec.version = '1.4.1'
8
+ spec.version = '1.5.0'
9
9
  spec.authors = ['AWN Dev Team']
10
10
  spec.email = ['edv@awn.de']
11
11
 
data/lib/akeneo/api.rb CHANGED
@@ -66,6 +66,10 @@ module Akeneo
66
66
  image_service.download(code)
67
67
  end
68
68
 
69
+ def download_file(code)
70
+ media_files_service.download(code)
71
+ end
72
+
69
73
  def product_parent_or_grand_parent(code)
70
74
  product_parent = product_model_service.find(code)
71
75
 
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './service_base.rb'
4
+
5
+ module Akeneo
6
+ class MediaFilesService < ServiceBase
7
+ def find(code)
8
+ response = get_request("/media-files/#{code}")
9
+
10
+ response.parsed_response if response.success?
11
+ end
12
+
13
+ def download(code)
14
+ response = get_request("/media-files/#{code}/download")
15
+
16
+ response.parsed_response if response.success?
17
+ end
18
+ end
19
+ end
@@ -9,6 +9,7 @@ require_relative './measure_family_service'
9
9
  require_relative './product_model_service'
10
10
  require_relative './product_service'
11
11
  require_relative './published_product_service'
12
+ require_relative './media_files_service'
12
13
 
13
14
  module Akeneo
14
15
  module Services
@@ -52,5 +53,9 @@ module Akeneo
52
53
  def published_product_service
53
54
  PublishedProductService.new(url: url, access_token: fresh_access_token)
54
55
  end
56
+
57
+ def media_files_service
58
+ MediaFilesService.new(url: url, access_token: fresh_access_token)
59
+ end
55
60
  end
56
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akeneo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AWN Dev Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-10 00:00:00.000000000 Z
11
+ date: 2019-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -153,6 +153,7 @@ files:
153
153
  - lib/akeneo/family_service.rb
154
154
  - lib/akeneo/image_service.rb
155
155
  - lib/akeneo/measure_family_service.rb
156
+ - lib/akeneo/media_files_service.rb
156
157
  - lib/akeneo/product_model_service.rb
157
158
  - lib/akeneo/product_service.rb
158
159
  - lib/akeneo/published_product_service.rb
@@ -178,8 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
179
  - !ruby/object:Gem::Version
179
180
  version: '0'
180
181
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.7.6
182
+ rubygems_version: 3.0.2
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: API client for accessing Akeneo