Skip to content

AmashiM/sourcebin-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<style> body { background-color: rgb(30,30,30); } </style>

sourcebin-lite

is a short sweet, easy, and lightweight sourcebin wrapper using nodejs

license

I use the unlicense

docs

1. create

const sourcebin = require("sourcebin-lite");

(async () => {
	// title, code, options
	const url = await sourcebin.create("title", "code", {
		title: "title",
		description: "description",
	});

	console.log(url);
	// returns "https://sourceb.in/key"
})();

2. get_key

const sourcebin = require("sourcebin-lite");

// you just put in the url of the sourcebin
const key = sourcebin.get_key("https://sourceb.in/key");
console.log(key);
// returns "key"

3. get url

const sourcebin = require("sourcebin-lite");

// you can get the key from document 2
const key = "some key";

// default method
const url1 = sourcebin.url(key);
// returns "https://sourceb.in/key"

// short url method
const url2 = sourcebin.url.short(key);
// returns "https://srcb.in/key"
//
// you can also do sourcebin.short_url and it works the same way

// long url method
const url3 = sourcebin.url.long(key);
// returns "https://sourceb.in/key"
//
// you can also do sourcebin.long_url and it works the same way

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published