GithubHelp home page GithubHelp logo

twi's Introduction

twi

Command line tool to for Twitter's REST API.

Dependency Status

Usage

Retrieve user

$ twi username fent
{ id: 75072321,
  id_str: '75072321',
  name: 'fent',
  screen_name: 'fent',
  ...
}

By id

$ twi userid 75072321
{ id: 75072321,
  id_str: '75072321',
  name: 'fent',
  screen_name: 'fent',
  ...
}

Optional template

$ twi username fent '{{id_str}}'
75072321

Multiple user lookups (with one request)

$ twi username fent,twitterapi '{{id_str}} - {{screen_name}}'
75072321 - fent
6253282 - twitterapi

Retrieve Tweet

$ twi tweet 387968357875843072
{ created_at: 'Wed Oct 09 15:50:39 +0000 2013',
  id: 387968357875843100,
  id_str: '387968357875843072',
  text: 'hmm I am not sure about this breakfast sandwich http://t.co/baw8koYz53',
  ...
}

To configure it with your Twitter oauth credentials, it looks at the following environment variables.

TWITTER_CONSUMER_KEY
TWITTER_CONSUMER_SECRET
TWITTER_TOKEN
TWITTER_TOKEN_SECRET

Motive

I work with the Twitter API. Sometimes looking up a Tweet's or user's metadata is useful. Twitter turned off the ability to simply go to a URL without oauth, so I thought this would be useful.

Install

npm -g install twi

twi's People

Contributors

dependabot-preview[bot] avatar fent avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

web5design

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.