@publishq/cli 0.0.7 → 0.0.9
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 +2 -1
- package/dist/index.js +6 -1
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -83,6 +83,7 @@ pq media list [--page 1] [--limit 20] [--id <media-id>] \
|
|
|
83
83
|
[--media-type IMAGE] [--source UPLOAD]
|
|
84
84
|
pq media get <media-id>
|
|
85
85
|
pq media upload --file ./photo.jpg [--filename custom.jpg]
|
|
86
|
+
pq media delete <media-id>
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
Upload returns a media object whose `id` you can pass to `pq posts create --media-id <id>`. Files up to 4 GB are accepted (500 MB on the Free plan).
|
|
@@ -99,7 +100,7 @@ API keys carry scopes that control access. A call missing the required scope ret
|
|
|
99
100
|
| `workspaces:read` | `workspaces list`, `workspaces get` |
|
|
100
101
|
| `workspaces:write` | `workspaces create` |
|
|
101
102
|
| `media:read` | `media list`, `media get` |
|
|
102
|
-
| `media:write` | `media upload`
|
|
103
|
+
| `media:write` | `media upload`, `media delete` |
|
|
103
104
|
|
|
104
105
|
## Related
|
|
105
106
|
|
package/dist/index.js
CHANGED
|
@@ -327,7 +327,7 @@ yargs(hideBin(process.argv)).scriptName("publishq").usage("$0 <command> [options
|
|
|
327
327
|
}
|
|
328
328
|
).command(
|
|
329
329
|
"media",
|
|
330
|
-
"Upload, list, and
|
|
330
|
+
"Upload, list, retrieve, and delete media files",
|
|
331
331
|
(y) => y.command(
|
|
332
332
|
["list", "$0"],
|
|
333
333
|
"List your uploaded and generated media",
|
|
@@ -367,6 +367,11 @@ yargs(hideBin(process.argv)).scriptName("publishq").usage("$0 <command> [options
|
|
|
367
367
|
"Get a media file by id",
|
|
368
368
|
(yy) => yy.positional("id", { type: "string", demandOption: true }),
|
|
369
369
|
(argv) => output(getClient().media.get(argv.id), argv.pretty)
|
|
370
|
+
).command(
|
|
371
|
+
"delete <id>",
|
|
372
|
+
"Delete a media file by id. Refused while a draft or scheduled post uses it",
|
|
373
|
+
(yy) => yy.positional("id", { type: "string", demandOption: true }),
|
|
374
|
+
(argv) => output(getClient().media.delete(argv.id), argv.pretty)
|
|
370
375
|
).command(
|
|
371
376
|
"upload",
|
|
372
377
|
"Upload a media file and get back a media id",
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@publishq/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Official command-line interface for the PublishQ API. Schedule and publish across your social platforms.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "PublishQ",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/alexand-ro/2-publishq.git",
|
|
11
|
+
"directory": "packages/cli"
|
|
12
|
+
},
|
|
8
13
|
"homepage": "https://publishq.com",
|
|
9
14
|
"keywords": [
|
|
10
15
|
"publishq",
|
|
@@ -27,8 +32,8 @@
|
|
|
27
32
|
"LICENSE"
|
|
28
33
|
],
|
|
29
34
|
"dependencies": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
35
|
+
"yargs": "^17.7.2",
|
|
36
|
+
"@publishq/sdk": "^0.0.5"
|
|
32
37
|
},
|
|
33
38
|
"devDependencies": {
|
|
34
39
|
"@types/node": "^20",
|