pihole6api 0.1.5__py3-none-any.whl → 0.1.7__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.
@@ -47,6 +47,12 @@ class PiHole6ClientManagement:
47
47
  :param client: Client identifier (IP, MAC, hostname, or interface).
48
48
  """
49
49
  return self.connection.get(f"clients/{client}")
50
+
51
+ def get_clients(self):
52
+ """
53
+ Retrieve information about all clients.
54
+ """
55
+ return self.connection.get(f"clients")
50
56
 
51
57
  def update_client(self, client, comment=None, groups=None):
52
58
  """
@@ -41,6 +41,12 @@ class PiHole6GroupManagement:
41
41
  :param name: Name of the group to fetch.
42
42
  """
43
43
  return self.connection.get(f"groups/{name}")
44
+
45
+ def get_groups(self):
46
+ """
47
+ Retrieve information about all groups.
48
+ """
49
+ return self.connection.get("groups")
44
50
 
45
51
  def update_group(self, name, new_name=None, comment=None, enabled=True):
46
52
  """
@@ -36,8 +36,8 @@ class PiHole6ListManagement:
36
36
  """
37
37
  Delete multiple lists.
38
38
 
39
- :param lists: List of dictionaries with keys "address" and "type".
40
- Example: [{"address": "https://example.com/blocklist.txt", "type": "block"}]
39
+ :param lists: List of dictionaries with keys "item" and "type".
40
+ Example: [{"item": "https://example.com/blocklist.txt", "type": "block"}]
41
41
  """
42
42
  if not isinstance(lists, list):
43
43
  raise ValueError("lists must be a list of dictionaries.")
@@ -64,12 +64,12 @@ class PiHole6ListManagement:
64
64
  params = {"type": list_type} if list_type else {}
65
65
  return self.connection.get("lists", params=params)
66
66
 
67
- def update_list(self, address, list_type=None, comment=None, groups=None, enabled=True):
67
+ def update_list(self, address, list_type, comment=None, groups=None, enabled=True):
68
68
  """
69
69
  Update an existing list.
70
70
 
71
71
  :param address: URL of the blocklist/allowlist.
72
- :param list_type: Type of list ("allow" or "block") (optional).
72
+ :param list_type: Type of list ("allow" or "block").
73
73
  :param comment: Updated comment (optional).
74
74
  :param groups: Updated list of group IDs (optional).
75
75
  :param enabled: Whether the list is enabled (default: True).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pihole6api
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Python API Client for Pi-hole 6
5
5
  Author-email: Shane Barbetta <shane@barbetta.me>
6
6
  License: MIT
@@ -1,19 +1,19 @@
1
1
  pihole6api/__init__.py,sha256=OKDAH2I6UjXcBmcj6rn5aNg5J60GCUBVFJ-_t83GiVQ,898
2
2
  pihole6api/actions.py,sha256=8CBkr8nYfT8yfdCO6F9M9nompaYcFdsaYGiEa1eVDCw,693
3
3
  pihole6api/client.py,sha256=HYdRh3CSZJ0srbkpjIVnLo-iy1avqKDUne5ji2Aq394,2013
4
- pihole6api/client_management.py,sha256=opPYGrjuW6SiwuxuvoOxnqjpmflU2znKHsqFbGSS3Gg,2439
4
+ pihole6api/client_management.py,sha256=n8Ra_6pRL3Q9jlIK3kIK9bmh74MTfxgYnOHYaUwYGNs,2590
5
5
  pihole6api/config.py,sha256=NdBHOudz147oIs5YVR3U4WLvqk3hU3HlZHnshy1NK4g,4680
6
6
  pihole6api/conn.py,sha256=60Q9paDCD6Bwmdg_G9mOUr86Hzj9G-dhMwL7F3NvLB8,5837
7
7
  pihole6api/dhcp.py,sha256=1A3z-3q9x51-6MOC3JMl7yR_5pHmRxZtMWtPqzWxYm0,629
8
8
  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
- pihole6api/group_management.py,sha256=MGHwegw-b9U9PIA-IBzqT-a1kYkpXyjfSXJJJjkyTxc,2225
12
- pihole6api/list_management.py,sha256=yQXKS_rnljWh5r5roNtUNDz0TWLybM_ij2I3puB756U,4192
11
+ pihole6api/group_management.py,sha256=Iip2Na4pUYgC5K9cwOWv_OPD6qdXRzWCmlS-fJlBMjU,2372
12
+ pihole6api/list_management.py,sha256=CooTeF4EmNPFwnzGoLbHFMhCePJ-ojvRGx7Sxzayy-U,4170
13
13
  pihole6api/metrics.py,sha256=czNyx9tUf2yZi_HnUpqykrtW51c042Rxq3zFl2_GjLY,7379
14
14
  pihole6api/network_info.py,sha256=E1qQ7DsCb7qplt0oQIyKhUY12ExNF6bv6thm9rbNqwY,1953
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,,
15
+ pihole6api-0.1.7.dist-info/LICENSE,sha256=hpO6J6J9O1VZxZeHQTxKMTmuobaHbApiZxp279I4xNU,1062
16
+ pihole6api-0.1.7.dist-info/METADATA,sha256=VTQPEmn56bSQB7hh42zNGAdjQCK8ElHOTPYD9SOVEsc,3768
17
+ pihole6api-0.1.7.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
18
+ pihole6api-0.1.7.dist-info/top_level.txt,sha256=Qrh46lxEC54rBR8T53em-tuZLWbmi1SDwL1rOhsgrME,11
19
+ pihole6api-0.1.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (76.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5