Skip to content

Alex-Kondakov/pixhost-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Node.Js implementation for Pixhost.to API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published