13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/butterfly/provider/twitter.rb', line 13
def likes
@likes ||= raw.collect do |raw_like|
Butterfly::Like.new({
:service => "twitter",
:id => raw_like["id"],
:title => raw_like["text"],
:description => raw_like["text"],
:created_at => Time.parse(raw_like["created_at"]),
:liked_at => nil,
:tags => [],
:photo_url => nil,
:url => "http://twitter.com/#{raw_like["user"]["screen_name"]}/status/#{raw_like["id"]}",
:type => "text",
:user => Butterfly::User.new({
:id => raw_like["user"]["id"],
:username => raw_like["user"]["screen_name"],
:name => raw_like["user"]["name"],
:service_url => "http://twitter.com/#{raw_like["user"]["screen_name"]}",
:photo_url => raw_like["user"]["profile_image_url"],
:website_url => raw_like["user"]["url"],
:location => raw_like["user"]["location"],
})
})
end
end
|