Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buffer-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-js

Node.js Wrapper for the Buffer API

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js Wrapper for the Buffer API

This Node package makes working with the Buffer API a breeze! A little present for the awesome Buffer team & the happy community :)

The package was design with simplicity and extendability in mind. In other words, it's object oriented! It's so simple that I thought writing test code would be an overkill!

Installation

To get started, just...

npm install buffer-js

Usage

You'll need an access token to start using the Buffer API, you can either use the single-time access token provided by Buffer when you created the application for your own usage only, or you can request access tokens using OAUTH 2.0, which is beyond the scope of this package.

NOTE: the params object literal that you may need to pass varries by method. Check the Buffer API docs for more info.

var Buffer = require('buffer-js');

var callback = function(body) {
  console.log(body);
};

// Check the Buffer API docs to pass the right parameters
// based on the method you're calling
var params = {
  ...
  ...
}



var opts = {
  access_token: 'ACCESS_TOKEN'
};
var User = new Buffer.User(opts);
User.get(callback);
var Links = new Buffer.Links(opts);
Links.get(params, callback);
var Info = new Buffer.Info(opts);
Info.get(callback);



var opts = {
  access_token: 'ACCESS_TOKEN',
  profile_id: 'PROFILE_ID'
};
Profiles = new Buffer.Profiles(opts);
Profiles.all(callback); // doesn't need profile_id
Profiles.get(callback);
Profiles.schedules(callback);
Profiles.updateSchedules(params, callback);
Profiles.pendingUpdates(params, callback);
Profiles.sentUpdates(params, callback);
Profiles.reorderUpdates(params, callback);
Profiles.shuffleUpdates(params, callback);



var opts = {
  access_token: 'ACCESS_TOKEN',
  update_id: 'UPDATE_ID'
};
Updates = new Buffer.Updates(opts);
Updates.create(params, callback); // doesn't need update_id
Updates.get(callback);
Updates.interactions(params, callback); 
Updates.update(params, callback); 
Updates.share(callback);
Updates.destroy(callback);
Updates.moveTop(callback);

Keywords

FAQs

Package last updated on 09 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc