grabzit 3.2.5 → 3.2.6

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
  SHA1:
3
- metadata.gz: 5b97db3e94be5fa244c215fc27499a93b843ae56
4
- data.tar.gz: 57f776fddaab20da5dfc77be83483716600808ac
3
+ metadata.gz: 700e28b31c62af28d995d0216e0651163583231a
4
+ data.tar.gz: ab739b9a8bf416a40b502def792aca8b80a06615
5
5
  SHA512:
6
- metadata.gz: 2dff82812656f1225cef45faf21c67cb45ed9f552c2b3b0123b06bc9442bc7bbbc1213b2e460ba18430baee3baf35dfeea82bb65c69ad267e3624a59c0db26e6
7
- data.tar.gz: f127bd2d14687c79099a16f08a7423bf0f653debd2ae2781bb19e7851764f95c4079623268eb85ea4891d72062ce9c9e994c52e4416d55a5d670e55229da7d5f
6
+ metadata.gz: 135c983b0a7831b401261b2b678a866ad823210c3d13f4da2a1ba775583637b092d5f2aa4cb1f8dd727a0fda32db42075795e0656f17b4b065610be146e5a732
7
+ data.tar.gz: acd10da565b98cf59582fe9820bdc5cb883d086c3bea7fbec7f5e76e1c7f5b7b29e5f6bca71b521443f88c20a4f20ada9d52c26db67c888c3809c7d96a264869
@@ -21,6 +21,12 @@ module GrabzIt
21
21
  @hideElement = nil
22
22
  @waitForElement = nil
23
23
  @noAds = false
24
+ @browserWidth = nil
25
+ @templateVariables = nil
26
+ @width = nil
27
+ @height = nil
28
+ @templateId = nil
29
+ @targetElement = nil
24
30
  end
25
31
 
26
32
  # @return [Boolean] true if the background images of the web page should be included in the DOCX
@@ -155,6 +161,45 @@ module GrabzIt
155
161
  @marginRight = value
156
162
  end
157
163
 
164
+ # @return [Integer] the width of the browser in pixels
165
+ def browserWidth
166
+ @browserWidth
167
+ end
168
+
169
+ # Set the width of the browser in pixels
170
+ #
171
+ # @param value [Integer] the browser width
172
+ # @return [void]
173
+ def browserWidth(value)
174
+ @browserWidth = value
175
+ end
176
+
177
+ # @return [Integer] get the page width of the resulting DOCX in mm.
178
+ def pageWidth
179
+ @width
180
+ end
181
+
182
+ # Set the page width of the resulting DOCX in mm
183
+ #
184
+ # @param value [Integer] the width
185
+ # @return [void]
186
+ def pageWidth(value)
187
+ @width = value
188
+ end
189
+
190
+ # @return [Integer] get the page height of the resulting DOCX in mm
191
+ def pageHeight
192
+ @height
193
+ end
194
+
195
+ # Set the page height of the resulting DOCX in mm
196
+ #
197
+ # @param value [Integer] the height
198
+ # @return [void]
199
+ def pageHeight(value)
200
+ @height = value
201
+ end
202
+
158
203
  # @return [Integer] the number of milliseconds to wait before creating the capture
159
204
  def delay
160
205
  @delay
@@ -179,7 +224,20 @@ module GrabzIt
179
224
  # @return [void]
180
225
  def requestAs(value)
181
226
  @requestAs = value
182
- end
227
+ end
228
+
229
+ # @return [String] the template ID that specifies the header and footer of the DOCX document
230
+ def templateId
231
+ @templateId
232
+ end
233
+
234
+ # Set a template ID that specifies the header and footer of the DOCX document
235
+ #
236
+ # @param value [String] template id
237
+ # @return [void]
238
+ def templateId(value)
239
+ @templateId = value
240
+ end
183
241
 
184
242
  # @return [Integer] the quality of the DOCX.
185
243
  def quality
@@ -194,6 +252,19 @@ module GrabzIt
194
252
  @quality = value
195
253
  end
196
254
 
255
+ # @return [String] get the CSS selector of the only HTML element in the web page to capture
256
+ def targetElement
257
+ @targetElement
258
+ end
259
+
260
+ # Set the CSS selector of the only HTML element in the web page to capture
261
+ #
262
+ # @param value [String] the target element
263
+ # @return [void]
264
+ def targetElement(value)
265
+ @targetElement = value
266
+ end
267
+
197
268
  # @return [String] get the CSS selector(s) of the one or more HTML elements in the web page to hide
198
269
  def hideElement
199
270
  @hideElement
@@ -242,6 +313,14 @@ module GrabzIt
242
313
  @post = appendParameter(@post, name, value)
243
314
  end
244
315
 
316
+ # Define a custom template parameter and value, this method can be called multiple times to add multiple parameters.
317
+ #
318
+ # @param name [String] the name of the template parameter
319
+ # @param value [String] the value of the template parameter
320
+ def add_template_parameter(name, value)
321
+ @templateVariables = appendParameter(@templateVariables, name, value)
322
+ end
323
+
245
324
  # @!visibility private
246
325
  def _getSignatureString(applicationSecret, callBackURL, url = nil)
247
326
  urlParam = ''
@@ -259,7 +338,7 @@ module GrabzIt
259
338
  GrabzIt::Utility.b_to_str(@includeImages)+"|"+GrabzIt::Utility.b_to_str(@includeLinks)+"|"+
260
339
  GrabzIt::Utility.nil_check(@title)+"|"+GrabzIt::Utility.nil_int_check(@marginTop)+"|"+GrabzIt::Utility.nil_int_check(@marginLeft)+
261
340
  "|"+GrabzIt::Utility.nil_int_check(@marginBottom)+"|"+GrabzIt::Utility.nil_int_check(@marginRight)+"|"+GrabzIt::Utility.nil_int_check(@delay)+"|"+
262
- GrabzIt::Utility.nil_int_check(@requestAs)+"|"+GrabzIt::Utility.nil_check(@country)+"|"+GrabzIt::Utility.nil_int_check(@quality)+"|"+GrabzIt::Utility.nil_check(@hideElement)+"|"+GrabzIt::Utility.nil_check(@exportURL)+"|"+GrabzIt::Utility.nil_check(@waitForElement)+"|"+GrabzIt::Utility.nil_check(@encryptionKey)+"|"+GrabzIt::Utility.b_to_str(@noAds)+"|"+GrabzIt::Utility.nil_check(@post)
341
+ GrabzIt::Utility.nil_int_check(@requestAs)+"|"+GrabzIt::Utility.nil_check(@country)+"|"+GrabzIt::Utility.nil_int_check(@quality)+"|"+GrabzIt::Utility.nil_check(@hideElement)+"|"+GrabzIt::Utility.nil_check(@exportURL)+"|"+GrabzIt::Utility.nil_check(@waitForElement)+"|"+GrabzIt::Utility.nil_check(@encryptionKey)+"|"+GrabzIt::Utility.b_to_str(@noAds)+"|"+GrabzIt::Utility.nil_check(@post)+"|"+GrabzIt::Utility.nil_check(@targetElement)+"|"+GrabzIt::Utility.nil_check(@templateId)+"|"+GrabzIt::Utility.nil_check(@templateVariables)+"|"+GrabzIt::Utility.nil_int_check(@height)+"|"+GrabzIt::Utility.nil_int_check(@width)+"|"+GrabzIt::Utility.nil_int_check(@browserWidth)
263
342
  end
264
343
 
265
344
  # @!visibility private
@@ -282,6 +361,12 @@ module GrabzIt
282
361
  params['waitfor'] = GrabzIt::Utility.nil_check(@waitForElement)
283
362
  params['noads'] = GrabzIt::Utility.b_to_str(@noAds)
284
363
  params['post'] = GrabzIt::Utility.nil_check(@post)
364
+ params['templateid'] = GrabzIt::Utility.nil_check(@templateId)
365
+ params['target'] = GrabzIt::Utility.nil_check(@targetElement)
366
+ params['bwidth'] = GrabzIt::Utility.nil_int_check(@browserWidth)
367
+ params['width'] = GrabzIt::Utility.nil_int_check(@width)
368
+ params['height'] = GrabzIt::Utility.nil_int_check(@height)
369
+ params['tvars'] = GrabzIt::Utility.nil_check(@templateVariables)
285
370
 
286
371
  return params;
287
372
  end
@@ -241,12 +241,12 @@ module GrabzIt
241
241
  @requestAs = value
242
242
  end
243
243
 
244
- # @return [String] the PDF template ID that specifies the header and footer of the PDF document
244
+ # @return [String] the template ID that specifies the header and footer of the PDF document
245
245
  def templateId
246
246
  @templateId
247
247
  end
248
248
 
249
- # Set a PDF template ID that specifies the header and footer of the PDF document
249
+ # Set a template ID that specifies the header and footer of the PDF document
250
250
  #
251
251
  # @param value [String] template id
252
252
  # @return [void]
@@ -341,10 +341,10 @@ module GrabzIt
341
341
  @post = appendParameter(@post, name, value)
342
342
  end
343
343
 
344
- # Define a custom PDF Template parameter and value, this method can be called multiple times to add multiple parameters.
344
+ # Define a custom template parameter and value, this method can be called multiple times to add multiple parameters.
345
345
  #
346
- # @param name [String] the name of the PDF template parameter
347
- # @param value [String] the value of the PDF template parameter
346
+ # @param name [String] the name of the template parameter
347
+ # @param value [String] the value of the template parameter
348
348
  def add_template_parameter(name, value)
349
349
  @templateVariables = appendParameter(@templateVariables, name, value)
350
350
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grabzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - GrabzIt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake