arbor_peakflow_ruby 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arbor_peakflow_ruby/actions/traffic.rb +12 -1
- data/lib/arbor_peakflow_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eba0729f4909869481ad52f89856838ba5f79d0
|
4
|
+
data.tar.gz: 10ec036972ae0b704f1cbe35175f22a34b1887e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6589c77962c097f16e7d8a7cadcf64ad8ec2745a663ad992643e67235adf227d748962fa400f63bc86c7b5fa8d70c4a004b5cae36a64297c05aa19e035719bd2
|
7
|
+
data.tar.gz: fbafcba959b0461f9957a10bffc9addd51812c5c0609c0275bda572659ddea1f147a289170009de20556dd6b5ad53ddc58e2d44295615523a4a2b5c9af1da3e5
|
@@ -20,7 +20,7 @@ module Arbor
|
|
20
20
|
# ==== Example
|
21
21
|
#
|
22
22
|
# query = File.read('path/to/file.xml')
|
23
|
-
# client.traffic query
|
23
|
+
# response = client.traffic query
|
24
24
|
def traffic(query, graph = nil)
|
25
25
|
response = @conn.get do |req|
|
26
26
|
req.url 'arborws/traffic'
|
@@ -32,6 +32,17 @@ module Arbor
|
|
32
32
|
response
|
33
33
|
end
|
34
34
|
|
35
|
+
# The encode_xml_for_url function allows you to encode an XML file's
|
36
|
+
# content. This is used automatically when calling the traffic method.
|
37
|
+
#
|
38
|
+
# == Parameters:
|
39
|
+
# - file_contents: The XML content which should be encoded into a URL
|
40
|
+
# usable format.
|
41
|
+
#
|
42
|
+
# ==== Example
|
43
|
+
#
|
44
|
+
# file = File.read('path/to/file.xml')
|
45
|
+
# encoded_file_contents = client.encode_xml_for_url file
|
35
46
|
def encode_xml_for_url(file_contents)
|
36
47
|
encoded_file =
|
37
48
|
URI.encode(
|