You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
713 B
25 lines
713 B
9 years ago
|
Nokogiri::XML::Builder.new do |xml|
|
||
9 years ago
|
feed(xml) do
|
||
9 years ago
|
simple_id xml, account_url(@account, format: 'atom')
|
||
9 years ago
|
title xml, @account.display_name
|
||
|
subtitle xml, @account.note
|
||
|
updated_at xml, stream_updated_at
|
||
9 years ago
|
logo xml, asset_url(@account.avatar.url(:medium))
|
||
9 years ago
|
|
||
|
author(xml) do
|
||
9 years ago
|
include_author xml, @account
|
||
9 years ago
|
end
|
||
|
|
||
9 years ago
|
link_alternate xml, url_for_target(@account)
|
||
|
link_self xml, account_url(@account, format: 'atom')
|
||
9 years ago
|
link_hub xml, HUB_URL
|
||
9 years ago
|
link_salmon xml, api_salmon_url(@account.id)
|
||
9 years ago
|
|
||
9 years ago
|
@account.stream_entries.order('id desc').each do |stream_entry|
|
||
9 years ago
|
entry(xml, false) do
|
||
9 years ago
|
include_entry xml, stream_entry
|
||
9 years ago
|
end
|
||
|
end
|
||
|
end
|
||
|
end.to_xml
|