0.0
No commit activity in last 3 years
No release in over 3 years
Create messages, assign a time, then DM all Followers of a Twitter account with those messages as the assigned time.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.2.8

Runtime

>= 0.1.9
 Project Readme

twitter_alert¶ ↑

The problem that twitter_alert attempts to solve is the programmatic sending of DMs to all the followers of a given Twitter account. It is a simple gem that provides one Class and one Module. The class is TwitterAlert::Account and represents the Twitter account you want to make announcements from. The Module is TwitterAlert::Alert and should be mixed in to a class that you want to represent the messages themselves.

DISCLAIMER: Please, please, please don’t use this gem to spam people. If you do, I hope you get unfollowed or blocked. Seriously. Get permission. Make sure your followers know that by following your account they’re signing up to get DMs from a machine.

Installing¶ ↑

To install, simple:

sudo gem install twitter_alert

Note: This gem depends on Grackle for Twitter access.

Getting Started¶ ↑

The most basic case is pretty simple and would look something like this:

require 'twitter_alert'

account = TwitterAlert::Account.new :user_name => 'benhamill', :password => 'thisisnotmyrealpassword'

class Alert
  include TiwtterAlert::Alert
end

alert = Alert.new 'Very important message.', DateTime.now

account.announce alert

In a real program, I’d expect that your Alert class would actually be somewhat more complicated and probably inherit from ActiveRecord or something. The way I intend to use this is to set up a cron job to pull messages out of the DB that are marked for a given day and send them.

Note on Patches/Pull Requests¶ ↑

This is the standard Jeweler procedure.

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 Ben Hamill. See LICENSE for details.