1.1.0 • Published 4 years ago

rambin v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Installation

npm i --save rambin

 

Usage

Option 1

const RamBin = require("rambin");
const bin = new RamBin();

bin.create({
    code: "let hello = 'world';",
    lang: "JavaScript", //View the available languages and delete in dates here: https://rambin.tk
    delIn: "2h"
})
.then(url => console.log(url)) //Might look something like: https://rambin.tk/zylu87f1hhe0.js
.catch(err => console.log(err));
  • rambin
    • create(options) ⇒ {Promise}

ParamTypeDescription
codestringThe code to be displayed in the bin (required)
langstringThe language of the code (optional | default: text)
delInstringThe time of bin demolishment (optional | default: 2h)

   

Option 2

const RamBin = require("rambin");
const bin = new RamBin();

bin.get({
    id: "zylu87f1hhe0",
    type: "json" //raw
})
.then(body => console.log(body))
.catch(err => console.log(err));
JSON output:
{
    "id": "zylu87f1hhe0",
    "code": "let hello = 'world';",
    "lang": "text",
    "created": 1585314645635
}

RAW output:
let hello = 'world';
  • rambin
    • get(options) ⇒ {Promise}
ParamTypeDescription
idstringThe id of the requested bin (required)
typestringThe type of information to request (optional | types: 'raw' & 'json')

   

Option 3 - UNDER DEVELOPMENT (coming in any future versions)

const RamBin = require("rambin");
const bin = new RamBin();

bin.getMyBins({
    userID: "303586677484003840" 
})
.then(bins => console.log(bins)) //OUTPUT: redirect link or array of redirect links
.catch(err => console.log(err));
  • rambin
    • getMyBins(option) ⇒ {Promise}
ParamTypeDescription
userIDstringThe id of the discord user (required) not sure what this means?
1.1.0

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago