Company
Date Published
Author
Phil Nash
Word count
1370
Language
English
Hacker News points
None

Summary

### Receive Twitter Notifications by SMS with EventMachine and the Twitter Streaming API (Send and Receive Tweets Using SMS with Twilio Part 3)` This project uses the Twitter streaming API to listen for events such as direct messages and mentions, and sends an SMS notification when these events occur. The application is built using Ruby and utilizes the TweetStream gem, which leverages EventMachine to process incoming events from the Twitter streaming API without blocking the Ruby thread. By running the application with Thin, a web server that also uses EventMachine, the app can simultaneously listen for webhooks at its /messages endpoint and collect and respond to events from the streaming API. The code is organized into several key components, including configuration setup, event handling for direct messages and mentions, and sending SMS notifications using Twilio.