lib/cli/index.js
var commander = require('commander'); var disqus = new commander.Command('disqus'); var pkg = require('../../package.json'); disqus .version(pkg.version);
Applications

API | CLI | Disqus

disqus .command('applications <cmd> [options]') .description('Execute command for the Applications resource.');
Blacklists

API | CLI | Disqus

disqus .command('blacklists <cmd> [options]') .description('Execute command for the Blacklists resource.');
Categories

API | CLI | Disqus

disqus .command('categories <cmd> [options]') .description('Execute command for the Categories resource.');
Exports

API | CLI | Disqus

disqus .command('exports <cmd> [options]') .description('Execute command for the Exports resource.'); exports.parse = function (primaryArgs, secondaryArgs) { var primaryCommand = primaryArgs.length <= 2 ? '' : primaryArgs.pop(); switch (primaryCommand) { case 'applications': case 'blacklists': case 'categories': case 'exports': if (!secondaryArgs.length) { primaryArgs.push('--help'); require('./' + primaryCommand).parse(primaryArgs); } else { secondaryArgs.splice(0, 0, primaryArgs[0], primaryArgs[1]); require('./' + primaryCommand).parse(secondaryArgs); } break; default: primaryArgs.push('--help'); disqus.parse(primaryArgs); } };