pushnetgo-cli 1.0.1 → 1.0.3
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.
- package/README.md +6 -7
- package/bin/pushnetgo-cli.js +12 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,15 +14,14 @@ Or run without installing:
|
|
|
14
14
|
npx pushnetgo-cli token check --key pushnetgo-xxx
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
## HTTP API
|
|
17
|
+
## HTTP API Endpoints
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
| URL | Purpose |
|
|
20
|
+
|-----|---------|
|
|
21
|
+
| `https://flutter-ai-playground-f8e3b.web.app/api/pushnetgo-upload` | Upload music from URL |
|
|
22
|
+
| `https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi` | All actions (token-check, sync-music) |
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
Endpoint: https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi
|
|
23
|
-
Auth: x-api-key header
|
|
24
|
-
Format: JSON POST { "action": "...", ...params }
|
|
25
|
-
```
|
|
24
|
+
Auth: `x-api-key: pushnetgo-xxx`
|
|
26
25
|
|
|
27
26
|
### Actions
|
|
28
27
|
|
package/bin/pushnetgo-cli.js
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const { Command } = require('commander');
|
|
4
4
|
const program = new Command();
|
|
5
|
+
const API_URL = 'https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi';
|
|
5
6
|
|
|
6
7
|
program
|
|
7
8
|
.name('pushnetgo-cli')
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
.description(`PushNetGo App CLI — sync music, validate tokens
|
|
10
|
+
HTTP API: ${API_URL}
|
|
11
|
+
Auth: x-api-key: pushnetgo-xxx`)
|
|
12
|
+
.version(require('../package.json').version);
|
|
11
13
|
|
|
12
14
|
program
|
|
13
15
|
.command('sync-music')
|
|
@@ -35,4 +37,11 @@ program
|
|
|
35
37
|
}
|
|
36
38
|
});
|
|
37
39
|
|
|
40
|
+
program
|
|
41
|
+
.command('api-url')
|
|
42
|
+
.description('Print the HTTP API endpoint URL')
|
|
43
|
+
.action(() => {
|
|
44
|
+
console.log(API_URL);
|
|
45
|
+
});
|
|
46
|
+
|
|
38
47
|
program.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushnetgo-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "PushNetGo App CLI —
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "PushNetGo App CLI — HTTP API: https://us-central1-flutter-ai-playground-f8e3b.cloudfunctions.net/unifiedGatewayApi",
|
|
5
5
|
"bin": {
|
|
6
6
|
"pushnetgo-cli": "./bin/pushnetgo-cli.js"
|
|
7
7
|
},
|