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

chirp-rest

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chirp-rest

twitter rest apis in nodejs

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chirp-rest Build Status

twitter rest apis in nodejs

NPM version Dependency Status

Coverage Status Code Climate

Installation

npm i chirp-rest --save

Usage

var ChirpRest = require('./');

var twitter = new ChirpRest({
    consumer: {
        public: 'xxxxx',
        secret: 'xxxxx'
    },
    token: {
        public: 'xxxxx'
        secret: 'xxxxx'
    }
});

//get user timeline
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, body) {
    //body -> tweets
});

Example

  • get user timeline
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, body) {
    //body -> tweets
});
  • get user timeline limit 5
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', {
    count: 5
}, function(err, body) {
    //body -> tweets
});
  • get user timeline
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, body) {
    //body -> tweets
});
  • post new status
twitter.post('https://api.twitter.com/1.1/statuses/update.json', {
    status: 'chirp chirp'
}, function(err, body) {
    //body -> tweet data
});

https://dev.twitter.com/docs/api/1.1

API

  • .get(url, parameters, callback)
  • .post(url, parameters, callback)

Option

  • url:String Twitter api endpoint
  • parameters: Object Twitter api parameters optional
  • callback

Keywords

FAQs

Package last updated on 23 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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