pihole6api 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl

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.
@@ -1,5 +1,6 @@
1
1
  import urllib.parse
2
2
 
3
+
3
4
  class PiHole6ListManagement:
4
5
  def __init__(self, connection):
5
6
  """
@@ -54,6 +55,15 @@ class PiHole6ListManagement:
54
55
  params = {"type": list_type}
55
56
  return self.connection.get(f"lists/{encoded_address}", params=params)
56
57
 
58
+ def get_lists(self, list_type=None):
59
+ """
60
+ Retrieve all lists or lists of a specific type.
61
+
62
+ :param list_type: The type of list ("allow" or "block") (optional).
63
+ """
64
+ params = {"type": list_type} if list_type else {}
65
+ return self.connection.get("lists", params=params)
66
+
57
67
  def update_list(self, address, list_type=None, comment=None, groups=None, enabled=True):
58
68
  """
59
69
  Update an existing list.
@@ -102,4 +112,3 @@ class PiHole6ListManagement:
102
112
  params["n"] = num
103
113
 
104
114
  return self.connection.get(f"search/{domain}", params=params)
105
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pihole6api
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python API Client for Pi-hole 6
5
5
  Author-email: Shane Barbetta <shane@barbetta.me>
6
6
  License: MIT
@@ -36,7 +36,7 @@ This package provides a simple, modular SDK for the PiHole 6 REST API.
36
36
 
37
37
  ## Installation
38
38
 
39
- **Install using `pip` or `pipx`:**
39
+ **Install using `pip`:**
40
40
 
41
41
  ```bash
42
42
  pip install pihole6api
@@ -9,11 +9,11 @@ pihole6api/dns_control.py,sha256=mxV3AIuGCsx0-1ibpMXor9QUGd_fDFfeaUENPhIK_TY,853
9
9
  pihole6api/domain_management.py,sha256=vxhQSG5F8EFDGqtiNkF0H_KOWFMerXaAuJZT0nMa8ec,3492
10
10
  pihole6api/ftl_info.py,sha256=FINHFotI1sQgkL0OPaNqW-rk4h1ua6QHnRh5gFXXRIE,3210
11
11
  pihole6api/group_management.py,sha256=MGHwegw-b9U9PIA-IBzqT-a1kYkpXyjfSXJJJjkyTxc,2225
12
- pihole6api/list_management.py,sha256=52cCe3lEAvHYkyBOYdxkOn7C2I39fBUNsMpNC_rGiCI,3876
12
+ pihole6api/list_management.py,sha256=yQXKS_rnljWh5r5roNtUNDz0TWLybM_ij2I3puB756U,4192
13
13
  pihole6api/metrics.py,sha256=czNyx9tUf2yZi_HnUpqykrtW51c042Rxq3zFl2_GjLY,7379
14
14
  pihole6api/network_info.py,sha256=E1qQ7DsCb7qplt0oQIyKhUY12ExNF6bv6thm9rbNqwY,1953
15
- pihole6api-0.1.4.dist-info/LICENSE,sha256=hpO6J6J9O1VZxZeHQTxKMTmuobaHbApiZxp279I4xNU,1062
16
- pihole6api-0.1.4.dist-info/METADATA,sha256=F7_jh48dzzmrzazbdrvsBhh4_zdN6BhDhJasq7KH1lM,3778
17
- pihole6api-0.1.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
18
- pihole6api-0.1.4.dist-info/top_level.txt,sha256=Qrh46lxEC54rBR8T53em-tuZLWbmi1SDwL1rOhsgrME,11
19
- pihole6api-0.1.4.dist-info/RECORD,,
15
+ pihole6api-0.1.5.dist-info/LICENSE,sha256=hpO6J6J9O1VZxZeHQTxKMTmuobaHbApiZxp279I4xNU,1062
16
+ pihole6api-0.1.5.dist-info/METADATA,sha256=3AxbFZQ9Z78tqCMToFTE-z6yXylYNxnwfY4V6Va7coo,3768
17
+ pihole6api-0.1.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
18
+ pihole6api-0.1.5.dist-info/top_level.txt,sha256=Qrh46lxEC54rBR8T53em-tuZLWbmi1SDwL1rOhsgrME,11
19
+ pihole6api-0.1.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5