upload-post
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Upload-Post Node.js Client

Official client library for Upload-Post API - cross-platform social media video upload.

Features

  • 🚀 Simple video upload to multiple platforms
  • 🔒 Secure API key authentication
  • 📁 Supports all major video formats
  • 📝 Automatic form data handling

Installation

npm install upload-post

Usage

import { UploadPost } from 'upload-post';

const uploader = new UploadPost('your-api-key-here');

// Upload video with options
const result = await uploader.upload('/path/to/video.mp4', {
  title: 'My Awesome Video',
  user: 'test-user',
  platforms: ['tiktok'] // Currently supported platforms
});

console.log('Upload successful:', result);

API Documentation

Constructor

new UploadPost(apiKey: string)

upload()

upload(videoPath: string, options: UploadOptions): Promise<object>

Options

  • videoPath: Path to video file (MP4, MOV, AVI, etc.)
  • options.title: Video title
  • options.user: User identifier
  • options.platforms: Array of target platforms (currently supports 'tiktok')

Error Handling

The library throws errors for:

  • Missing required parameters
  • File not found
  • API request failures
  • Invalid platform specifications

License

MIT

Package Sidebar

Install

npm i upload-post

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

4.17 kB

Total Files

4

Last publish

Collaborators

  • upload-post