# twitter-text-webservice

> REST API to twitter-text module

Latest version **1.1.2** (published 2016-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install twitter-text-webservice
pnpm add twitter-text-webservice
yarn add twitter-text-webservice
bun add twitter-text-webservice
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2016-09-23 |
| First published | 2015-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+6 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dmitry Bashkatov |
| Maintainers | nailgun |
| Keywords | twitter, text, rest, api, web, service |

## Links

- npm: https://www.npmjs.com/package/twitter-text-webservice
- Repository: https://github.com/nailgun/twitter-text-webservice
- Issues: https://github.com/nailgun/twitter-text-webservice/issues
- npm.io page: https://npm.io/package/twitter-text-webservice

## Dependencies (5)

- [connect](https://npm.io/package/connect.md) ~3.3.5
- [express](https://npm.io/package/express.md) ~4.12.4
- [request](https://npm.io/package/request.md) ~2.57.0
- [body-parser](https://npm.io/package/body-parser.md) ~1.12.4
- [twitter-text](https://npm.io/package/twitter-text.md) ~1.13.3

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2016-09-23
- 1.1.1 — 2016-02-12
- 1.1.0 — 2015-06-05
- 1.0.0 — 2015-06-05

## README

# twitter-text-webservice

REST API to the [twitter-text module](https://github.com/twitter/twitter-text/tree/master/js).
Based on [Express](http://expressjs.com/).

## Installation

```
$ npm install twitter-text-webservice
$ export API_KEY='YOUR_TWITTER_API_KEY`        # optional
$ export API_SECRET='YOUR_TWITTER_API_SECRET`  # optional
$ export BIND_PORT=3000                        # optional
$ npm start twitter-text-webservice
```

## Usage

```json
{
  "service": "Twitter text API",
  "endpoints": {
    "/configuration": {
      "method": "GET",
      "info": "Get twitter configuration (same as https://api.twitter.com/1.1/help/configuration.json)"
    },
    "/tweet/length": {
      "method": "POST",
      "info": "Get tweet length (twitter.getTweetLength)",
      "params": {
        "text": "(string) Tweet text"
      }
    },
    "/tweet/truncate": {
      "method": "POST",
      "info": "Truncate tweet to maximum length",
      "params": {
        "text": "(string) Tweet text",
        "ellipsis": "(ellipsis) Append this string when text truncated",
        "media": "(boolean) Reserve characters for media",
        "reserve": "(integer) Number of extra characters to reserve"
      }
    }
  }
}
```

## Contributing

I've implemented functionality requied only for one project. But you can extend it easily. PRs are welcome.

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