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-base-0.14.1 app/views/api/activity_atom_feed.atom.builder
vkhater-social_stream-0.16.3.3 base/app/views/api/activity_atom_feed.atom.builder
vkhater-social_stream-base-0.11.2 app/views/api/activity_atom_feed.atom.builder
social_stream-0.19.0 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.14.0 app/views/api/activity_atom_feed.atom.builder
social_stream-0.18.2 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.13.2 app/views/api/activity_atom_feed.atom.builder
social_stream-0.18.1 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.13.1 app/views/api/activity_atom_feed.atom.builder
social_stream-0.18.0 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.13.0 app/views/api/activity_atom_feed.atom.builder
social_stream-0.17.1 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.12.1 app/views/api/activity_atom_feed.atom.builder
social_stream-0.17.0 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.12.0 app/views/api/activity_atom_feed.atom.builder
social_stream-0.16.3 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.11.2 app/views/api/activity_atom_feed.atom.builder
social_stream-0.16.2 base/app/views/api/activity_atom_feed.atom.builder
social_stream-base-0.11.1 app/views/api/activity_atom_feed.atom.builder
social_stream-0.16.1 base/app/views/api/activity_atom_feed.atom.builder