pihole-api 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: d2874a4ea6106353b8f3f116cb7f1de4818c7285735de30035aa541162402e8c
4
- data.tar.gz: b498f4178586f16544ddf97644aecca6ed76c714ce0785502477700afe08aedf
3
+ metadata.gz: dd2a6c4cb44db1cd57ce0c82f7549aa204bc4065544389419aee406c2b85cff6
4
+ data.tar.gz: 0be68d11e03e22e3985268729ba7ef10dc5847036158f09be533d1c88e20ed8e
5
5
  SHA512:
6
- metadata.gz: bb54c1075c07f1252b60e62a838ce74d57472fce0c392daae490e7584c36d042d3330a8158cad0e7f8ac2a44620d92ffee064ed16c3aefb03dad738e46ee052b
7
- data.tar.gz: df77bb4bf3693b917cc43554d8f47574cf62defcd45892f5b4375315572644d12e0ad12fd2237f5aab2ab4d1e6a4b8aedf50fa2eba8009a003dfd0aa2fa4447c
6
+ metadata.gz: 03373077ff5a82fad44da51ef2244663c33957603f3fcc4cb7b912ae01d3e83e317b9370e8626f185c060105343aba0b2f26d99880adc1c940087ab62a736d22
7
+ data.tar.gz: 1bd20dc0135686ea943876586ad2efa3ae6eacc0b624ddd2c241d973989b3bbf262dfc68e7590027c0ba713295dfed1ca7b8f55bc6d0a42d3f47706302e90712
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.2.2
data/Gemfile.lock CHANGED
@@ -1,44 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pihole-api (0.0.1)
5
- active_attr (~> 0.15.4)
4
+ pihole-api (0.0.3)
5
+ active_attr (~> 0.16.0)
6
6
  httparty (~> 0.21.0)
7
- nokogiri (~> 1.14.0)
7
+ nokogiri (~> 1.15.4)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (7.0.4.1)
13
- actionview (= 7.0.4.1)
14
- activesupport (= 7.0.4.1)
12
+ actionpack (7.0.4.2)
13
+ actionview (= 7.0.4.2)
14
+ activesupport (= 7.0.4.2)
15
15
  rack (~> 2.0, >= 2.2.0)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (7.0.4.1)
20
- activesupport (= 7.0.4.1)
19
+ actionview (7.0.4.2)
20
+ activesupport (= 7.0.4.2)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- active_attr (0.15.4)
26
- actionpack (>= 3.0.2, < 7.1)
27
- activemodel (>= 3.0.2, < 7.1)
28
- activesupport (>= 3.0.2, < 7.1)
29
- activemodel (7.0.4.1)
30
- activesupport (= 7.0.4.1)
31
- activesupport (7.0.4.1)
25
+ active_attr (0.16.0)
26
+ actionpack (>= 3.0.2, < 7.2)
27
+ activemodel (>= 3.0.2, < 7.2)
28
+ activesupport (>= 3.0.2, < 7.2)
29
+ activemodel (7.0.4.2)
30
+ activesupport (= 7.0.4.2)
31
+ activesupport (7.0.4.2)
32
32
  concurrent-ruby (~> 1.0, >= 1.0.2)
33
33
  i18n (>= 1.6, < 2)
34
34
  minitest (>= 5.1)
35
35
  tzinfo (~> 2.0)
36
- addressable (2.8.1)
36
+ addressable (2.8.5)
37
37
  public_suffix (>= 2.0.2, < 6.0)
38
38
  ansi (1.5.0)
39
39
  builder (3.2.4)
40
40
  coderay (1.1.3)
41
- concurrent-ruby (1.1.10)
41
+ concurrent-ruby (1.2.0)
42
42
  crack (0.4.5)
43
43
  rexml
44
44
  crass (1.0.6)
@@ -54,23 +54,23 @@ GEM
54
54
  nokogiri (>= 1.5.9)
55
55
  method_source (1.0.0)
56
56
  mini_mime (1.1.2)
57
- minitest (5.17.0)
58
- minitest-focus (1.3.1)
57
+ minitest (5.20.0)
58
+ minitest-focus (1.4.0)
59
59
  minitest (>= 4, < 6)
60
- minitest-reporters (1.5.0)
60
+ minitest-reporters (1.6.1)
61
61
  ansi
62
62
  builder
63
63
  minitest (>= 5.0)
64
64
  ruby-progressbar
65
- mocha (2.0.2)
65
+ mocha (2.1.0)
66
66
  ruby2_keywords (>= 0.0.5)
67
67
  multi_xml (0.6.0)
68
- nokogiri (1.14.0-arm64-darwin)
68
+ nokogiri (1.15.4-arm64-darwin)
69
69
  racc (~> 1.4)
70
70
  pry (0.14.2)
71
71
  coderay (~> 1.1)
72
72
  method_source (~> 1.0)
73
- public_suffix (5.0.1)
73
+ public_suffix (5.0.3)
74
74
  racc (1.6.2)
75
75
  rack (2.2.6.2)
76
76
  rack-test (2.0.2)
@@ -80,31 +80,33 @@ GEM
80
80
  nokogiri (>= 1.6)
81
81
  rails-html-sanitizer (1.5.0)
82
82
  loofah (~> 2.19, >= 2.19.1)
83
- rake (13.0.6)
84
- rexml (3.2.5)
85
- ruby-progressbar (1.11.0)
83
+ rake (13.1.0)
84
+ rexml (3.2.6)
85
+ ruby-progressbar (1.13.0)
86
86
  ruby2_keywords (0.0.5)
87
- timecop (0.9.6)
87
+ timecop (0.9.8)
88
88
  tzinfo (2.0.5)
89
89
  concurrent-ruby (~> 1.0)
90
- webmock (3.18.1)
90
+ webmock (3.19.1)
91
91
  addressable (>= 2.8.0)
92
92
  crack (>= 0.3.2)
93
93
  hashdiff (>= 0.4.0, < 2.0.0)
94
94
 
95
95
  PLATFORMS
96
96
  arm64-darwin-20
97
+ arm64-darwin-22
98
+ arm64-darwin-23
97
99
 
98
100
  DEPENDENCIES
99
- minitest (~> 5.17.0)
100
- minitest-focus (~> 1.3.1)
101
- minitest-reporters (~> 1.5.0)
102
- mocha (~> 2.0.2)
101
+ minitest (~> 5.20.0)
102
+ minitest-focus (~> 1.4.0)
103
+ minitest-reporters (~> 1.6.1)
104
+ mocha (~> 2.1.0)
103
105
  pihole-api!
104
106
  pry (~> 0.14.2)
105
- rake (~> 13.0.6)
106
- timecop (~> 0.9.6)
107
- webmock (~> 3.18.1)
107
+ rake (~> 13.1.0)
108
+ timecop (~> 0.9.8)
109
+ webmock (~> 3.19.1)
108
110
 
109
111
  BUNDLED WITH
110
- 2.3.16
112
+ 2.4.21
data/README.md CHANGED
@@ -14,9 +14,10 @@ This is an unofficial project and still a work in progress (WIP) ... more to com
14
14
 
15
15
  ## TODO
16
16
  - Login and Auth token generation: `admin/scripts/pi-hole/php/api_token.php`
17
- - Undocumented endpointsw
17
+ - Undocumented endpoints
18
18
  - Undocumented filters for getAllQueries
19
19
  - Generate WebPassword Hash
20
+ - getAllQueries allow client input
20
21
 
21
22
  ## Installation
22
23
 
@@ -38,7 +39,7 @@ Or install it yourself as:
38
39
 
39
40
  ```ruby
40
41
  require 'pihole-api'
41
- client = PiholeApi::Client.new(base_path: 'http://localhost:80/', api_token: '', port: 80)
42
+ client = PiholeApi::Client.new(base_path: 'http://localhost:80/', api_token: api_token, port: 80)
42
43
 
43
44
  # Some example calls
44
45
  client.type
@@ -47,8 +48,9 @@ Or install it yourself as:
47
48
  Double hash web password to get the api_token. A helper method exists on the client to do this:
48
49
  ```ruby
49
50
  require 'pihole-api'
50
- PiholeApi::Client.hash_password(password)
51
+ api_token = PiholeApi::Client.hash_password(password)
51
52
  end
53
+ ```
52
54
 
53
55
  ### Endpoints
54
56
  #### Authorised
@@ -60,7 +62,7 @@ end
60
62
  - `top_clients(number_of_items=10)`
61
63
  - `get_forward_destinations`
62
64
  - `get_query_types`
63
- `get_all_queries(params: {}, from_time: nil, until_time: nil, latest_number_of_items: nil)`
65
+ - `get_all_queries(params: {}, from_time: nil, until_time: nil, latest_number_of_items: nil)`
64
66
  - `recent_blocked`
65
67
  - `enable`
66
68
  - `disable`
@@ -1,3 +1,3 @@
1
1
  module PiholeApi
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/pihole-api.gemspec CHANGED
@@ -23,16 +23,16 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  spec.add_dependency "httparty", "~> 0.21.0"
26
- spec.add_dependency "active_attr", "~> 0.15.4"
27
- spec.add_dependency "nokogiri", "~> 1.14.0"
26
+ spec.add_dependency "active_attr", "~> 0.16.0"
27
+ spec.add_dependency "nokogiri", "~> 1.15.4"
28
28
 
29
29
  # Development dependancies
30
- spec.add_development_dependency "rake", "~> 13.0.6"
31
- spec.add_development_dependency "minitest", "~> 5.17.0"
32
- spec.add_development_dependency "minitest-focus", "~> 1.3.1"
33
- spec.add_development_dependency "minitest-reporters", "~> 1.5.0"
34
- spec.add_development_dependency "timecop", "~> 0.9.6"
35
- spec.add_development_dependency "mocha", "~> 2.0.2"
30
+ spec.add_development_dependency "rake", "~> 13.1.0"
31
+ spec.add_development_dependency "minitest", "~> 5.20.0"
32
+ spec.add_development_dependency "minitest-focus", "~> 1.4.0"
33
+ spec.add_development_dependency "minitest-reporters", "~> 1.6.1"
34
+ spec.add_development_dependency "timecop", "~> 0.9.8"
35
+ spec.add_development_dependency "mocha", "~> 2.1.0"
36
36
  spec.add_development_dependency "pry", "~> 0.14.2"
37
- spec.add_development_dependency "webmock", "~> 3.18.1"
37
+ spec.add_development_dependency "webmock", "~> 3.19.1"
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pihole-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-21 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -30,112 +30,112 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.15.4
33
+ version: 0.16.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.15.4
40
+ version: 0.16.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.14.0
47
+ version: 1.15.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.14.0
54
+ version: 1.15.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 13.0.6
61
+ version: 13.1.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 13.0.6
68
+ version: 13.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 5.17.0
75
+ version: 5.20.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 5.17.0
82
+ version: 5.20.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest-focus
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3.1
89
+ version: 1.4.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.3.1
96
+ version: 1.4.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: minitest-reporters
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.5.0
103
+ version: 1.6.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.5.0
110
+ version: 1.6.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: timecop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.9.6
117
+ version: 0.9.8
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.9.6
124
+ version: 0.9.8
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: mocha
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 2.0.2
131
+ version: 2.1.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 2.0.2
138
+ version: 2.1.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: pry
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 3.18.1
159
+ version: 3.19.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 3.18.1
166
+ version: 3.19.1
167
167
  description: A client for using the PiholeApi API in Ruby. Built form their api documentation.
168
168
  https://discourse.pi-hole.net/t/using-the-api/976/6. This is an unofficial project.
169
169
  email:
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubygems_version: 3.3.4
213
+ rubygems_version: 3.4.10
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: A client for using the PiholeApi API in Ruby.