module Titi::Provider module Twitter autoload :User, 'titi/provider/twitter/models' autoload :Status, 'titi/provider/twitter/models' Status.class_eval do # @example # # ciberch: thanks to /Jerry @robdolin , @daveman692, @chrismessina, @apparentlymart and @jsmarr for a very produtive activitystrea.ms session # ciberch: thanks to /Jerry @robdolin , @daveman692, @chrismessina, @apparentlymart and @jsmarr for a very produtive activitystrea.ms session # tag:twitter.com,2007:http://twitter.com/ciberch/statuses/2396395271 # 2009-06-30T00:59:54+00:00 # 2009-06-30T00:59:54+00:00 # # # # Monica Keller # http://www.myspace.com/ciberch # # http://activitystrea.ms/schema/1.0/post # # tag:twitter.com,2007:http://twitter.com/ciberch/statuses/2396395271/object # thanks to /Jerry @robdolin , @daveman692, @chrismessina, @apparentlymart and @jsmarr for a very produtive activitystrea.ms session # # 2009-06-30T00:59:54+00:00 # 2009-06-30T00:59:54+00:00 # # Monica Keller # http://www.myspace.com/ciberch # # # # 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.author = ActivityStreams::Author.new(user.name, user.url) entry.object = ActivityStreams::ActivityObject.adapt 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