Added v 0.2.2 snapshot.
[twitter4r-core.git] / examples / user.rb
bloba92cd756a3b9948ebdbccb58bb61ddff10b50d5f
1 # = User API Examples
2 #  require('rubygems')
3 #  gem('twitter4r', '0.2.0')
4 #  require('twitter')
5
6 # The following is only required if you want to use some configuration 
7 # helper methods like <tt>Twitte4R::Client.from_config</tt> for 
8 # sensitive/instance context.
9 #  require 'twitter/console'
10 #  config_file = File.join(File.dirname(__FILE__), '..', 'config', 'twitter.yml')
11 #  
12 # To override client connection configuration please refer to 
13 # the {<tt>configure.rb</tt>}[file:configure_rb.html] example code.
14 #  twitter = Twitter::Client.from_config(config_file)
15
16 # To get the Twitter::User object representation of a Twitter user we can do:
17 #  user = twitter.user('otherlogin')
18
19 # To get a list of friends of a specific user on Twitter we can do:
20 #  friends = twitter.user('otherlogin', :friends)
21 # See the {Model API}[link:files/examples/model_rb.html] for related methods.
22
23 # To get the authenticated user's Twitter::User object representation we can 
24 # do:
25 #  me = twitter.my(:info)
26
27 # To get the authenticated user's followers (only available for authenticated 
28 # user):
29 #  followers = twitter.my(:followers)
30 # OR 
31 #  myuser = twitter.my(:info)
32 #  followers = myuser.followers
33 # See the {Model API}[link:files/examples/model_rb.html] for more information 
34 # on this.