# connect-user-htmltweets

> Adapted from Neil Goodman's connect-user-tweets: middleware for connect that fetches Tweets.

Latest version **0.0.1** (published 2016-04-21) · 0 weekly downloads

## Install

```sh
npm install connect-user-htmltweets
pnpm add connect-user-htmltweets
yarn add connect-user-htmltweets
bun add connect-user-htmltweets
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-04-21 |
| First published | 2016-04-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kevin Joyner |
| Maintainers | kevinjoyner |
| Keywords | connect, tweets, twitter |

## Links

- npm: https://www.npmjs.com/package/connect-user-htmltweets
- Repository: https://github.com/kevinjoyner/connect-user-htmlTweets
- Issues: https://github.com/kevinjoyner/connect-user-htmlTweets/issues
- npm.io page: https://npm.io/package/connect-user-htmltweets

## Dependencies (4)

- [url](https://npm.io/package/url.md) ~0.11.0
- [twit](https://npm.io/package/twit.md) ~1.1.6
- [dateformat](https://npm.io/package/dateformat.md) ~1.0.6-1.2.3
- [underscore](https://npm.io/package/underscore.md) ~1.4.4

## Recent versions

- 0.0.1 (latest) — 2016-04-21

## README

# connect-user-htmlTweets

Middleware for [connect](https://github.com/senchalabs/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](https://dev.twitter.com/docs/rate-limiting/1.1).

Forked from connect-user-tweets.

When you fetch a tweet from statuses/user_timeline the tweet is delivered in plain text, with the URLs separately. I wanted to use the tweets on a website and have the links (often truncated) clickable. I also wanted to achieve this without needing to carry Twitter's JavaScript on my site.

Building on connect-user-tweets, connect-user-htmlTweets fetches the tweet IDs from statuses/user_timeline. It then fetches the HTML for each tweet from statuses/oembed. It strips out some HTML that I didn't want, and it sorts the tweets to make sure they're in recent-to-older date order.

## Install

`$ npm install connect-user-htmlTweets`

## Usage

```javascript
var connect = require('connect'),
    connectUserTweets = require('connect-user-htmlTweets');

var app = connect();

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

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

---
_Source: https://npm.io/package/connect-user-htmltweets · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
