Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

neilgoodman/connect-user-tweets

Repository files navigation

connect-user-tweets

Middleware for connect that registers an endpoint to look up Tweets posted by a given user. Tweets will be cached on the connect server to help prevent going over Twitter's rate limit.

Install

$ npm install connect-user-tweets

Usage

var connect = require('connect'),
    connectUserTweets = require('connect-user-tweets');

var app = connect();

app
    .use(connectUserTweets({
        screen_name: 'posco2k8',
        count: 2, // Default. Number of tweets to return.
        cache_timeout: 5 * 60000, // Default five minutes
        consumer_key: '...', 
        consumer_secret: '...',
        access_token: '...',
        access_token_secret: '...'
    }))
    .listen(3000);

You can now access the API by sending a GET request to: http://localhost:3000/tweets.

About

Middleware for connect that fetches Tweets.

Resources

License

Stars

Watchers

Forks

Packages

No packages published