Added v 0.3.1 snapshot.
[twitter4r-core.git] / examples / configure.rb
blob6a9417383cfefa93e2c3ef2a98c20554422a3504
1 # = Configuration API Examples
2 #  require('rubygems')
3 #  gem('twitter4r', '0.2.0')
4 #  require('twitter')
5
6 # Here we setup configuration for all Twitter::Client instances
7 # This looks much like Rails' Initializer code that can be found 
8 # in config/environment in Rails applications by design.
9 #  Twitter::Client.configure do |conf|
10 #    # We can set Twitter4R to use <tt>:ssl</tt> or <tt>:http</tt> to connect to the Twitter API.
11 #    # Defaults to <tt>:ssl</tt>
12 #    conf.protocol = :ssl
14 #    # We can set Twitter4R to use another host name (perhaps for internal
15 #    # testing purposes).
16 #    # Defaults to 'twitter.com'
17 #    conf.host = 'twitter.com'
19 #    # We can set Twitter4R to use another port (also for internal 
20 #    # testing purposes).
21 #    # Defaults to 443
22 #    conf.port = 443
23 #    
24 #    # We can set proxy information for Twitter4R
25 #    # By default all following values are set to <tt>nil</tt>.
26 #    conf.proxy_host = 'myproxy.host'
27 #    conf.proxy_port = 8080
28 #    conf.proxy_user = 'myuser'
29 #    conf.proxy_pass = 'mypass'
31 #    # We can also change the User-Agent and X-Twitter-Client* HTTP headers
32 #    conf.user_agent = 'MyAppAgentName'
33 #    conf.application_name = 'MyAppName'
34 #    conf.application_version = 'v1.5.6'
35 #    conf.application_url = 'http://myapp.url'
36
37 #    # Twitter (not Twitter4R) will have to setup a source ID for your application to get it 
38 #    # recognized by the web interface according to your preferences.
39 #    # To see more information how to go about doing this, please referen to the following thread:
40 #    # http://groups.google.com/group/twitter4r-users/browse_thread/thread/c655457fdb127032
41 #    conf.source = "your-source-id-that-twitter-recognizes"
42 #  
43 #  end