AvrijAnalyticsUtility 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecea2f5ff0e2f0d300621dec9d4ea5edf09179ff
4
- data.tar.gz: 9069d70d5a52a440ddc33a0d663ffc318fb9b82c
3
+ metadata.gz: d4349f7a5a0dff8167410332d117762dc0ca9837
4
+ data.tar.gz: 882c212a9bde2ed93d7617a72db5d94a6cc8cbc0
5
5
  SHA512:
6
- metadata.gz: b8eb2880c65cab6710dcd34078eb8565bceb4d247b2116121f3a7cc38ae87a24dad6df6a7f16dc71f18fcae8bda98caa8e9b345a1df3d9eecab54b2a182c9d21
7
- data.tar.gz: 673b9c7596c2f66354dfcd7c37693779d80386050d7bcbe7ca129561fc3432b71e8b1760ae96370f872b5fd7de962892e3f4513fd953ae52a626b34df0e60170
6
+ metadata.gz: 9bf04e5ab34023d769c42b925cc6036bafb5957a9e1396bfe9722820678b7747b231d333db491764bb53bac3e27ee7d58a5e5203956669d41e03a92e83242e1c
7
+ data.tar.gz: 6d0605a3221b9b5f5a96449aa35533da701c92477a12b102eca8c13ec3aa7e3cd746f9a52274d0443e04029033354f931305dbf7da79fd2950c703546b46801b
@@ -4,10 +4,44 @@ require 'json'
4
4
 
5
5
 
6
6
  class AvrijAnalyticsUtility::APIConnection
7
- @AUTH_TOKEN = nil
8
- @AUTH_VALUE = nil
9
- @HEADER_VALUE = nil
10
7
 
8
+ attr_accessor :auth_token, :auth_value, :header_hash, :query_hash, :username, :password, :base_uri, :request_option
9
+
10
+ # Constructor
11
+ def initialize(base_uri)
12
+ @auth_token = nil
13
+ @auth_value = nil
14
+ @header_hash = nil
15
+ @query_hash = nil
16
+ @username = nil
17
+ @password = nil
18
+ @base_uri = base_uri
19
+ @request_options = nil
20
+ end
21
+
22
+ # API Endpoint Request
23
+ #
24
+ # ==== Attributes
25
+ #
26
+ # * +param_api_endpoint+ - API endpoint
27
+ # * +param_header_hash+ - Header hash
28
+ # * +param_query_hash+ - Query hash
29
+ #
30
+ # ==== Return
31
+ #
32
+ # * returns get request OBJECT
33
+ #
34
+ # ==== Example
35
+ # * https://www.company.com/api/endpoint1/endpoint1_1
36
+ # param_api_endpoint = api/endpoint1/endpoint1_1
37
+ # ====
38
+ def getAPI_Request(param_api_endpoint,param_header_hash,param_query_hash)
39
+ api_request_uri = self.base_uri + param_api_endpoint
40
+ self.header_hash = param_header_hash
41
+ self.request_options = {headers: param_header_hash, query: param_query_hash}
42
+ getRequest_result = HTTParty.get(api_request_uri,@request_options)
43
+ end
44
+
11
45
  # Returns the social media post
12
46
  #
13
47
  # ==== Attributes
@@ -35,23 +69,6 @@ class AvrijAnalyticsUtility::APIConnection
35
69
  return getRequest_result
36
70
  end
37
71
 
38
- # API Endpoint Request
39
- #
40
- # ==== Attributes
41
- #
42
- # * +param_api_endpoint+ - API endpoint
43
- # * +param_header_hash+ - Header hash
44
- # * +param_query_hash+ - Query hash
45
- #
46
- # ==== Return
47
- #
48
- # * returns get request OBJECT
49
- #
50
- # ====
51
- def getAPI_Request(param_api_endpoint,param_header_hash,param_query_hash)
52
- @OPTIONS = {headers: param_header_hash, query: param_query_hash}
53
- getRequest_result = HTTParty.get(param_api_endpoint,@OPTIONS)
54
- end
55
72
 
56
73
 
57
74
  # Returns all entities
@@ -77,10 +94,6 @@ class AvrijAnalyticsUtility::APIConnection
77
94
  return getRequest_result
78
95
  end
79
96
 
80
- # Returns Authentication Token
81
- def getToken
82
- return @AUTH_TOKEN
83
- end
84
97
 
85
98
  # Authenticate
86
99
  #
@@ -0,0 +1,4 @@
1
+ class EyesoverConnection < APIConnection
2
+
3
+
4
+ end
@@ -1,3 +1,3 @@
1
1
  module AvrijAnalyticsUtility
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: AvrijAnalyticsUtility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dalisay
@@ -121,6 +121,7 @@ files:
121
121
  - bin/setup
122
122
  - lib/AvrijAnalyticsUtility.rb
123
123
  - lib/AvrijAnalyticsUtility/APIConnection.rb
124
+ - lib/AvrijAnalyticsUtility/EyesoverConnection.rb
124
125
  - lib/AvrijAnalyticsUtility/version.rb
125
126
  homepage: https://github.com/Avrij/AvrijAnalyticsUtilityGem.git
126
127
  licenses: