pixhost

0.3.0 • Public • Published

Introduction

Node.Js implementation of Pixhost.to API.

Installation

# cd /your/project/directory
# npm install pixhost --save

Usage

Image upload:

import * as pixhost from 'pixhost'

const response = await pixhost.uploadImage('/path/to/assets/image.jpg')
console.log(response)

Cover upload:

import * as pixhost from 'pixhost'

const response = await pixhost.uploadCover(['/path/to/assets/cover_left.jpg', '/path/to/assets/cover_right.jpg'])
console.log(response)

Galleries

import { uploadImage, createGallery, finalizeGallery } from './index.js'

const gallery = await createGallery('test')
const output = await uploadImage('/Users/deadtoto/Downloads/giphy.gif', gallery.gallery_upload_hash, gallery.gallery_hash)
const finalyzedGallery = await finalizeGallery(gallery.gallery_upload_hash, gallery.gallery_hash)

console.log(gallery)
console.log(output)
console.log(finalyzedGallery)

Package Sidebar

Install

npm i pixhost

Weekly Downloads

0

Version

0.3.0

License

ISC

Unpacked Size

5.96 kB

Total Files

4

Last publish

Collaborators

  • alex-kondakov