This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

filebin.js

1.1.3-b • Public • Published

Under Development ⚠

This package is currently being worked on, don't expect everything to work as planned.

Note: Bugs as suggestions can be told in the issues tab.

We do not recommend uploading large files.

filebin.js 🗑

A javascript api for filebin.net

npm version


Example Code ✏

upload

const filebin = require("filebin.js")

filebin.upload("your file name", "the content of that file").then(promise => {

})

// If you would log 'promise', it would return:
{
    bin_url: 'https://dev.filebin.net/...', // String
    file_url: 'https://dev.filebin.net/.../...', // String
    bin_id: '...', // String
    file_size: ..., // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
    expires_in: '...' // Date (year-month-dayThour:minute:second:miliseconds) - String
}

download

const filebin = require("filebin.js")

filebin.download("bin id", "file name", "path to download to").then(promise => {

})

// If you would log 'promise', it would return:
{
    path: "...", // String
    file_name: "..." // String
}

getInfo

const filebin = require("filebin.js")

filebin.getInfo('bin id').then(promise => {

})

// If you would log 'promise', it would return:
{
    bin_id: '...', // String
    bin_size_bytes: ..., // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
    bin_files_size: ..., // Integer
    bin_files: [ // Array
        {
            file_name: '...', // String
            file_url: 'https://dev.filebin.net/.../...', // String
            file_size_bytes: ... // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
        }
    ]
}

downloadBin

const filebin = require("filebin.js")

filebin.downloadBin('bin id', "path to download to").then(promise => {

})

// If you would log 'promise', it would return:
{
    path: "(path where it is downloaded)",
    filesDownloaded: [
        {
            file_name: '...', // String
            file_url: 'https://dev.filebin.net/.../...', // String
            file_size_bytes: ... // Returns in bytes (There will not be a 'b' for bytes included.) - Integer
        }
    ]
}

Checklist 📃

  • [X] Upload file
  • [X] Download file
  • [X] Get bin info
  • [X] Download Bin

Package Sidebar

Install

npm i filebin.js

Weekly Downloads

3

Version

1.1.3-b

License

GPL-2.0

Unpacked Size

28.6 kB

Total Files

4

Last publish

Collaborators

  • robertsspaceindustries