AvrijAnalyticsUtility 0.5.3 → 0.5.4
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/AvrijAnalyticsUtility/APIConnector.rb +35 -1
- data/lib/AvrijAnalyticsUtility/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88a9ea28369bb7efd1bd30a7c6174a5c5e171bac
|
4
|
+
data.tar.gz: 792e733e236304c776131d6ebdce37b74d5b3efb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d01bbdb0d4ff8489b56676f6a4cbde351732e5fa0f880a59b00108c494a56dc37372e562e5e7ba343cbc8d8123432d9752b7839e2f30f0ec9ef895fb24a3853c
|
7
|
+
data.tar.gz: 551140854b7aa6da459626bb3f0c62b00af99a3d3cf6c8182f84d3b4f97f88b5fd5b101e933503aec9677710139f2c0f802f2e80b31ac9d55be924f2e3708072
|
@@ -25,7 +25,7 @@ class AvrijAnalyticsUtility::APIConnector
|
|
25
25
|
end
|
26
26
|
|
27
27
|
|
28
|
-
# Perform API request
|
28
|
+
# Perform API GET request
|
29
29
|
#
|
30
30
|
# ==== Attributes
|
31
31
|
# * +apiEndpoint+ - API end point
|
@@ -57,6 +57,40 @@ class AvrijAnalyticsUtility::APIConnector
|
|
57
57
|
result = HTTParty.get(request_uri,@request_options)
|
58
58
|
return result
|
59
59
|
end
|
60
|
+
|
61
|
+
# Perform API POST request
|
62
|
+
#
|
63
|
+
# ==== Attributes
|
64
|
+
# * +apiEndpoint+ - API end point
|
65
|
+
# * +headerHash+ - Hash definition of header options
|
66
|
+
# * +queryHash+ - Hash definition of query options
|
67
|
+
# ==== Examples
|
68
|
+
#
|
69
|
+
# #[apiEndpoint]
|
70
|
+
# #- Given the complete browser's uri : https://www.company.com:8080/api/endpoint1/endpoint1_1
|
71
|
+
# #- given the base uri : https://www.company.com:8080
|
72
|
+
# #- then endpoint is : api/endpoint1/endpoint1_1
|
73
|
+
#
|
74
|
+
# #[headerHash]
|
75
|
+
# #- my_header: {
|
76
|
+
# # "Key1" => "value1",
|
77
|
+
# # "key2" => "value2"
|
78
|
+
# # }
|
79
|
+
#
|
80
|
+
# #[headerQuery]
|
81
|
+
# #- my_query {
|
82
|
+
# # "key1" => "value1",
|
83
|
+
# # "key2" => "value2"
|
84
|
+
# #}
|
85
|
+
def postRequest(apiEndpoint,headerHash,queryHash)
|
86
|
+
@header_hash = headerHash
|
87
|
+
@query_hash = queryHash
|
88
|
+
request_uri = @base_uri +"/" + apiEndpoint
|
89
|
+
@request_options = {headers: @header_hash, query: @query_hash }
|
90
|
+
result = HTTParty.post(request_uri,@request_options)
|
91
|
+
return result
|
92
|
+
end
|
93
|
+
|
60
94
|
|
61
95
|
# Set request header hash
|
62
96
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AvrijAnalyticsUtility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Dalisay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,7 +128,7 @@ licenses:
|
|
128
128
|
- MIT
|
129
129
|
metadata:
|
130
130
|
allowed_push_host: https://rubygems.org
|
131
|
-
post_install_message: 'AvrijAnalyticsUtility VERSION : 0.5.
|
131
|
+
post_install_message: 'AvrijAnalyticsUtility VERSION : 0.5.4'
|
132
132
|
rdoc_options: []
|
133
133
|
require_paths:
|
134
134
|
- lib
|