Class: SocialCurrent::TwitterService
- Inherits:
-
Service
- Object
- Service
- SocialCurrent::TwitterService
show all
- Includes:
- HTTParty, Twitter::Autolink
- Defined in:
- lib/social_current/twitter_service.rb
Instance Method Summary
collapse
Methods inherited from Service
#fetch, #initialize
Instance Method Details
#raw_stream ⇒ Object
12
13
14
|
# File 'lib/social_current/twitter_service.rb', line 12
def raw_stream
fetch("/statuses/user_timeline.json?&screen_name=#{@user}", "#{@user}_twitter_raw_stream.json")
end
|
#raw_user ⇒ Object
8
9
10
|
# File 'lib/social_current/twitter_service.rb', line 8
def raw_user
fetch("/users/show.json?screen_name=#{@user}", "#{@user}_twitter_raw_user.json")
end
|
#stream ⇒ Object
16
17
18
19
20
|
# File 'lib/social_current/twitter_service.rb', line 16
def stream
raw_stream.collect do |s|
{ :message => format_message(s), :created_at => Time.parse(s["created_at"]).utc, :service => "twitter" }
end
end
|