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

0.0.7 • Public • Published

elixi.re uploader/shortener by hokkqi

this is a module for the main elixire instance as well as self-hosted instances

import Elixire from "elixire"; 
// OR 
let Elixire = require("elixire");

let Uploader = new Elixire({
  instance_url: "<Instance URL here>",// optional, defaults to elixi.re
  apikey: "<API Key here>", // needed
});

let File = fs.readFileSync("./404.png"); // or another way to get the Buffer of an Image
let URL = "https://himbo.cat";

Uploader.Upload({ buffer: File }).then((r) => console.log(r));
/* 
returns {
    url: string,
    shortlink: string,
    delete_url: string
}
*/
Uploader.Shorten({ url: URL }).then((r) => console.log(r));
/* 
returns {
    url: string
}
*/

Readme

Keywords

none

Package Sidebar

Install

npm i elixire

Weekly Downloads

0

Version

0.0.7

License

ISC

Unpacked Size

30 kB

Total Files

10

Last publish

Collaborators

  • hokkqi