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

disqus-node

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disqus-node - npm Package Compare versions

Comparing version 0.5.0 to 0.7.0

CHANGELOG.md

4

lib/api/applications.js

@@ -41,4 +41,4 @@ /**

* disqus.applications.listUsage({
* api_secret: 'asdfghkj' // can be set globally
* access_token: '12345678' // can be set globally
* api_secret: 'asdfghkj', // can be set globally
* access_token: '12345678', // can be set globally
* // defaults shown

@@ -45,0 +45,0 @@ * application: null,

@@ -62,4 +62,4 @@ /**

* forum: '',
* api_secret: 'asdfghkj' // can be set globally
* access_token: '12345678' // can be set globally
* api_secret: 'asdfghkj', // can be set globally
* access_token: '12345678', // can be set globally
* // defaults shown

@@ -111,4 +111,4 @@ * domain: [],

* forum: '', // required
* api_secret: 'asdfghkj' // can be set globally
* access_token: '12345678' // can be set globally
* api_secret: 'asdfghkj', // can be set globally
* access_token: '12345678', // can be set globally
* // defaults shown

@@ -147,4 +147,4 @@ * since: null,

* forum: '', // required
* api_secret: 'asdfghkj' // can be set globally
* access_token: '12345678' // can be set globally
* api_secret: 'asdfghkj', // can be set globally
* access_token: '12345678', // can be set globally
* // defaults shown

@@ -151,0 +151,0 @@ * domain: [],

/**
* [Up one level](../index.html)
* [Up one level](/lib/index.html)
* ### Exports API
* See also [Exports CLI](../cli/exports.html)
* See the disqus-node [Exports CLI](/lib/cli/exports.html).
*
* See the [Exports API on Disqus.com](https://disqus.com/api/docs/exports/).
*/
module.exports = function Exports() {
var util = require('../util');
var methods = {
exportForum: {
resource: 'exports',
name: 'exportForum',
method: 'POST',
requiredOptions: ['api_secret', 'access_token', 'forum'],
availableOptions: ['format']
}
};
module.exports = function Exports(config, logger) {
/**
* ### exportForum
* Exports a forum.
*
* Signature:
* ```js
* Disqus#exports.exportForum(options[, cb])
* ```
*
* Usage:
* ```js
* // Node-style
* disqus.exports.exportForum({
* forum: '',
* // defaults shown
* format: 'xml'
* }, function (err, result) {...})
*
* // Promise-style
* disqus.exports.exportForum({
* forum: '',
* api_secret: 'asdfghkj', // can be set globally
* access_token: '12345678', // can be set globally
* // defaults shown
* format: 'xml'
* })
* .then(function (result) {...})
* .catch(function (err) {...})
* .error(function (err) {...});
* ```
*/
this.exportForum = function (options, cb) {
return util.executeAPIMethod(methods.exportForum, options, config, logger, cb);
};
};

@@ -32,3 +32,3 @@ /**

-L, --logLevel [string] Output log level. Choices: debug, info, notice, warning, error, critical, alert, emergency.
-S, --api_secret <string> Your applications's api_secret.
-S, --api_secret <string> Your application's api_secret.
* ```

@@ -35,0 +35,0 @@ */

@@ -14,5 +14,4 @@ /**

blacklists
.usage('<cmd> [options] [args]');
.usage('<cmd> [options]');
/**

@@ -38,3 +37,3 @@ * ### add

-r --retroactive [boolean] Defaults to false.
-S, --api_secret <string> Your applications's api_secret.
-S, --api_secret <string> Your application's api_secret.
-u --user [array] Looks up a user by ID. You may look up a user by username using the "username" query type. Defaults to [].

@@ -85,3 +84,3 @@ -w --word [array] Maximum length of 200. Defaults to [].

-s --since [number] Unix timestamp (or ISO datetime standard)
-S, --api_secret <string> Your applications's api_secret.
-S, --api_secret <string> Your application's api_secret.
* ```

@@ -125,3 +124,3 @@ */

-i --ip [array] IP address in CIDR notation. Defaults to [].
-S, --api_secret <string> Your applications's api_secret.
-S, --api_secret <string> Your application's api_secret.
-u --user [array] Looks up a user by ID. You may look up a user by username using the "username" query type. Defaults to [].

@@ -128,0 +127,0 @@ -w --word [array] Maximum length of 200. Defaults to [].

/**
* [Up one level](../index.html)
* [Up one level](/lib/index.html)
* ### Exports CLI
* See also [Exports API](../api/exports.html)
* See the disqus-node [Exports API](/lib/api/exports.html).
*
* See the [Exports API on Disqus.com](https://disqus.com/api/docs/exports/).
*/
var Disqus = require('../');
var commander = require('commander');
var exports = new commander.Command('disqus exports');
var Disqus = require('../');
var util = require('../util');
exports
.usage('<cmd> [options] [args]');
.usage('<cmd> [options]');
/**
* ### exportForum
* Exports a forum.
*
* Output of `disqus exports exportForum --help`:
* ```
Usage: disqus exports exportForum [options]
Options:
-h, --help output usage information
-A, --access_token <string> Your access token.
-f --forum <string> Looks up a forum by ID (aka short name).
-F --format [string] Defaults to "xml". Choices: xml.
-H --https [boolean] Whether to use https. Defaults to true.
-L, --logLevel [string] Output log level. Choices: debug, info, notice, warning, error, critical, alert, emergency.
-S, --api_secret <string> Your application's api_secret.
* ```
*/
exports
.command('exportForum <forumId>')
.description('Adds an entry to the blacklist.')
.option('-d --domain [array]', 'Domain Name. Defaults to [].', [])
.option('-e --email [array]', 'Email address (defined by RFC 5322). Defaults to [].', [])
.option('-h --https [boolean]', 'Whether to use https. Defaults to true.', true)
.option('-i --ip [array]', 'IP address in CIDR notation. Defaults to [].', [])
.option('-n --notes [string]', 'Maximum length of 50. Defaults to "".', [])
.option('-r --retroactive [boolean]', 'Defaults to false.', false)
.option('-u --user [array]', 'Looks up a user by ID. You may look up a user by username using the "username" query type. Defaults to [].', [])
.option('-w --word [array]', 'Maximum length of 200. Defaults to [].', [])
.action(function (forumId, options) {
console.log('disqus exports exportForum', forumId, options);
var disqus = new Disqus({
https: !!options.https
});
options.forumId = forumId;
disqus.exports.exportForum(options);
.command('exportForum')
.description('Exports a forum.')
.option('-A, --access_token <string>', 'Your access token.')
.option('-f --forum <string>', 'Looks up a forum by ID (aka short name).')
.option('-F --format [string]', 'Defaults to "xml". Choices: xml.', 'xml')
.option('-H --https [boolean]', 'Whether to use https. Defaults to true.', true)
.option('-L, --logLevel [string]', 'Output log level. Choices: debug, info, notice, warning, error, critical, alert, emergency.', 'info')
.option('-S, --api_secret <string>', 'Your applications\'s api_secret.')
.action(function (options) {
new Disqus(options).exports.exportForum(options, util.printCliResult);
});
module.exports = exports;

@@ -25,3 +25,3 @@ /**

-h, --help output usage information
-A, --api_key <string> Your applications's public api_key.
-A, --api_key <string> Your application's public api_key.
-f, --forum <string> Looks up a forum by ID (aka short name).

@@ -73,3 +73,3 @@ -g, --group <string> Looks up a group by ID.

-h, --help output usage information
-A, --api_key <string> Your applications's public api_key.
-A, --api_key <string> Your application's public api_key.
-c, --cursor [string] Defaults to null.

@@ -76,0 +76,0 @@ -f, --forum <string> Looks up a forum by ID (aka short name).

@@ -21,2 +21,16 @@ var commander = require('commander');

.description('Execute command for the Blacklists resource.');
/**
* ###### Categories
* [API](/lib/api/categories.html) | [CLI](/lib/cli/categories.html) | [Disqus](https://disqus.com/api/docs/categories/)
*/
disqus
.command('categories <cmd> [options]')
.description('Execute command for the Categories resource.');
/**
* ###### Exports
* [API](/lib/api/exports.html) | [CLI](/lib/cli/exports.html) | [Disqus](https://disqus.com/api/docs/exports/)
*/
disqus
.command('exports <cmd> [options]')
.description('Execute command for the Exports resource.');

@@ -29,2 +43,4 @@ exports.parse = function (primaryArgs, secondaryArgs) {

case 'blacklists':
case 'categories':
case 'exports':
if (!secondaryArgs.length) {

@@ -31,0 +47,0 @@ primaryArgs.push('--help');

@@ -25,3 +25,3 @@ /**

-h, --help output usage information
-A, --api_key <string> Your applications's public api_key.
-A, --api_key <string> Your application's public api_key.
-H, --https [boolean] Whether to use https. Defaults to true.

@@ -72,3 +72,3 @@ -L, --logLevel [string] Output log level. Choices: debug, info, notice, warning, error, critical, alert, emergency.

-h, --help output usage information
-A, --api_key <string> Your applications's public api_key.
-A, --api_key <string> Your application's public api_key.
-c, --cursor [string] Defaults to null.

@@ -129,6 +129,6 @@ -H, --https [boolean] Whether to use https. Defaults to true.

-h, --help output usage information
-A, --api_key <string> Your applications's public api_key.
-A, --api_key <string> Your application's public api_key.
-H, --https [boolean] Whether to use https. Defaults to true.
-L, --logLevel [string] Output log level. Choices: debug, info, notice, warning, error, critical, alert, emergency.
-S, --api_secret <string> Your applications's api_secret.
-S, --api_secret <string> Your application's api_secret.
-t, --target <string> Looks up a topic by ID (slug).

@@ -135,0 +135,0 @@ * ```

@@ -6,4 +6,6 @@ /**

var Log = require('log');
var Applications = require('./api/applications'); // todo
var Applications = require('./api/applications');
var Blacklists = require('./api/blacklists');
var Categories = require('./api/categories');
var Exports = require('./api/exports');

@@ -97,2 +99,12 @@ /**

this.blacklists = new Blacklists(this.config, this.logger);
/**
* ###### Categories
* [API](/lib/api/categories.html) | [CLI](/lib/cli/categories.html) | [Disqus](https://disqus.com/api/docs/categories/)
*/
this.categories = new Categories(this.config, this.logger);
/**
* ###### Exports
* [API](/lib/api/exports.html) | [CLI](/lib/cli/exports.html) | [Disqus](https://disqus.com/api/docs/exports/)
*/
this.exports = new Exports(this.config, this.logger);

@@ -99,0 +111,0 @@ this.logger.debug('Instantiated Disqus', JSON.stringify(this.config));

{
"name": "disqus-node",
"version": "0.5.0",
"version": "0.7.0",
"description": "Disqus API bindings and CLI for NodeJS http://disqus.com/api/",

@@ -17,3 +17,4 @@ "main": "lib/index.js",

"keywords": [
"disqus"
"disqus",
"cli"
],

@@ -20,0 +21,0 @@ "readmeFilename": "README.md",

@@ -14,6 +14,6 @@ disqus-node

- Blacklists
- Categories
- Exports
## Not Yet Implemented
- Category
- Exports
- Forums

@@ -20,0 +20,0 @@ - Imports

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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