1 # = Friendship API Examples
3 # gem('twitter4r', '0.2.0')
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')
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)
16 # To add a friend to the authenticated user's list of friends using the
17 # client context object you can do:
18 # twitter.friend(:add, 'otherlogin')
19 # You may also pass in the unique integer user ID or the Twitter::User object
20 # representation of the user you wish to 'friend'. For example:
21 # user = twitter.user('otherlogin')
22 # twitter.friend(:add, user)
24 # twitter.friend(:add, user.id)
26 # To remove a friend from the authenticated user's list of friends using the
27 # client context object you can do:
28 # twitter.friend(:remove, 'otherlogin')
29 # As with the case of adding a new friend, you can use the unique integer user
30 # ID or the Twitter::User object representation of the user you wish to remove
31 # as a friend. See above "add" examples and replace ":add" with ":remove" for