lib/titi/provider/twitter.rb in titi-0.0.5 vs lib/titi/provider/twitter.rb in titi-0.0.6
- old
+ new
@@ -29,26 +29,29 @@
# <uri>http://www.myspace.com/ciberch</uri>
# </author>
# </activity:object>
# </entry>
#
- def to_activity_stream_entry
- ActivityStreams::Entry.adapt(
- :id => %Q{tag:twitter.com,2007:http://twitter.com/#{user.screen_name}/statuses/#{id}},
- :title => text,
- :content => text,
- :published => created_at,
- :verb => :post
- ) do |entry|
- entry.has_author user.name, user.url
- entry.has_obj do |activity_obj|
- activity_obj.id = id
- activity_obj.title = text
- activity_obj.published = created_at
- activity_obj.updated = created_at
- activity_obj.author = entry.author
+ def to_activity_stream
+ ActivityStreams::Feed.adapt do |feed|
+ feed.has_entry(
+ :id => %Q{tag:twitter.com,2007:http://twitter.com/#{user.screen_name}/statuses/#{id}},
+ :title => text,
+ :content => text,
+ :published => created_at,
+ :verb => :post
+ ) do |entry|
+ entry.has_author user.name, user.url
+ entry.has_obj do |activity_obj|
+ activity_obj.id = id
+ activity_obj.title = text
+ activity_obj.published = created_at
+ activity_obj.updated = created_at
+ activity_obj.author = entry.author
+ end
end
end
end
+
end
end
end