npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-fullbox-api

v0.1.4

Published

A full javascript api for BOX.COM

Readme

node-fullbox-api

A full javascript implementation of the Box.Com API

This is a full cycle implementation of the Box API. It includes:

  • Box Token Request
  • Box Refresh Token Request
  • Upload file to box
  • Retrieve Box file information
  • Shared link creation
  • Retrieve file from Box
  • Retrieve thumbnail of file from Box

More api intergration to come.

Future enhancements include using the Box View Api to generate thumbnails for more file types, and integration with the Box View API.

Installation

npm install node-fullbox-api

Setup and Use

var BOX = require('node-fullbox-api');  
var Box = new BOX(box_options);

Box Options

{  
authorize_url : <box authorizarion endpoint>,  
token_url : <box token endpoint>,  
user_name : <box user name>,  
password : <box user password>,  
client_id : <box api client id>,  
client_secret : <box api client secret>,  
base_url: <box content api endpoint>,  
upload_url: <box content upload api endpoint>,  
auto_rename : <true or false> (auto-renaming uploaded files in the case of name collisions)  
}  

Functions

All of the functions first check for a valid token. If one is not found it first tries to refresh the last token, otherwise makes a request for a new token.

Box.uploadfile(values, callback);

Function to upload a file to Box. The JSON returned is identical to the JSON the standard API returns.

Values

{  
filename : <name of file to be uploaded>,  
folderid : <Box folder id to upload file to>,  
filepath : <path to file to be uploaded>  
}  

Callback

function(data) {
    /* data is the json data returned for the box file */
}

Box.getfileinfo(values, callback);

Function to get file information from Box. The JSON returned is identical to the JSON the standard API returns.

Values

{  
fileid : <Box file id>
}  

Callback

function(data) {
    /* data is the json data returned for the box file */
}

Box.createsharedlink(values, callback);

Creates a shared link for a box file. The JSON returned is identical to the JSON the standard API returns.

Values

{  
fileid : <Box file id>,
access : <access type to grant>, /* open, company, collaborators, null (default is open, null removes shared link) */
can_download : <true or false> /* determines of downloads of file is available */    
}  

Callback

function(data) {
    /* data is the json data returned for the box file */
}

Box.getthumbnail(values);

Returns a stream of the image thumbnail for a file in box. If the file is an image or movie type a thumbnail will be returned. If not an image or movie, the file type icon from box will be returned, otherwise a generic default image is returned.

Values

{  
fileid : <Box file id>,
response_stream : <the writable stream where to pipe the servers response, which is the image bytes>    
}