pdfire 1.0.0 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d3727f14b8734acd147be9b85d18a9c10f34ed34ee1766a607f91f813de491e
4
- data.tar.gz: db688ae02085f6360a0108711ebf6e7111ba01f7fcb5b258092f19827ca5071d
3
+ metadata.gz: cecb8112e6c3ea6117bd793f81846d7e1dfb2f2e9096266de0f823efad911967
4
+ data.tar.gz: 1d383f9e1104f4089d7aee3ec6f8ef554fed3d723bbbdbf7f190209c9319fb3d
5
5
  SHA512:
6
- metadata.gz: 477908a745b6629d6dde7df73752771ec02f775aa2ec5b1d57ec8fd501d2437b7f805a85e71262cd0b2c03e63686ee37cd89f98dabea776a40ace1930d005a9a
7
- data.tar.gz: 0d2707b3e7a6c9be8141c5ccf8da79111a4f252ce0b757ecdad575146115c12e887dde62ba698138ea737229084d921ddbec4c35ad59c25d73682c74eb4a187b
6
+ metadata.gz: 03b71eff8348d8ddb9184f67dd270965547d72932f419b78204e27c4a831221eaa0d94409cfb24ff3ea4c152dae1740b0efe98823c4dd132208ddb1521b6bc11
7
+ data.tar.gz: 3c6648c5eb75450c214572548d8be2f9e2df792ab541542abbe5269c986b43bb2fa61cb2980e5d648847a5140b63a585dbca24c051a05a431b4d120227e285bc
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![GitHub](https://img.shields.io/github/license/modernice/pdfire-ruby?style=flat-square)
4
4
 
5
- This PHP package provides a client for the [PDFire.io](https://pdfire.io) API. Read the [Documentation](https://docs.pdfire.io) for a list of available options.
5
+ This package provides a client for the [PDFire.io](https://pdfire.io) API. Read the [Documentation](https://docs.pdfire.io) for a list of available options.
6
6
 
7
7
  ## Installation
8
8
 
@@ -73,6 +73,19 @@ module PDFire
73
73
  self.convert params
74
74
  end
75
75
 
76
+ # @param params [ConversionParams, MergeParams] the conversion/merge parameters.
77
+ # @param options [Hash] the storage options.
78
+ # @return [Conversion] the conversion.
79
+ def convert_using_storage(params, options = nil)
80
+ if options != nil
81
+ params.storage = options
82
+ else
83
+ params.storage = true
84
+ end
85
+
86
+ self.convert params
87
+ end
88
+
76
89
  def result(response)
77
90
  content_type = response.header['content-type']
78
91
 
@@ -6,6 +6,8 @@ module PDFire
6
6
  attr_accessor :url
7
7
  # @return [Boolean]
8
8
  attr_accessor :cdn
9
+ # @return [Boolean, Hash]
10
+ attr_accessor :storage
9
11
  # @return [Boolean]
10
12
  attr_accessor :landscape
11
13
  # @return [Boolean]
@@ -79,6 +81,7 @@ module PDFire
79
81
  map['html'] = @html if @html != nil
80
82
  map['url'] = @url if @url != nil
81
83
  map['cdn'] = @cdn if @cdn != nil
84
+ map['storage'] = @storage if @storage != nil
82
85
  map['landscape'] = @landscape if @landscape != nil
83
86
  map['printBackground'] = @print_background if @print_background != nil
84
87
  map['scale'] = @scale if @scale != nil
@@ -4,14 +4,17 @@ module PDFire
4
4
  attr_accessor :documents
5
5
  # @return [Boolean]
6
6
  attr_accessor :cdn
7
+ # @return [Boolean, Hash]
8
+ attr_accessor :storage
7
9
  # @return [String]
8
10
  attr_accessor :owner_password
9
11
  # @return [String]
10
12
  attr_accessor :user_password
11
13
 
12
- def initialize(documents = [], cdn = nil, owner_password = nil, user_password = nil)
14
+ def initialize(documents = [], cdn = nil, storage = nil, owner_password = nil, user_password = nil)
13
15
  @documents = documents
14
16
  @cdn = cdn
17
+ @storage = storage
15
18
  @owner_password = owner_password
16
19
  @user_password = user_password
17
20
  end
@@ -20,6 +23,7 @@ module PDFire
20
23
  map = {}
21
24
  map['documents'] = @documents.map { |doc| doc.to_map } if @documents.length > 0
22
25
  map['cdn'] = @cdn if @cdn != nil
26
+ map['storage'] = @storage if @storage != nil
23
27
  map['ownerPassword'] = @owner_password if @owner_password != nil
24
28
  map['userPassword'] = @user_password if @user_password != nil
25
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfire
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - modernice Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-22 00:00:00.000000000 Z
11
+ date: 2019-10-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: PDFire API client for ruby. Get an API key at https://pdfire.io
14
14
  email: info@modernice.ltd