Twitter API + rest_client == Awesome

I was catching up on my tweets last night, when I saw this tweet and thought to myself, “Hey, that should be easy to do with rest_client


So I dove into the Twitter API docs and found the pages on creating friendships and reading list members.

I then looked at rest_client’s documentation to see how best to manage the basic auth login, etc and decided to use RestClient::Resource, since it stores some of the config data for you., even though it makes things more complicatted due to needing two separate resources — one for api.twitter.com and one for twitter.com.

It took me ten minutes or so to put it together and test to make sure I didn’t make any stupid mistakes. Cool?

Comments are closed.