1 # extra.rb contains features that are not considered part of the core library.
2 # This file is not imported by doing <tt>require('twitter')</tt>, so you will
3 # need to import this file separately like:
5 # require('twitter/extras')
11 :users => 'http://twitter.com/statuses/featured.json'
14 # Provides access to the Featured Twitter API.
16 # Currently the only value for <tt>type</tt> accepted is <tt>:users</tt>,
17 # which will return an Array of blessed Twitter::User objects that
18 # represent Twitter's featured users.
20 uri = @@FEATURED_URIS[type]
21 response = http_connect {|conn| create_http_get_request(uri) }
22 bless_models(Twitter::User.unmarshal(response.body))
28 # Provides access to the Featured Twitter API via the Twitter4R Model
31 # The following lines of code are equivalent to each other:
32 # users1 = Twitter::User.features(client)
33 # users2 = client.featured(:users)
34 # where <tt>users1</tt> and <tt>users2</tt> would be logically equivalent.
36 client.featured(:users)