vivialconnect 0.0.2 → 0.0.3
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/vivialconnect/client.rb +14 -12
- data/lib/vivialconnect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a7d93e83e8aae2ecf57e49bc6a1f49fe9b3ab08
|
4
|
+
data.tar.gz: 8d2e9c0c671891afa9fd47071bba01d247a86d9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b21028a598b2995a20af3d93c7e4aa112291a166a90bfe1005d161bc09e331a927c8b06fa63a7ee81afca5c63a8ae428803370db1760f9cce0d8d3efa527e325
|
7
|
+
data.tar.gz: aa13d775ddd7d6d738f3a0b72beb45bb6299eb55bea6ac3a3ced5c47d945c90768100e4a250c1920b3f872783253cfc7dd11c6d408b190ab25a2e7ebf6395125
|
data/lib/vivialconnect/client.rb
CHANGED
@@ -69,14 +69,6 @@ module VivialConnect
|
|
69
69
|
|
70
70
|
@@configured = false
|
71
71
|
|
72
|
-
def initialize
|
73
|
-
begin
|
74
|
-
@base_api_path = host + "#{api_version}/"
|
75
|
-
rescue NameError => e
|
76
|
-
raise VivialConnectClientError, "Please configure client before making requests. You can do this like so: .configure(api_key, api_secret, account_id) to "
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
72
|
def self.configure(api_key, api_secret, account_id, host="https://api.vivialconnect.net/api/", api_version="v1.0" )
|
81
73
|
@@api_key= api_key
|
82
74
|
@@api_secret = api_secret
|
@@ -104,6 +96,10 @@ module VivialConnect
|
|
104
96
|
@@host
|
105
97
|
end
|
106
98
|
|
99
|
+
def set_host(host)
|
100
|
+
@@host = host
|
101
|
+
end
|
102
|
+
|
107
103
|
def account_id
|
108
104
|
@@account_id
|
109
105
|
end
|
@@ -113,9 +109,11 @@ module VivialConnect
|
|
113
109
|
end
|
114
110
|
|
115
111
|
def reset_api_base_path(new_host, new_api_version)
|
116
|
-
|
117
|
-
|
118
|
-
|
112
|
+
set_host(new_host)
|
113
|
+
set_api_version(new_api_version)
|
114
|
+
@base_api_path = host + api_version
|
115
|
+
connection
|
116
|
+
true
|
119
117
|
end
|
120
118
|
|
121
119
|
|
@@ -123,8 +121,12 @@ module VivialConnect
|
|
123
121
|
@@api_version
|
124
122
|
end
|
125
123
|
|
124
|
+
def set_api_version(api_version)
|
125
|
+
@@api_version = api_version
|
126
|
+
end
|
127
|
+
|
126
128
|
def base_api_path
|
127
|
-
@base_api_path
|
129
|
+
@base_api_path = host + "#{api_version}/"
|
128
130
|
end
|
129
131
|
|
130
132
|
def self.configured?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vivialconnect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin LeFurjah
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|