Ruby can be used with a variety of networking protocols to download web pages and send email. These pages will address how to use HTTP, SMTP and raw sockets to implement your own networking protocols.
Twitter provides programmers with an excellent API, which is why so many Twitter interfaces exist for tweeting, following updates, following friends and thread-sorting. Writing Twitter clients in Ruby is a breeze!
In the previous series,
5 Tips for Using Twitter with Ruby, we concentrated on the technical aspects of connecting to Twitter, making API calls and parsing the data returned. In this series, all of that will be handled by the excellent
Twitter Gem by John Nunemaker.
The Twitter API (Application Programming Interface) in Ruby on Rails is about as simple as you can get. Twitter is a RESTful Rails application.
Twitter API and you issue the command to query a timeline, you'll need to know how to parse it. It can be done easily enough using Hpricot.
Now that you have a handle on the Twitter API and parsing the data returned by Twitter, it's time to start tweeting!
Learn how to follow Twitter updates using Twitter's openly-provided Ruby API.
Using the Twitter RubyGem, making API requests to Twitter is even easier than using the
twitter method.
Since the Twitter API makes it easy to do anything you can do on the website, writing a script to automatically follow followers is very simple.
This Ruby script to update Twitter from an RSS feed is what's often referred to as a "mashup." Mashups interface one protocol to another, or one website to another. This mashup takes information from an RSS feed and posts it as updates to Twitter.
It's a pain to switch to a Web browser every you want to check your Twitter updates. This script solves that by sending you an instant message (IM) using the Jabber protocol when there's something new to see on Twitter.
How to send email with SMTP in Ruby.
How to check your POP3 email accounts in Ruby.
Documentation for the net/http module used for communicating with web servers.
Socket programming examples on PLEAC, the Programming Language Examples Alive cookbook.
Documentation for the net/smtp class needed to send email from Ruby.
Control the pcap network traffic monitor program with Ruby.
Access any network protocol easily with open-uri.