Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rjz/twitter-intent
Utilities for building twitter intents
https://github.com/rjz/twitter-intent
intents javascript twitter twitter-intents
Last synced: 16 days ago
JSON representation
Utilities for building twitter intents
- Host: GitHub
- URL: https://github.com/rjz/twitter-intent
- Owner: rjz
- License: other
- Created: 2015-06-21T03:08:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-06T19:32:40.000Z (about 4 years ago)
- Last Synced: 2024-10-16T23:49:25.709Z (21 days ago)
- Topics: intents, javascript, twitter, twitter-intents
- Language: JavaScript
- Size: 9.77 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Twitter Intent
===============================================================================[![Build Status](https://travis-ci.org/rjz/twitter-intent.svg?branch=master)](https://travis-ci.org/rjz/twitter-intent)
[![Coverage Status](https://coveralls.io/repos/github/rjz/twitter-intent/badge.svg?branch=master)](https://coveralls.io/github/rjz/twitter-intent?branch=master)A utility for building [twitter intents](https://dev.twitter.com/web/intents)
Example
-------------------------------------------------------------------------------ES5
```js
var twitterIntent = require('twitter-intent');
var href = twitterIntent.tweet.url({
text: 'Tweet me!',
hashtags: ['node.js', 'npm']
});console.log('Click me!');
```ES6
```js
import twitterIntent from 'twitter-intent';const href = twitterIntent.tweet.url({
text: 'Tweet me!',
hashtags: ['node.js', 'npm']
});console.log('Click me!');
```Installation
-------------------------------------------------------------------------------Clone this repository:
$ npm install twitter-intent
Testing
-------------------------------------------------------------------------------Lint and run test suite:
$ npm test
License
-------------------------------------------------------------------------------MIT
[coveralls]: https://coveralls.io
[gh-pages]: https://pages.github.com
[hoganjs]: http://twitter.github.io/hogan.js
[istanbul]: https://github.com/gotwarlost/istanbul
[jshint]: http://www.jshint.com
[mocha]: https://github.com/visionmedia/mocha
[scrawl]: https://github.com/caolan/scrawl
[travis]: https://travis-ci.org
[nodesecurity]: https://nodesecurity.io/