Skip to content

To monitor Twitter activity and interact with the Spark.io API. The original intended use was to light up my desk when a new follower follows my twitter or to light up the desk when I lose a follower or specific hashtags are mentioned in tweets.

Notifications You must be signed in to change notification settings

mikkeluk/Twitter-Spark-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Readme

This script has been made and intended to be used with a Sparkcore to call the Spark.io API based on Twitter events. This script powers the LED lighting under a glass desk to notify the user when a Twitter event has occured. Eventually the script will be extended to include Zendesk notifications and Gmail Notifications

Requirements

In this repo you will find everything you would need to make it work.

This script uses tweepy for communicating with Twitter. This is the only dependancy aside from Python obviously.

  pip install tweepy

Installation

git clone https://github.com/mikkeluk/Twitter-Spark-io

Specify your Twitter consumer key and consumer secret

consumer_key = "xxxxx"
consumer_secret = "xxxxx"

Specify a valid access token and token secret

access_token= "xxxxx"
access_token_secret = "xxxxx"

MySQL currently used - Specify database settings

db_host_name = "127.0.0.1"
db_host_port = 3306
db_user = "xxx"
db_password = ""
db_db = "xxxxx"

Create table in database

CREATE TABLE `twitter` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `twittercount` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

Notes

Plan on adding Zendesk support and Gmail support, hence the database may seem a little overkill currently.

About

To monitor Twitter activity and interact with the Spark.io API. The original intended use was to light up my desk when a new follower follows my twitter or to light up the desk when I lose a follower or specific hashtags are mentioned in tweets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages