connect_wise_web_reports 1.1.0 → 1.2.0
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/.gitignore +1 -0
- data/.travis.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/connect_wise_web_reports.gemspec +0 -0
- data/lib/connect_wise_web_reports.rb +27 -30
- data/lib/connect_wise_web_reports/configuration.rb +0 -0
- data/lib/connect_wise_web_reports/error.rb +0 -0
- data/lib/connect_wise_web_reports/report.rb +0 -0
- data/lib/connect_wise_web_reports/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d540da79a8a705ee50c08cf77d2be09da1b66982b9097d00813b7aa0bc3ba1e7
|
|
4
|
+
data.tar.gz: efbe93fc0de07f204be4b6e541f793f54b1fba2c26424a692469e4cc53e4517f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96dc9e0ac77beaea29649142df6989d00ef2b25e1fc1a62bc0304174197b8e040e31155be229fd461f8497dcfc5b7a33a8b13107673ee16de3cc498d6c8ad906
|
|
7
|
+
data.tar.gz: 19b4a2715ed9b961f4bfa1f4b78ae939f74a582c22bb6a6e9cf77fdb8b9e12cef05f41503959a9ef750c07ae0ebe00fc3f2ed45344a274d860747d15e678842b
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
|
File without changes
|
data/Gemfile
CHANGED
|
File without changes
|
data/README.md
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -7,38 +7,35 @@ require 'connect_wise_web_reports/error'
|
|
|
7
7
|
require 'connect_wise_web_reports/report'
|
|
8
8
|
|
|
9
9
|
module ConnectWiseWebReports
|
|
10
|
-
|
|
11
10
|
DEFAULT_OPTIONS = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
11
|
+
conditions: nil,
|
|
12
|
+
fields: [],
|
|
13
|
+
limit: 100,
|
|
14
|
+
order_by: nil,
|
|
15
|
+
skip: nil,
|
|
16
|
+
timeout: 5,
|
|
17
|
+
|
|
18
|
+
# authentication
|
|
19
|
+
host: ConnectWiseWebReports.configuration.host,
|
|
20
|
+
company_id: ConnectWiseWebReports.configuration.company_id,
|
|
21
|
+
integrator_id: ConnectWiseWebReports.configuration.integrator_id,
|
|
22
|
+
integrator_password: ConnectWiseWebReports.configuration.integrator_password,
|
|
23
|
+
version: ConnectWiseWebReports.configuration.version,
|
|
24
|
+
proxy_host: ConnectWiseWebReports.configuration.proxy_host,
|
|
25
|
+
proxy_port: ConnectWiseWebReports.configuration.proxy_port,
|
|
26
|
+
proxy_user: ConnectWiseWebReports.configuration.proxy_user,
|
|
27
|
+
proxy_pass: ConnectWiseWebReports.configuration.proxy_pass
|
|
28
|
+
}.freeze
|
|
30
29
|
|
|
31
30
|
# Create a new Mechanize agent.
|
|
32
31
|
#
|
|
33
32
|
# @return [Mechanize]
|
|
34
33
|
def self.agent(options)
|
|
35
34
|
Mechanize.new do |agent|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
options[:proxy_pass]
|
|
41
|
-
) unless options[:proxy_host].nil?
|
|
35
|
+
if options[:proxy_host]
|
|
36
|
+
agent.set_proxy(options[:proxy_host], options[:proxy_port],
|
|
37
|
+
options[:proxy_user], options[:proxy_pass])
|
|
38
|
+
end
|
|
42
39
|
|
|
43
40
|
agent.read_timeout = options[:timeout]
|
|
44
41
|
agent.keep_alive = false
|
|
@@ -51,11 +48,11 @@ module ConnectWiseWebReports
|
|
|
51
48
|
url = "https://#{options[:host]}/login/companyinfo/#{options[:company_id]}"
|
|
52
49
|
response = agent(options).get(url)
|
|
53
50
|
|
|
54
|
-
if response.content == 'null'
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
return {} if response.content == 'null'
|
|
52
|
+
|
|
53
|
+
JSON.parse(response.content)
|
|
54
|
+
rescue StandardError => e
|
|
55
|
+
raise ConnectionError.new(e.message)
|
|
59
56
|
end
|
|
60
57
|
|
|
61
58
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: connect_wise_web_reports
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Pheasey
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-02-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -42,42 +42,42 @@ dependencies:
|
|
|
42
42
|
name: mechanize
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: 2.7.0
|
|
48
45
|
- - "~>"
|
|
49
46
|
- !ruby/object:Gem::Version
|
|
50
47
|
version: '2.7'
|
|
48
|
+
- - ">="
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: 2.7.0
|
|
51
51
|
type: :runtime
|
|
52
52
|
prerelease: false
|
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
|
54
54
|
requirements:
|
|
55
|
-
- - ">="
|
|
56
|
-
- !ruby/object:Gem::Version
|
|
57
|
-
version: 2.7.0
|
|
58
55
|
- - "~>"
|
|
59
56
|
- !ruby/object:Gem::Version
|
|
60
57
|
version: '2.7'
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 2.7.0
|
|
61
61
|
- !ruby/object:Gem::Dependency
|
|
62
62
|
name: nokogiri
|
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
|
-
- - ">="
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: 1.6.0
|
|
68
65
|
- - "~>"
|
|
69
66
|
- !ruby/object:Gem::Version
|
|
70
67
|
version: '1.6'
|
|
68
|
+
- - ">="
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: 1.6.0
|
|
71
71
|
type: :runtime
|
|
72
72
|
prerelease: false
|
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
|
-
- - ">="
|
|
76
|
-
- !ruby/object:Gem::Version
|
|
77
|
-
version: 1.6.0
|
|
78
75
|
- - "~>"
|
|
79
76
|
- !ruby/object:Gem::Version
|
|
80
77
|
version: '1.6'
|
|
78
|
+
- - ">="
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: 1.6.0
|
|
81
81
|
description: 'Full support Connect Wise Web Reports API, including custom queries,
|
|
82
82
|
pagination, api info, and more. '
|
|
83
83
|
email:
|
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
122
|
rubyforge_project:
|
|
123
|
-
rubygems_version: 2.7.
|
|
123
|
+
rubygems_version: 2.7.6
|
|
124
124
|
signing_key:
|
|
125
125
|
specification_version: 4
|
|
126
126
|
summary: Connect Wise Web Reports API Wrapper
|