@zerodot/postiz 0.0.0-stage → 1.0.0
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/LICENSE +661 -0
- package/README.md +64 -2
- package/dist/index.cjs +1174 -0
- package/package.json +46 -3
- package/postiz.svg +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zerodot/postiz
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Create, schedule, list, and delete social media posts with the [Postiz](https://postiz.com) Public API. Manage channels, upload media, read analytics, and make AI videos and clips.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
In zerodot, go to **System > Nodes** and install **Postiz**.
|
|
8
|
+
|
|
9
|
+
Manual: install `@zerodot/postiz` where the web app and the worker run, and add it to `ZERODOT_NODE_PACKAGES`.
|
|
10
|
+
|
|
11
|
+
## Credential
|
|
12
|
+
|
|
13
|
+
**Postiz API** (`postiz.api`):
|
|
14
|
+
|
|
15
|
+
- **API Key**: get it in Postiz under **Settings**. It goes in the `Authorization` header with no prefix. An OAuth app token (starts with `pos_`) also works. (secret)
|
|
16
|
+
- **Base URL**: optional. Empty means Postiz Cloud (`https://api.postiz.com/public/v1`). For a self-hosted server, use `https://your-domain/api`. The node adds `/public/v1` when it is not there.
|
|
17
|
+
|
|
18
|
+
The credential test calls `GET /is-connected`.
|
|
19
|
+
|
|
20
|
+
## Node
|
|
21
|
+
|
|
22
|
+
### Postiz (`postiz.api`)
|
|
23
|
+
|
|
24
|
+
Step node. Choose a **Resource** and an **Operation**.
|
|
25
|
+
|
|
26
|
+
| Resource | Operations |
|
|
27
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| Post | Create, Get Many, Delete, Delete by Group, Get Missing Content, Update Release ID, Change Status, Update Settings, Update Attachments |
|
|
29
|
+
| Channel | Get Many, Delete, Get OAuth URL, Create Connect Link, Get Settings and Tools, Trigger a Tool, Check Connection, Get Connected Account, Find Free Slot |
|
|
30
|
+
| Group | Get Many |
|
|
31
|
+
| Analytics | Get Channel Analytics, Get Post Analytics |
|
|
32
|
+
| Notification | Get Many |
|
|
33
|
+
| Media | Upload File, Upload From URL, Get Status, Get Many |
|
|
34
|
+
| Video | Generate Video, Run Video Function |
|
|
35
|
+
| Clipping | Create, Get, Get Many |
|
|
36
|
+
|
|
37
|
+
A channel is an `integration` in the API.
|
|
38
|
+
|
|
39
|
+
### Create a post
|
|
40
|
+
|
|
41
|
+
The fields follow the Postiz API:
|
|
42
|
+
|
|
43
|
+
- **Type**: `draft`, `schedule`, or `now`.
|
|
44
|
+
- **Date**: UTC ISO date. Empty means now.
|
|
45
|
+
- **Short Link**, **Tags** (value and label).
|
|
46
|
+
- **Posts**: one entry for each channel. Each entry has a **Channel ID**, an optional **Group**, **Settings**, and **Content Items**.
|
|
47
|
+
- **Settings**: a list of key and value pairs. A value is a string, a number, a boolean, or JSON. Set `__type` to the platform, such as `x` or `linkedin`.
|
|
48
|
+
- **Content Items**: the text, an optional post ID, and **Images** (ID, path, optional alt text and video cover time).
|
|
49
|
+
|
|
50
|
+
Upload a file first with the **Upload File** operation of **Media**. Then use its `id` and `path` in **Images**.
|
|
51
|
+
|
|
52
|
+
### Notes
|
|
53
|
+
|
|
54
|
+
- **Get Many** of **Notification** counts pages from 1. Postiz counts from 0. The node does the change.
|
|
55
|
+
- **Upload File** reads a binary property of the input. The default name is `data`.
|
|
56
|
+
- **Adjust** scales the upload to the limits of the platforms. It runs in the background. Use **Get Status** to see when it is done.
|
|
57
|
+
- **Run Video Function** sends the extra parameters in `params`.
|
|
58
|
+
|
|
59
|
+
## Rate limits
|
|
60
|
+
|
|
61
|
+
Postiz limits the calls to the create post endpoint. The limit is a value for the whole server. Postiz Cloud allows about 100 calls each hour. A self-hosted server uses `API_LIMIT`. One call can have many posts. Use one call for many posts when you can. A rate limit gives an error with status 429.
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
AGPL-3.0-only
|