1. Richo Healey
  2. twat

Commits

Richo Healey  committed 70d3902 Merge with conflicts

Merge branch 'user_newsfeed'

Conflicts:
lib/twat/actions.rb
lib/twat/argparse.rb

  • Participants
  • Parent commits d74dc52, 0534351
  • Branches master

Comments (0)

Files changed (2)

File lib/twat/actions.rb

View file
       end
     end
 
+    def user_feed
+      twitter_auth
+      # Fix :default case
+      puts Twitter.user_timeline(opts[:account]).first.text
+    end
+
     def version
       puts "twat: #{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
     end

File lib/twat/argparse.rb

View file
         end #}}}
         opts.on('-v', '--version', 'Display version info') do #{{{ --version
           options[:action] = :version
+        end
+        opts.on('-u', '--user [USER]', 'Display current status for USER (Defaults to your default account)') do |user| #{{{ --user USER
+          options[:account] = (user || 'default').to_sym
+          action[:user_feed]
         end #}}}
       end