arux_app 3.0.1 → 3.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/arux_app.gemspec +2 -2
- data/lib/arux_app/api/auth.rb +3 -2
- data/lib/arux_app/api/config.rb +19 -2
- data/lib/arux_app.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf9ace8f7b311960edb721dc4cbc9f0e00c8c844c9420ed91d96efe247c8536
|
4
|
+
data.tar.gz: edc123a35cd47d96a96c9aac4adba85f861a91f0167c0a755a801062d912273a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca0759a72bd036a16a1f26fb0e8983d3885e8f11301d4ea8b2683ce0b87df9f295b30287ffd7663c77c29a3eca8d06454613181ec4269ff8bed4ef8d1f35939a
|
7
|
+
data.tar.gz: 8cc563f83bdfe9d8be79088e71764f3075f37261ce89e7ae3b384303a584e8fe5bfa24a78432052c7f9db7c832403801e4c271ac275b6c6ca5d3d2baeca1831c
|
data/arux_app.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "arux_app"
|
7
|
-
spec.version = "3.0.
|
7
|
+
spec.version = "3.0.3"
|
8
8
|
spec.authors = ["Arux Software"]
|
9
9
|
spec.email = ["sheuer@aruxsoftware.com"]
|
10
10
|
spec.summary = "Ruby gem for interacting with the Arux.app Switchboard APIs."
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ["lib"]
|
18
|
-
|
18
|
+
|
19
19
|
spec.add_runtime_dependency "httpi", "~> 3.0"
|
20
20
|
spec.add_runtime_dependency "json", ">= 0"
|
21
21
|
|
data/lib/arux_app/api/auth.rb
CHANGED
@@ -26,7 +26,7 @@ module AruxApp
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
attr_accessor :client_id, :client_secret, :redirect_uri, :js_callback, :district_subdomain, :current_user_uuid, :login_mechanism, :element
|
29
|
+
attr_accessor :client_id, :client_secret, :redirect_uri, :js_callback, :district_subdomain, :current_user_uuid, :login_mechanism, :element, :api_key
|
30
30
|
|
31
31
|
def initialize(options = {})
|
32
32
|
self.client_id = options[:client_id]
|
@@ -37,6 +37,7 @@ module AruxApp
|
|
37
37
|
self.element = options[:element]
|
38
38
|
self.district_subdomain = options[:district_subdomain]
|
39
39
|
self.current_user_uuid = options[:current_user_uuid]
|
40
|
+
self.api_key = options[:api_key]
|
40
41
|
|
41
42
|
raise API::InitializerError.new(:client_id, "can't be blank") if self.client_id.to_s.empty?
|
42
43
|
raise API::InitializerError.new(:client_secret, "can't be blank") if self.client_secret.to_s.empty?
|
@@ -98,7 +99,7 @@ module AruxApp
|
|
98
99
|
end
|
99
100
|
|
100
101
|
def registration_url
|
101
|
-
%(#{public_uri}/users/
|
102
|
+
%(#{public_uri}/users/sign_up?district=#{self.district_subdomain})
|
102
103
|
end
|
103
104
|
|
104
105
|
def access_token(code)
|
data/lib/arux_app/api/config.rb
CHANGED
@@ -59,12 +59,29 @@ module AruxApp
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
def list(params = {})
|
63
|
+
request = HTTPI::Request.new
|
64
|
+
request.url = "#{api_uri}/v1/p/customers"
|
65
|
+
request.query = URI.encode_www_form(params)
|
66
|
+
request.headers = generate_headers
|
67
|
+
response = HTTPI.get(request)
|
68
|
+
if !response.error?
|
69
|
+
JSON.parse(response.body)
|
70
|
+
else
|
71
|
+
raise(API::Error.new(response.code, response.body))
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
62
75
|
protected
|
63
76
|
|
64
77
|
def generate_headers
|
65
|
-
{
|
78
|
+
{
|
79
|
+
'User-Agent' => USER_AGENT,
|
80
|
+
'Client-Secret' => self.auth.client_secret,
|
81
|
+
'Client-Id' => self.auth.client_id,
|
82
|
+
'Key' => self.auth.api_key
|
83
|
+
}
|
66
84
|
end
|
67
|
-
|
68
85
|
end
|
69
86
|
end
|
70
87
|
end
|
data/lib/arux_app.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arux_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arux Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpi
|