feat: postiz sdk

This commit is contained in:
Nevo David 2025-07-07 19:11:15 +07:00
parent 1ec42bacde
commit 289025dc27
2 changed files with 25 additions and 1 deletions

24
apps/sdk/README.md Normal file
View File

@ -0,0 +1,24 @@
# Postiz NodeJS SDK
This is the NodeJS SDK for Postiz.
You can start by installing the package:
```bash
npm install @postiz/node
```
## Usage
```typescript
import Postiz from '@postiz/node';
const postiz = new Postiz('your api key', 'your self-hosted instance (optional)');
```
The available methods are:
- `post(posts: CreatePostDto)` - Schedule a post to Postiz
- `postList(filters: GetPostsDto)` - Get a list of posts
- `upload(file: Buffer, extension: string)` - Upload a file to Postiz
- `integrations()` - Get a list of connected channels
- `deletePost(id: string)` - Delete a post by ID
Alternatively you can use the SDK with curl, check the [Postiz API documentation](https://docs.postiz.com/public-api) for more information.

View File

@ -1,6 +1,6 @@
{
"name": "@postiz/node",
"version": "1.0.0",
"version": "1.0.1",
"description": "The Ultimate social media scheduling tool",
"main": "dist/index.js",
"types": "dist/index.d.ts",