grabzit 3.5.4 → 3.5.5

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: 2a8a19888be59015aa66b1794e2bd0ccf7c395272c98e65b7156b4d921b7f8c6
4
- data.tar.gz: 57d2ac4496d215398896a0e30162c71885e8b29e955a5fedfa9f279484367b24
3
+ metadata.gz: df792693d263dcc1b31d91efdf5f9f525ee841606d2eccd42ad22b6ba164b8bf
4
+ data.tar.gz: 3444e66ad75242f483cb70a432f8598a6cff04fa00171922942c22d9bc4f9282
5
5
  SHA512:
6
- metadata.gz: bf4947d9f5b5055806281a167944ab1d83ef3b9d14bb32204393f6d47a9a70cab5e5e88785c871eeaf31657ae59d7c4a50693ac41eef1d78a3d55640cbd31981
7
- data.tar.gz: 6d735f28a68c328d3187ca76638660380777399e3bc4a4536adc850536e5bcd29e4a9174978bebbb946da5c936fae3d5816e00821eb91530a82ff19e03d1c668
6
+ metadata.gz: c68b013f321fdf1b0450bc16e0d87f12a49b487a3d84bf98963cc18649b9fa8eaf60d8890ac261d03fe7a75d62296a41cf57d4d8311145d31ddd2f7c3943d795
7
+ data.tar.gz: 61c79394dcb208bcc1ee540c8b48a0f2115e6b99ae65d308d8d89ba51b8c5255fc0e6854fa77e3516029049b1c2aba6fcc851584b06e411579d0f7fd8c347a61
@@ -33,6 +33,7 @@ module GrabzIt
33
33
  @address = nil
34
34
  @password = nil
35
35
  @clickElement = nil
36
+ @jsCode = nil
36
37
  end
37
38
 
38
39
  # @return [Boolean] true if the background images of the web page should be included in the DOCX
@@ -392,6 +393,19 @@ module GrabzIt
392
393
  def add_template_parameter(name, value)
393
394
  @templateVariables = appendParameter(@templateVariables, name, value)
394
395
  end
396
+
397
+ # @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
398
+ def jsCode
399
+ @jsCode
400
+ end
401
+
402
+ # Set the JavaScript code that will be execute in the web page before the capture is performed
403
+ #
404
+ # @param value [String] the javascript to execute
405
+ # @return [void]
406
+ def jsCode=(value)
407
+ @jsCode = value
408
+ end
395
409
 
396
410
  # @!visibility private
397
411
  def _getSignatureString(applicationSecret, callBackURL, url = nil)
@@ -401,7 +415,7 @@ module GrabzIt
401
415
  items.push(GrabzIt::Utility.nil_check(url))
402
416
  end
403
417
 
404
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.b_to_str(@includeImages),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),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),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement))
418
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.b_to_str(@includeImages),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),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),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
405
419
  return items.join("|")
406
420
  end
407
421
 
@@ -436,6 +450,7 @@ module GrabzIt
436
450
  params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
437
451
  params['password'] = GrabzIt::Utility.nil_check(@password)
438
452
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
453
+ params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
439
454
 
440
455
  return params;
441
456
  end
@@ -14,6 +14,8 @@ module GrabzIt
14
14
  @noAds = false
15
15
  @noCookieNotifications = false
16
16
  @address = nil
17
+ @clickElement = nil
18
+ @jsCode = nil
17
19
  end
18
20
 
19
21
  # @return [Integer] the width of the browser in pixels
@@ -67,6 +69,19 @@ module GrabzIt
67
69
  def waitForElement=(value)
68
70
  @waitForElement = value
69
71
  end
72
+
73
+ # @return [String] get the CSS selector of the HTML element in the web page that must clicked before the capture is performed
74
+ def clickElement
75
+ @clickElement
76
+ end
77
+
78
+ # Set the CSS selector of the HTML element in the web page that must clicked before the capture is performed
79
+ #
80
+ # @param value [String] the element to click
81
+ # @return [void]
82
+ def clickElement=(value)
83
+ @clickElement = value
84
+ end
70
85
 
71
86
  # @return [Integer] get which user agent type should be used
72
87
  def requestAs
@@ -119,6 +134,19 @@ module GrabzIt
119
134
  def address=(value)
120
135
  @address = value
121
136
  end
137
+
138
+ # @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
139
+ def jsCode
140
+ @jsCode
141
+ end
142
+
143
+ # Set the JavaScript code that will be execute in the web page before the capture is performed
144
+ #
145
+ # @param value [String] the javascript to execute
146
+ # @return [void]
147
+ def jsCode=(value)
148
+ @jsCode = value
149
+ end
122
150
 
123
151
  # Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
124
152
  # GrabzIt to perform a HTTP post.
@@ -137,7 +165,7 @@ module GrabzIt
137
165
  items.push(GrabzIt::Utility.nil_check(url))
138
166
  end
139
167
 
140
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),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(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications))
168
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),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(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
141
169
 
142
170
  return items.join("|")
143
171
  end
@@ -154,6 +182,8 @@ module GrabzIt
154
182
  params['post'] = GrabzIt::Utility.nil_check(@post)
155
183
  params['address'] = GrabzIt::Utility.nil_check(@address)
156
184
  params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
185
+ params['click'] = GrabzIt::Utility.nil_check(@clickElement)
186
+ params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
157
187
 
158
188
  return params
159
189
  end
@@ -24,6 +24,7 @@ module GrabzIt
24
24
  @address = nil
25
25
  @hd = false
26
26
  @clickElement = nil
27
+ @jsCode = nil
27
28
  end
28
29
 
29
30
  # @return [Integer] the width of the browser in pixels
@@ -259,6 +260,19 @@ module GrabzIt
259
260
  def address=(value)
260
261
  @address = value
261
262
  end
263
+
264
+ # @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
265
+ def jsCode
266
+ @jsCode
267
+ end
268
+
269
+ # Set the JavaScript code that will be execute in the web page before the capture is performed
270
+ #
271
+ # @param value [String] the javascript to execute
272
+ # @return [void]
273
+ def jsCode=(value)
274
+ @jsCode = value
275
+ end
262
276
 
263
277
  # Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
264
278
  # GrabzIt to perform a HTTP post.
@@ -277,7 +291,7 @@ module GrabzIt
277
291
  items.push(GrabzIt::Utility.nil_check(url))
278
292
  end
279
293
 
280
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@format),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@customWaterMarkId),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.b_to_str(@transparent),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.b_to_str(@hd),GrabzIt::Utility.nil_check(@clickElement))
294
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@format),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_int_check(@browserHeight),GrabzIt::Utility.nil_int_check(@browserWidth),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_check(@targetElement),GrabzIt::Utility.nil_check(@customWaterMarkId),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.b_to_str(@transparent),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.b_to_str(@noAds),GrabzIt::Utility.nil_check(@post),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.b_to_str(@hd),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
281
295
 
282
296
  return items.join("|")
283
297
  end
@@ -304,6 +318,7 @@ module GrabzIt
304
318
  params['nonotify'] = GrabzIt::Utility.b_to_str(@noCookieNotifications)
305
319
  params['hd'] = GrabzIt::Utility.b_to_str(@hd)
306
320
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
321
+ params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
307
322
 
308
323
  return params
309
324
  end
@@ -36,6 +36,7 @@ module GrabzIt
36
36
  @cssMediaType = nil
37
37
  @password = nil
38
38
  @clickElement = nil
39
+ @jsCode = nil
39
40
  end
40
41
 
41
42
  # @return [Boolean] true if the background of the web page should be included in the PDF
@@ -417,6 +418,19 @@ module GrabzIt
417
418
  def password=(value)
418
419
  @password = value
419
420
  end
421
+
422
+ # @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
423
+ def jsCode
424
+ @jsCode
425
+ end
426
+
427
+ # Set the JavaScript code that will be execute in the web page before the capture is performed
428
+ #
429
+ # @param value [String] the javascript to execute
430
+ # @return [void]
431
+ def jsCode=(value)
432
+ @jsCode = value
433
+ end
420
434
 
421
435
  # Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
422
436
  # GrabzIt to perform a HTTP post.
@@ -443,7 +457,7 @@ module GrabzIt
443
457
  items.push(GrabzIt::Utility.nil_check(url))
444
458
  end
445
459
 
446
- items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@targetElement),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_int_check(@browserWidth),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement))
460
+ items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.b_to_str(@includeBackground),@pagesize ,@orientation,GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.b_to_str(@includeLinks),GrabzIt::Utility.b_to_str(@includeOutline),GrabzIt::Utility.nil_check(@title),GrabzIt::Utility.nil_check(@coverURL),GrabzIt::Utility.nil_int_check(@marginTop),GrabzIt::Utility.nil_int_check(@marginLeft),GrabzIt::Utility.nil_int_check(@marginBottom),GrabzIt::Utility.nil_int_check(@marginRight),GrabzIt::Utility.nil_int_check(@delay),GrabzIt::Utility.nil_int_check(@requestAs),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@templateId),GrabzIt::Utility.nil_check(@hideElement),GrabzIt::Utility.nil_check(@targetElement),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_int_check(@browserWidth),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@templateVariables),GrabzIt::Utility.nil_check(@proxy),GrabzIt::Utility.nil_check(@mergeId),GrabzIt::Utility.nil_check(@address),GrabzIt::Utility.b_to_str(@noCookieNotifications),GrabzIt::Utility.nil_check(@cssMediaType),GrabzIt::Utility.nil_check(@password),GrabzIt::Utility.nil_check(@clickElement),GrabzIt::Utility.nil_check(@jsCode))
447
461
 
448
462
  return items.join("|")
449
463
  end
@@ -482,7 +496,8 @@ module GrabzIt
482
496
  params['media'] = GrabzIt::Utility.nil_check(@cssMediaType)
483
497
  params['password'] = GrabzIt::Utility.nil_check(@password)
484
498
  params['click'] = GrabzIt::Utility.nil_check(@clickElement)
485
-
499
+ params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
500
+
486
501
  return params;
487
502
  end
488
503
  end
@@ -21,6 +21,7 @@ module GrabzIt
21
21
  @start = 0
22
22
  @duration = 10
23
23
  @framesPerSecond = 0
24
+ @jsCode = nil
24
25
  end
25
26
 
26
27
  # @return [Integer] the width of the browser in pixels
@@ -204,6 +205,19 @@ module GrabzIt
204
205
  def framesPerSecond=(value)
205
206
  @framesPerSecond = value
206
207
  end
208
+
209
+ # @return [String] get the JavaScript code that will be execute in the web page before the capture is performed
210
+ def jsCode
211
+ @jsCode
212
+ end
213
+
214
+ # Set the JavaScript code that will be execute in the web page before the capture is performed
215
+ #
216
+ # @param value [String] the javascript to execute
217
+ # @return [void]
218
+ def jsCode=(value)
219
+ @jsCode = value
220
+ end
207
221
 
208
222
  # Define a HTTP Post parameter and optionally value, this method can be called multiple times to add multiple parameters. Using this method will force
209
223
  # GrabzIt to perform a HTTP post.
@@ -242,7 +256,8 @@ module GrabzIt
242
256
  GrabzIt::Utility.nil_float_check(@framesPerSecond),
243
257
  GrabzIt::Utility.nil_int_check(@duration),
244
258
  GrabzIt::Utility.nil_int_check(@width),
245
- GrabzIt::Utility.nil_int_check(@height))
259
+ GrabzIt::Utility.nil_int_check(@height),
260
+ GrabzIt::Utility.nil_check(@jsCode))
246
261
 
247
262
  return items.join("|")
248
263
  end
@@ -265,7 +280,8 @@ module GrabzIt
265
280
  params['duration'] = GrabzIt::Utility.nil_int_check(@duration)
266
281
  params['width'] = GrabzIt::Utility.nil_int_check(@width)
267
282
  params['height'] = GrabzIt::Utility.nil_int_check(@height)
268
-
283
+ params['jscode'] = GrabzIt::Utility.nil_check(@jsCode)
284
+
269
285
  return params
270
286
  end
271
287
  end
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grabzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.4
4
+ version: 3.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - GrabzIt
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
10
  date: 2024-02-07 00:00:00.000000000 Z
@@ -58,7 +57,6 @@ homepage: https://grabz.it/api/ruby
58
57
  licenses:
59
58
  - MIT
60
59
  metadata: {}
61
- post_install_message:
62
60
  rdoc_options: []
63
61
  require_paths:
64
62
  - lib
@@ -73,8 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
71
  - !ruby/object:Gem::Version
74
72
  version: '0'
75
73
  requirements: []
76
- rubygems_version: 3.4.19
77
- signing_key:
74
+ rubygems_version: 3.6.7
78
75
  specification_version: 4
79
76
  summary: GrabzIt Ruby Client
80
77
  test_files: []