New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

twitter-rest-lite

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-rest-lite - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

14

lib/api.js

@@ -27,2 +27,3 @@ var API,

/**
* <a name='get'></a>
* Public: Abstract GET request to the API

@@ -60,2 +61,3 @@ * ---------------------------------------

/**
* <a name='post'></a>
* Public: abstract POST request to the API

@@ -65,16 +67,14 @@ * ----------------------------------------

* url - String
* params - [Optional] Object with params to be passed
* data - [Required] Object with data
* callback - Callback Function
**/
API.prototype.post = function(url, params, data, callback) {
API.prototype.post = function(url, data, callback) {
var self = this,
request = require('request');
request = require('request'),
body = null;
url = self.uri.base + url;
if ((params != null) && (typeof params === 'object')) {
var qs = require('querystring');
url += '?' + qs.stringify(params);
}
if (data != null)
body = JSON.stringify(data);

@@ -81,0 +81,0 @@ request({

{
"name": "twitter-rest-lite",
"version": "0.1.3",
"version": "0.2.0",
"description": "Twitter's REST API Lite",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -51,2 +51,6 @@ twitter-rest-lite

ttapi.get('/statuses/mentions_timeline.json', params, function(err, response) {
...
});
```

@@ -53,0 +57,0 @@

@@ -18,3 +18,3 @@ var Twitter = require('../index'),

api.get('/statuses/user_timeline.json', {screen_name: 'ghostbar'}, function(err, response) {
api.get('/statuses/user_timeline.json', {screen_name: 'ghostbar', count: 1}, function(err, response) {
should.not.exist(err);

@@ -21,0 +21,0 @@

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