mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
17 lines
No EOL
412 B
Ruby
17 lines
No EOL
412 B
Ruby
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
require File.join(dir, 'web')
|
|
require 'pp'
|
|
config = YAML::load(File.read(File.join(ENV['HOME'], '.twitter')))
|
|
|
|
class Twitter
|
|
include Web
|
|
|
|
base_uri 'twitter.com'
|
|
format :xml
|
|
|
|
entity :status
|
|
entity :user
|
|
end
|
|
|
|
Twitter.basic_auth config['email'], config['password']
|
|
pp Twitter.get('/statuses/user_timeline.xml', :entity => :status) |