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.

24 lines
715 B

  1. Nokogiri::XML::Builder.new do |xml|
  2. feed(xml) do
  3. simple_id xml, account_url(@account, format: 'atom')
  4. title xml, @account.display_name
  5. subtitle xml, @account.note
  6. updated_at xml, stream_updated_at
  7. logo xml, full_asset_url(@account.avatar.url(:medium, false))
  8. author(xml) do
  9. include_author xml, @account
  10. end
  11. link_alternate xml, url_for_target(@account)
  12. link_self xml, account_url(@account, format: 'atom')
  13. link_hub xml, Rails.configuration.x.hub_url
  14. link_salmon xml, api_salmon_url(@account.id)
  15. @entries.each do |stream_entry|
  16. entry(xml, false) do
  17. include_entry xml, stream_entry
  18. end
  19. end
  20. end
  21. end.to_xml