twitter-text-webservice
REST API to twitter-text module
Last updated 3 years ago by nailgun .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install twitter-text-webservice 
SYNC missed versions from official npm registry.

twitter-text-webservice

REST API to the twitter-text module. Based on Express.

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

{
  "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.

Current Tags

  • 1.1.2                                ...           latest (3 years ago)

4 Versions

  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |