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

node-twitter-api

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-twitter-api - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

package.json
{
"name": "node-twitter-api",
"version": "1.3.0",
"version": "1.4.0",
"description": "Simple module for using Twitter's API in node.js",

@@ -5,0 +5,0 @@ "keywords": ["twitter", "oauth", "rest", "streaming"],

@@ -1,2 +0,2 @@

var VERSION = "1.3.0",
var VERSION = "1.4.0",
querystring = require("querystring"),

@@ -532,2 +532,41 @@ oauth = require("oauth"),

// Mutes
Twitter.prototype.mutes = function(type, params, accessToken, accessTokenSecret, callback) {
var url = type.toLowerCase();
var method = "GET";
switch (url) {
case "users/create":
case "users/destroy":
method = "POST";
break;
}
if (method == "GET") {
this.oa.get(baseUrl + "mutes/" + url + ".json?" + querystring.stringify(params), accessToken, accessTokenSecret, function(error, data, response) {
if (error) {
callback(error, data, response, baseUrl + "mutes/" + url + ".json?" + querystring.stringify(params));
} else {
try {
callback(null, JSON.parse(data), response);
} catch (e) {
callback(e, data, response);
}
}
});
} else {
this.oa.post(baseUrl + "mutes/" + url + ".json", accessToken, accessTokenSecret, params, function(error, data, response) {
if (error) {
callback(error, data, response);
} else {
try {
callback(null, JSON.parse(data), response);
} catch (e) {
callback(e, data, response);
}
}
});
}
};
// Users

@@ -534,0 +573,0 @@ Twitter.prototype.users = function(type, params, accessToken, accessTokenSecret, callback) {

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