Sha256: affdb38d2df4f785d45b74e6f642f4e70b3f39dd9060c7aade00c8675dbbdf62

Contents?: true

Size: 1.33 KB

Versions: 200

Compression:

Stored size: 1.33 KB

Contents

atom_feed({'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/'}) do |feed|
  feed.title(@subject.name + ' public stream') 
  feed.updated(@activities.first.updated_at)
  feed.author do
    feed.name(@subject.name)
  end
    
  for activity in @activities
    feed.entry(activity) do |entry|
      if activity.class.name != "Tie" and activity.activity_verb.name == "post"
      #Atom compliant for not ActivityStream readers
      entry.title('Activity')
      entry.summary(activity.direct_object.text)
            
      #ActivityStream compliant
            
      entry.author do |a|
        a.name(activity.sender_subject.name)
        a.tag!('activity:object-type','person')
      end
            
      entry.tag!('activity:verb',activity.activity_verb.name)
            
      entry.tag!('activity:object') do |act_ob|
        act_ob.title('Activity')
        act_ob.tag!('activity:object-type','status')
        act_ob.publised(activity.created_at)
      end
            
      entry.content(activity.direct_object.text,:type=>'text/html')
      end
    end
  end
    
  feed.link :rel => 'self',     :href=>request.url
  feed.link :rel => 'next',     :href=>api_my_home_url+'?page='+(params[:page].to_i+1).to_s  
  if params[:page].to_i != 1
    feed.link :rel => 'previous', :href=>api_my_home_url+'?page='+(params[:page].to_i-1).to_s
  end 
end

Version data entries

200 entries across 200 versions & 4 rubygems

Version Path
social_stream-0.28.4 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.22.4 app/views/api/activity_atom_feed.atom.builder
social_stream-0.28.1 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.22.1 app/views/api/activity_atom_feed.atom.builder
social_stream-0.28.0 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.22.0 app/views/api/activity_atom_feed.atom.builder
social_stream-0.27.3 base/app/views/api/activity_atom_feed.atom.builder
social_stream-0.27.2 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.21.2 app/views/api/activity_atom_feed.atom.builder
social_stream-0.27.1 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.21.1 app/views/api/activity_atom_feed.atom.builder
social_stream-0.27.0 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.21.0 app/views/api/activity_atom_feed.atom.builder
social_stream-0.26.2 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.20.2 app/views/api/activity_atom_feed.atom.builder
social_stream-0.26.1 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.20.1 app/views/api/activity_atom_feed.atom.builder
social_stream-0.26.0 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.20.0 app/views/api/activity_atom_feed.atom.builder
social_stream-0.25.2 base/app/views/api/activity_atom_feed.atom.builder