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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aab9192789eb38e11eb704e50bf351463f4d6c16
4
- data.tar.gz: fcda45fe80bb58f15338f5ebf536cd894e43ad7e
3
+ metadata.gz: 88a9ea28369bb7efd1bd30a7c6174a5c5e171bac
4
+ data.tar.gz: 792e733e236304c776131d6ebdce37b74d5b3efb
5
5
  SHA512:
6
- metadata.gz: 8c928c42649bf558c00c9913a27c73cc3e53a5b174c689d4132b0e18af3f0c579ab57516a00693b2ea65a440d233be922f9b4c7b35464218e2973fc66df578b8
7
- data.tar.gz: 36a6a49d06a40b8f24dad01999ead3b58405b657dfe1371793fe3809258a59d1e40c17c1cff10cbb54cce548b1f8e58089b0deb2c383d8bdaa9e717c29825232
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
  #
@@ -1,3 +1,3 @@
1
1
  module AvrijAnalyticsUtility
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
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.3
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-04 00:00:00.000000000 Z
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.3'
131
+ post_install_message: 'AvrijAnalyticsUtility VERSION : 0.5.4'
132
132
  rdoc_options: []
133
133
  require_paths:
134
134
  - lib