Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjgonecrypto/node-keyboard-twitter
Twitter sentiment plugin to node-keyboard
https://github.com/jjgonecrypto/node-keyboard-twitter
composition music node-keyboard twitter twitter-api twitter-sentiment-plugin
Last synced: 14 days ago
JSON representation
Twitter sentiment plugin to node-keyboard
- Host: GitHub
- URL: https://github.com/jjgonecrypto/node-keyboard-twitter
- Owner: jjgonecrypto
- License: mit
- Created: 2016-11-27T20:52:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-20T21:40:00.000Z (over 7 years ago)
- Last Synced: 2024-04-13T21:52:51.747Z (7 months ago)
- Topics: composition, music, node-keyboard, twitter, twitter-api, twitter-sentiment-plugin
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-keyboard-twitter
[![npm version](https://badge.fury.io/js/node-keyboard-twitter.svg)](https://badge.fury.io/js/node-keyboard-twitter)
Twitter sentiment tracking plugin for [node-keyboard](https://github.com/justinjmoses/node-keyboard).
![](https://media.giphy.com/media/26ufoD2nuzU15OkY8/giphy.gif)
## Installation
### As Global
If you installed node-keyboard globally, then install this plugin via `npm i -g node-keyboard-twitter`Then start node keyboard via `node-keyboard`, and import this plugin via `const twitter = requireg('node-keyboard-twitter')`
### As Local
If instead you cloned node-keyboard, then install locally in that folder via `npm i node-keyboard-twitter`Then start node keyboard via `node keyboard` and import this plugin via `const twitter = require('node-keyboard-twitter')`
## Usage
1. Ensure your environment variables for Twitter API usage are set. See https://github.com/justinjmoses/twitter-sentiment#installation2. Try out the twitter sentiment tracker by adding the `track` field (see [Twitter API for input options](https://dev.twitter.com/streaming/overview/request-parameters#track)) and the `minFollowers` that the account needs to have to be used.
```javascript
twitter.search({ track: 'bieber', minFollowers: 100 }).do(twitter.log.sentiment).map(twitter.map.toMusic).subscribe(play)
```For a longer recording, checkout https://vid.me/MYR5
## Known issues
`Status Code: 420` - means you've been rate limited by Twitter. [Enhance your calm](https://dev.twitter.com/streaming/overview/connecting#rate-limiting).## In action
I spoke on node-keyboard at EmpireNode in November 2016.Here's the excerpt for `node-keyboard-twitter`:
[![image](https://cloud.githubusercontent.com/assets/799038/20642880/e21b0b90-b3e8-11e6-8053-9271e7bff99c.png)](https://youtu.be/Wa5-DePTWdA?t=1289)