Support for requesting contact handles (users) by name
[twitterpathy.git] / twitter.rb
blobcf48a3df405bef0eb8c402d03bd045f012fd27ef
1 #!/usr/bin/env ruby
3 require 'rubygems'
4 gem('twitter4r', '>=0.2.1')
5 require 'twitter'
7 client = Twitter::Client.new(:login => 'pathy_test', :password => 'pathpass')
9 # I want to post a new status to my timeline, which can also be do by:
10 #  client.status(:post, 'My new status message')
11 #status = Twitter::Status.create(:client => client, :text => 'My new status message')
13 #user = Twitter::User.find('dictionary', client)
14 #message = Twitter::Message.create(:client => client, :recipient => user, :text => 'canadaphile')
16 followers = client.my(:followers)
17 puts followers.inspect
18 friends = client.my(:friends)
19 puts friends.inspect