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

buffer-node

v1.0.4

Published

API client for bufferapp.com

Readme

buffer-node

Build Status Code Climate

buffer-node is a Node.js API Client for Buffer

Installation

$ npm install buffer-node

Usage

Buffer-node offers an easy to use wrapper for the Buffer API.

Example:

var bufferAPI = require('buffer-node'),
  api = bufferAPI('{{user access token}}')

api.user.get().then(
  function(response) {
    // handle success
    console.log(response)
  },
  function(err) {
    // handle error
    console.log(err)
  }
)

Authentication

Buffer uses OAuth 2.0 for authorization. It is recommended to use a library such as Passport to authorize and retrieve an access token for the user.

Client creation

When requiring the buffer-node module, a factory function for the API client will be exposed. Simply pass an access token and the ready to use client will be returned.

var bufferAPI = require('buffer-node'),
  api = bufferAPI('{{user access token}}')

Requests

API requests always return a promise using the promise module. You should then use one of the supplied methods to handle successful calls and errors.

API functions

The API client completely covers the available Buffer API endpoints. Some methods can take optional parameters as an object. The keys and values correspond to the parameter specified in the API documentation.

When passing dates, the API client will automatically convert JavaScript Date instances to the right format.

User

Retrieve a single Buffer user account.

api.user.get()

Profiles

Retrieve the social media profiles associated with the current user account.

api.profiles.get()

Retrieve a single social media profile.

api.profile('<profile ID>').get()

Schedules

Retrieve schedules associated with a social media profile.

api.profile('<profile ID>').schedules.get()

Update schedules.

  • schedules array of schedules [{days: ['mon', 'fri'], times: ['08:00', '15:00']}]
api.profile('<profile ID>').schedules.update(schedules)

Updates

Retrieve pending updates for a social media profile.

  • options page, count, since, utc
api.profile('<profile ID>').updates.pending(options)

Retrieve sent updates for a social media profile.

  • options page, count, since, utc
api.profile('<profile ID>').updates.sent(options)

Retrieve a single update.

api.update('<update ID>').get()

Retrieve social media interaction for a single update.

  • event type of event
  • options count, page
api.update('<update ID>').interactions(event, options)

Reorder updates for a single social media profile.

  • order Array of update IDs
  • options offset, utc
api.profile('<profile ID>').updates.reorder(order, options)

Shuffle updates for a single social media profile.

  • options count, utc
api.profile('<profile ID>').updates.shuffle(options)

Create a new update.

  • text Update text
  • profileIds Array of profile IDs
  • options shorten, now, top, media, attachment, scheduled_at
api.updates.create(text, profileIds, options)

Modify an existing update.

  • text Update text
  • options now, media, utc, scheduled_at
api.update('<update ID>').update(text, options)

Immediately share an existing update.

api.update('<update ID>').share()

Delete an existing update.

api.update('<update ID>').destroy()

Move an existing update to the top of the Buffer queue.

api.update('<update ID>').moveToTop()

Links

Get number of shares for a link on Buffer.

  • url URL of the link
api.links.shares(url)

Info

Get configuration Buffer is using for its social media profiles.

api.info.configuration()