guardcoreapi 0.2.2.dev20251025224637__py3-none-any.whl → 0.2.2.dev20251025231248__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.
Potentially problematic release.
This version of guardcoreapi might be problematic. Click here for more details.
- guardcoreapi/manager.py +22 -0
- guardcoreapi/types/__init__.py +2 -1
- guardcoreapi/types/stats.py +12 -0
- {guardcoreapi-0.2.2.dev20251025224637.dist-info → guardcoreapi-0.2.2.dev20251025231248.dist-info}/METADATA +1 -1
- {guardcoreapi-0.2.2.dev20251025224637.dist-info → guardcoreapi-0.2.2.dev20251025231248.dist-info}/RECORD +8 -7
- {guardcoreapi-0.2.2.dev20251025224637.dist-info → guardcoreapi-0.2.2.dev20251025231248.dist-info}/WHEEL +0 -0
- {guardcoreapi-0.2.2.dev20251025224637.dist-info → guardcoreapi-0.2.2.dev20251025231248.dist-info}/licenses/LICENSE +0 -0
- {guardcoreapi-0.2.2.dev20251025224637.dist-info → guardcoreapi-0.2.2.dev20251025231248.dist-info}/top_level.txt +0 -0
guardcoreapi/manager.py
CHANGED
|
@@ -18,6 +18,7 @@ from .types import (
|
|
|
18
18
|
ServiceCreate,
|
|
19
19
|
ServiceResponse,
|
|
20
20
|
ServiceUpdate,
|
|
21
|
+
StatsResponse,
|
|
21
22
|
)
|
|
22
23
|
|
|
23
24
|
|
|
@@ -379,3 +380,24 @@ class GuardCoreApi:
|
|
|
379
380
|
return await RequestCore.get(
|
|
380
381
|
f"/api/guards/{secret}",
|
|
381
382
|
)
|
|
383
|
+
|
|
384
|
+
@staticmethod
|
|
385
|
+
async def get_guard_info(secret: str) -> SubscriptionResponse:
|
|
386
|
+
return await RequestCore.get(
|
|
387
|
+
f"/api/guards/{secret}/info",
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
@staticmethod
|
|
391
|
+
async def get_guard_usage_logs(secret: str) -> SubscriptionUsageLogsResponse:
|
|
392
|
+
return await RequestCore.get(
|
|
393
|
+
f"/api/guards/{secret}/usages",
|
|
394
|
+
response_model=SubscriptionUsageLogsResponse,
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
@staticmethod
|
|
398
|
+
async def get_stats(api_key: str) -> StatsResponse:
|
|
399
|
+
return await RequestCore.get(
|
|
400
|
+
"/api/stats",
|
|
401
|
+
headers=RequestCore.generate_headers(api_key),
|
|
402
|
+
response_model=StatsResponse,
|
|
403
|
+
)
|
guardcoreapi/types/__init__.py
CHANGED
|
@@ -27,7 +27,7 @@ from .nodes import (
|
|
|
27
27
|
NodeStatsResponse,
|
|
28
28
|
)
|
|
29
29
|
from .services import ServiceResponse, ServiceCreate, ServiceUpdate
|
|
30
|
-
|
|
30
|
+
from .stats import StatsResponse
|
|
31
31
|
|
|
32
32
|
__all__ = [
|
|
33
33
|
"AdminPlaceHolderCategory",
|
|
@@ -55,4 +55,5 @@ __all__ = [
|
|
|
55
55
|
"ServiceResponse",
|
|
56
56
|
"ServiceCreate",
|
|
57
57
|
"ServiceUpdate",
|
|
58
|
+
"StatsResponse",
|
|
58
59
|
]
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
guardcoreapi/__init__.py,sha256=GohrmPFFH_Bfa5Ex3n0u-c4RjU47KbmoBYi38k8S_NI,62
|
|
2
|
-
guardcoreapi/manager.py,sha256=
|
|
2
|
+
guardcoreapi/manager.py,sha256=TdxYPO3gE-uXESuDWXRofFqnVtj83-rmN7PUQ3jh9bA,13582
|
|
3
3
|
guardcoreapi/core/__init__.py,sha256=QJhZCPZui7zDpnQJbmWZsEijiAAP3rglUZb_w6E61_M,381
|
|
4
4
|
guardcoreapi/core/exceptions.py,sha256=KbmdV8p31gSlKXjmJoW3lR9wGOQSvaaZKl9oGb7qlFI,555
|
|
5
5
|
guardcoreapi/core/request.py,sha256=jDz2DXgFvJFTUhd_ykcNFsIYTxcKawR24qGKrbrrq40,4297
|
|
6
|
-
guardcoreapi/types/__init__.py,sha256=
|
|
6
|
+
guardcoreapi/types/__init__.py,sha256=t07YOFdjubkHZqHrn_nlaEvCPdhiJUFxyFyZt8DNwJU,1328
|
|
7
7
|
guardcoreapi/types/admins.py,sha256=YaA0dxIkcTm_a0LfaQ7gVYedhFQVI6hbHK6WIXAIAVE,2851
|
|
8
8
|
guardcoreapi/types/nodes.py,sha256=U4uCTm2TYETysceN_5ap4dP2if6sIUyEnavCvzlNpUo,1075
|
|
9
9
|
guardcoreapi/types/services.py,sha256=3lpP76Q9iij2zSEXutDg1IatIslLokQ-DNPvSdckRCQ,369
|
|
10
|
+
guardcoreapi/types/stats.py,sha256=yzSeJU39S-2djs6mNoLkSf3K2RDE994buu7T04-wDXQ,245
|
|
10
11
|
guardcoreapi/types/subscriptions.py,sha256=HS8z3zhmS8RYa-D4CEGEt5WJ_SDSJ_dIW41uxwgdZ6I,1388
|
|
11
|
-
guardcoreapi-0.2.2.
|
|
12
|
-
guardcoreapi-0.2.2.
|
|
13
|
-
guardcoreapi-0.2.2.
|
|
14
|
-
guardcoreapi-0.2.2.
|
|
15
|
-
guardcoreapi-0.2.2.
|
|
12
|
+
guardcoreapi-0.2.2.dev20251025231248.dist-info/licenses/LICENSE,sha256=BPTJfvegcaek6E2PQ2rViLbxbfB1AbjIauxVQWo5Od4,1062
|
|
13
|
+
guardcoreapi-0.2.2.dev20251025231248.dist-info/METADATA,sha256=rrZ2As498ODKmofXvhuzEAA3a3VxE0IfYhmxhaRw3eM,291
|
|
14
|
+
guardcoreapi-0.2.2.dev20251025231248.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
guardcoreapi-0.2.2.dev20251025231248.dist-info/top_level.txt,sha256=ArZR_iOVG8XvUCTMHioVgKI8CkJOX_yH8t7898OXBF8,13
|
|
16
|
+
guardcoreapi-0.2.2.dev20251025231248.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|