grabzit 3.5.1 → 3.5.2
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 +4 -4
- data/lib/grabzit/client.rb +14 -14
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2920fbc96f29ee4d9b7f7a1c83e7fe1d2ead558fc74b4baa5cd335f73cc9efd7
|
|
4
|
+
data.tar.gz: 8104b2962af11846171eced2a038a48d1f33f768d6684293f52a73103aaed85c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3fd0f39c45172d5f685e1c76b9664d0f4b1e5de08c37a0d3c565a64eaf85712c4a254506b1468fb64cbb45b7135a507f89420f1746f89dcd5914810fb6427744
|
|
7
|
+
data.tar.gz: 1afc1b4fcbd2e0008d58ce9b6572a48981ac6febd4c2434b4abca92561c4b4536dbf9c4408a75ec5c10cccecbb48ccb197e9484b9de27ee06ec1a2b172f46488
|
data/lib/grabzit/client.rb
CHANGED
|
@@ -37,15 +37,15 @@ module GrabzIt
|
|
|
37
37
|
|
|
38
38
|
WebServicesBaseURL = "://api.grabz.it/services/"
|
|
39
39
|
private_constant :WebServicesBaseURL
|
|
40
|
-
TakePicture = "takepicture
|
|
40
|
+
TakePicture = "takepicture"
|
|
41
41
|
private_constant :TakePicture
|
|
42
|
-
TakeTable = "taketable
|
|
42
|
+
TakeTable = "taketable"
|
|
43
43
|
private_constant :TakeTable
|
|
44
|
-
TakePDF = "takepdf
|
|
44
|
+
TakePDF = "takepdf"
|
|
45
45
|
private_constant :TakePDF
|
|
46
|
-
TakeDOCX = "takedocx
|
|
46
|
+
TakeDOCX = "takedocx"
|
|
47
47
|
private_constant :TakeDOCX
|
|
48
|
-
TakeHTML = "takehtml
|
|
48
|
+
TakeHTML = "takehtml"
|
|
49
49
|
private_constant :TakeHTML
|
|
50
50
|
TrueString = "True"
|
|
51
51
|
private_constant :TrueString
|
|
@@ -73,7 +73,7 @@ module GrabzIt
|
|
|
73
73
|
options = AnimationOptions.new()
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
@request = Request.new(@protocol + WebServicesBaseURL + "takeanimation
|
|
76
|
+
@request = Request.new(@protocol + WebServicesBaseURL + "takeanimation", false, options, url)
|
|
77
77
|
return nil
|
|
78
78
|
end
|
|
79
79
|
|
|
@@ -364,7 +364,7 @@ module GrabzIt
|
|
|
364
364
|
return nil
|
|
365
365
|
end
|
|
366
366
|
|
|
367
|
-
result = get(@protocol + WebServicesBaseURL + "getstatus
|
|
367
|
+
result = get(@protocol + WebServicesBaseURL + "getstatus?id=" + GrabzIt::Utility.nil_check(id))
|
|
368
368
|
|
|
369
369
|
doc = REXML::Document.new(result)
|
|
370
370
|
|
|
@@ -386,7 +386,7 @@ module GrabzIt
|
|
|
386
386
|
return nil
|
|
387
387
|
end
|
|
388
388
|
|
|
389
|
-
return get(@protocol + WebServicesBaseURL + "getfile
|
|
389
|
+
return get(@protocol + WebServicesBaseURL + "getfile?id=" + GrabzIt::Utility.nil_check(id))
|
|
390
390
|
end
|
|
391
391
|
|
|
392
392
|
# Get all the cookies that GrabzIt is using for a particular domain. This may include your user set cookies as well
|
|
@@ -404,7 +404,7 @@ module GrabzIt
|
|
|
404
404
|
qs.concat("&sig=")
|
|
405
405
|
qs.concat(sig)
|
|
406
406
|
|
|
407
|
-
result = get(@protocol + WebServicesBaseURL + "getcookies
|
|
407
|
+
result = get(@protocol + WebServicesBaseURL + "getcookies?" + qs)
|
|
408
408
|
|
|
409
409
|
doc = REXML::Document.new(result)
|
|
410
410
|
|
|
@@ -459,7 +459,7 @@ module GrabzIt
|
|
|
459
459
|
qs.concat("&sig=")
|
|
460
460
|
qs.concat(sig)
|
|
461
461
|
|
|
462
|
-
return (get_result_value(get(@protocol + WebServicesBaseURL + "setcookie
|
|
462
|
+
return (get_result_value(get(@protocol + WebServicesBaseURL + "setcookie?" + qs), "Result") == TrueString)
|
|
463
463
|
end
|
|
464
464
|
|
|
465
465
|
# Delete a custom cookie or block a global cookie from being used
|
|
@@ -481,7 +481,7 @@ module GrabzIt
|
|
|
481
481
|
qs.concat("&delete=1&sig=")
|
|
482
482
|
qs.concat(sig)
|
|
483
483
|
|
|
484
|
-
return (get_result_value(get(@protocol + WebServicesBaseURL + "setcookie
|
|
484
|
+
return (get_result_value(get(@protocol + WebServicesBaseURL + "setcookie?" + qs), "Result") == TrueString)
|
|
485
485
|
end
|
|
486
486
|
|
|
487
487
|
# Get your uploaded custom watermark
|
|
@@ -521,7 +521,7 @@ module GrabzIt
|
|
|
521
521
|
|
|
522
522
|
boundary = '--------------------------'+Time.now.to_f.to_s
|
|
523
523
|
|
|
524
|
-
url = @protocol + "://api.grabz.it/services/addwatermark
|
|
524
|
+
url = @protocol + "://api.grabz.it/services/addwatermark"
|
|
525
525
|
uri = URI.parse(url)
|
|
526
526
|
|
|
527
527
|
file = File.open(path, "rb")
|
|
@@ -581,7 +581,7 @@ module GrabzIt
|
|
|
581
581
|
qs.concat("&sig=")
|
|
582
582
|
qs.concat(sig)
|
|
583
583
|
|
|
584
|
-
return (get_result_value(get(@protocol + WebServicesBaseURL + "deletewatermark
|
|
584
|
+
return (get_result_value(get(@protocol + WebServicesBaseURL + "deletewatermark?" + qs), "Result") == TrueString)
|
|
585
585
|
end
|
|
586
586
|
|
|
587
587
|
# This method sets if requests to GrabzIt's API should use SSL or not
|
|
@@ -665,7 +665,7 @@ module GrabzIt
|
|
|
665
665
|
qs.concat("&sig=")
|
|
666
666
|
qs.concat(sig)
|
|
667
667
|
|
|
668
|
-
result = get(@protocol + WebServicesBaseURL + "getwatermarks
|
|
668
|
+
result = get(@protocol + WebServicesBaseURL + "getwatermarks?" + qs)
|
|
669
669
|
|
|
670
670
|
doc = REXML::Document.new(result)
|
|
671
671
|
|