1.0.2 • Published 4 years ago

@eversedev/jelbrek.js v1.0.2

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
4 years ago

jelbrek.js

This is a JavaScript API wrapper for jelbrek.icu written in TypeScript. jelbrek.icu is a image-uploading service.

Examples

import jelbrek from "jelbrek.js"; 
import fs from "fs";

jelbrek(fs.readFileSync("./image.png"), "png", "example-key")
// Returns: Promise<Response>

Documentation

upload

Parameters: name | type | optional | default ---- | ---- | -------- | ------- image | Buffer | no | - type | ImageType | no | - key | string | no | - expiry | number | yes | account highest

Returns: Promise\<Response>

Response

Type: Object
Properties: name | type | optional ---- | ---- | -------- success | boolean | no message | "Success." | yes url | string | yes error | ErrorType | yes

ImageType

"png" or "webp" or "jpg"

ErrorType

"No file to upload" or "Authorization header is incorrect." or "Authorization header is not provided."