My First app in Ruby

My first app written in Ruby, done as a part of a homework assignment for CS473 class at CSUF (Web Development) has to deal with Twitter’s public timeline.

Simply, it outputs the usernames and statuses that appear on Twitter’s public timeline (http://twitter.com/public_timeline).

The app requires Ruby along with the following gems installed:
gem install faraday_middleware
gem install twitter

[ruby]
#!/user/bin/env ruby

require "rubygems"
require "twitter"

statuses = Twitter.public_timeline
statuses.each do |status|
puts ‘User: ‘ + status.user.screen_name , ‘Status: ‘ + status.text
end
[/ruby]

Simple, but it does the job !

Here is a screenshot of the output of the program (ruby twitter.rb):

public timeline – Twitter

Liked it? Take a second to support Maks Surguy on Patreon!
Become a patron at Patreon!

You may also like

Leave a comment