yt-dlp-host-api 0.0.7__py3-none-any.whl → 0.0.8__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.
- yt_dlp_host_api/client.py +3 -3
- {yt_dlp_host_api-0.0.7.dist-info → yt_dlp_host_api-0.0.8.dist-info}/METADATA +3 -3
- {yt_dlp_host_api-0.0.7.dist-info → yt_dlp_host_api-0.0.8.dist-info}/RECORD +6 -6
- {yt_dlp_host_api-0.0.7.dist-info → yt_dlp_host_api-0.0.8.dist-info}/LICENSE +0 -0
- {yt_dlp_host_api-0.0.7.dist-info → yt_dlp_host_api-0.0.8.dist-info}/WHEEL +0 -0
- {yt_dlp_host_api-0.0.7.dist-info → yt_dlp_host_api-0.0.8.dist-info}/top_level.txt +0 -0
yt_dlp_host_api/client.py
CHANGED
@@ -40,14 +40,14 @@ class Client:
|
|
40
40
|
return response.json()
|
41
41
|
|
42
42
|
def get_key(self, name, response_json=False):
|
43
|
-
response = requests.
|
43
|
+
response = requests.get(f"{self.host_url}/get_key/{name}", headers=self.headers)
|
44
44
|
if response.status_code != 200:
|
45
45
|
raise APIError(response.json().get('error', 'Unknown error'))
|
46
46
|
if response_json: return response.json()
|
47
47
|
return response.json()['key']
|
48
48
|
|
49
|
-
def
|
50
|
-
response = requests.get(f"{self.host_url}/
|
49
|
+
def get_keys(self):
|
50
|
+
response = requests.get(f"{self.host_url}/get_keys", headers=self.headers)
|
51
51
|
if response.status_code != 200:
|
52
52
|
raise APIError(response.json().get('error', 'Unknown error'))
|
53
53
|
return response.json()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: yt_dlp_host_api
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.8
|
4
4
|
Summary: A Python library for interacting with the yt-dlp-host API
|
5
5
|
Author-email: "Amadeus (Wasys)" <tubik.corp@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Vasysik/yt-dlp-host-api
|
@@ -50,7 +50,7 @@ print("Video info:", info_json)
|
|
50
50
|
|
51
51
|
# Admin operations (requires admin API key)
|
52
52
|
new_key = client.create_key("user_key", ["get_video", "get_audio", "get_info"])
|
53
|
-
keys = client.
|
53
|
+
keys = client.get_keys()
|
54
54
|
key = client.get_key("user_key")
|
55
55
|
client.delete_key("user_key")
|
56
56
|
```
|
@@ -93,7 +93,7 @@ client.delete_key("user_key")
|
|
93
93
|
### Admin
|
94
94
|
|
95
95
|
- `client.create_key(name, permissions)`: Create a new API key
|
96
|
-
- `client.
|
96
|
+
- `client.get_keys()`: List all existing API keys
|
97
97
|
- `client.get_key(name)`: Get API key by key name
|
98
98
|
- `client.delete_key(name)`: Delete an API key
|
99
99
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
yt_dlp_host_api/__init__.py,sha256=RHx1BvH2Cy_dweEKo5sA-hdBOfBdY_2ds7srPuKGzWQ,41
|
2
2
|
yt_dlp_host_api/api.py,sha256=iLzWKoyiXeu0Y1Uky8PzpxxHTSMcTGzxlCRT121AKcM,196
|
3
|
-
yt_dlp_host_api/client.py,sha256=
|
3
|
+
yt_dlp_host_api/client.py,sha256=TDyzpKwhTqwi_Ob3oV3KCweZG-GDolPo6FFcdR_h0UE,3581
|
4
4
|
yt_dlp_host_api/exceptions.py,sha256=U_70W1R_ZcUfKptUShGB5VPWQXwc5M29_sNC8pwwq8g,38
|
5
5
|
yt_dlp_host_api/task.py,sha256=llgBAO_L1CajklMsbICdRpLdOV05Wi0oUh9NKj0bD0w,2674
|
6
|
-
yt_dlp_host_api-0.0.
|
7
|
-
yt_dlp_host_api-0.0.
|
8
|
-
yt_dlp_host_api-0.0.
|
9
|
-
yt_dlp_host_api-0.0.
|
10
|
-
yt_dlp_host_api-0.0.
|
6
|
+
yt_dlp_host_api-0.0.8.dist-info/LICENSE,sha256=-_Ad_xue4UymJ8jO-ZsSg0vmZ6SUm8WYdoEwHLyBUlc,1078
|
7
|
+
yt_dlp_host_api-0.0.8.dist-info/METADATA,sha256=I3nTkfbB2BVY9nStph5DrHVDQoLQ9JQdLItbYLCqnFA,3496
|
8
|
+
yt_dlp_host_api-0.0.8.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
9
|
+
yt_dlp_host_api-0.0.8.dist-info/top_level.txt,sha256=Mn3FZuqLCHr47sRjhtEOz7lDl4lpsHkymWANORYp72s,16
|
10
|
+
yt_dlp_host_api-0.0.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|