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 🙏

© 2024 – Pkg Stats / Ryan Hefner

disqus-node

v0.13.0

Published

Disqus API bindings and CLI for NodeJS http://disqus.com/api/

Downloads

22

Readme

disqus-node

Disqus API bindings and CLI for NodeJS. disqus-node documentation.

Copyright © 2014 Jason Dobry

Status

NPM

Build Status

Coverage Status

Code Climate

Dependency Status

Documentation

Disqus v3.0 API Documentation

var Disqus = require('disqus-node');

var disqus = new Disqus({
  // required
  api_secret: 'abcdefgh',
  // required when authentication is required
  access_token: '12345678',
  // defaults shown
  logLevel: 'info',
  https: true
});

// promise-style
disqus.forums.listPosts({
  forum: 'pseudobry',
  limit: 3
}).then(function (response) {
  response; // {
                 "cursor": {...},
                 "code": 0,
                 "response": [
                   {...},
                   {...},
                   {...}
                 ]
               }
});

// node-style
disqus.forums.listPosts({
  forum: 'pseudobry',
  limit: 3
}, function (err, response) {
  response; // {
                 "cursor": {...},
                 "code": 0,
                 "response": [
                   {...},
                   {...},
                   {...}
                 ]
               }
});
$ npm install -g disqus-node

CLI available as disqus. disqus has a number of available resources:

$ disqus -h

Usage: disqus <cmd> <subCmd> [options]

Commands:

applications <cmd> [options] Execute command for the Applications resource.
blacklists <cmd> [options] Execute command for the Blacklists resource.
categories <cmd> [options] Execute command for the Categories resource.
exports <cmd> [options] Execute command for the Exports resource.
forums <cmd> [options] Execute command for the Forums resource.
imports <cmd> [options] Execute command for the Imports resource.
posts <cmd> [options] Execute command for the Posts resource.
topics <cmd> [options] Execute command for the Topics resource.
trends <cmd> [options] Execute command for the Trends resource.
whitelists <cmd> [options] Execute command for the Whitelists resource.

Options:

-h, --help     output usage information
-V, --version  output the version number

Each resource has available commands:

$ disqus forums -h

Usage: disqus forums <cmd> [options]

Commands:

addModerator [options]  Adds a moderator to a forum.
create [options]       Creates a new forum.
details [options]      Returns forum details.
follow [options]       Follow a forum.
installed [options]    Returns true if forum has one or more views.
listCategories [options]  Returns a list of categories within a forum.
listFollowers [options]   Returns a list of users following a forum.
listModerators [options]  Returns a list of all moderators on a forum.
listMostActiveUsers [options]  Returns a list of users active within a forum ordered by most comments made.
listMostLikedUsers [options]   Returns a list of users active within a forum ordered by most likes received.
listPosts [options]     Returns a list of posts within a forum.
listThreads [options]   Returns a list of threads within a forum sorted by the date created.
listUsers [options]     Returns a list of users active within a forum.
removeModerator [options]      Removes a moderator from a forum.
unfollow [options]      Unfollow a forum.

Options:

-h, --help  output usage information
$ disqus forums listPosts -h
  
Usage: listPosts [options]
  
Options:
  
-h, --help                 output usage information
-c, --cursor [cursor]      Defaults to null,
-f, --forum <string>       Looks up a forum by ID (aka short name).
-H, --https [boolean]      Whether to use https. Defaults to true.
-i, --include [array]      Defaults to ["approved"]. Choices: unapproved, approved, spam, deleted, flagged, highlighted.
-l, --limit [number]       Maximum number of posts to return. Maximum value of 100. Defaults to 25.
-L, --logLevel [string]    Output log level. Choices: debug, info, notice, warning, error, critical, alert, emergency.
-o, --order [string]       Choices: asc, desc. Defaults to "desc".
-q, --query [string]       Defaults to null.
-r, --related [array]      You may specify relations to include with your response. Choices: thread.
-s, --since [string]       Unix timestamp (or ISO datetime standard).
-S, --api_secret <string>  Your application's api_secret.
$ disqus forums listPosts -f pseudobry -S '1234abcd' -l 3

{
  "cursor": {...},
  "code": 0,
  "response": [
    {...},
    {...},
    {...}
  ]
}