diff app/views/tweets/show.atom.erb @ 245:2935c5e52a71

No more official twitter api
author nanaya <me@nanaya.net>
date Mon, 17 Jul 2023 04:23:09 +0900
parents 7a773720d81f
children
line wrap: on
line diff
--- a/app/views/tweets/show.atom.erb	Fri Jul 14 01:45:40 2023 +0900
+++ b/app/views/tweets/show.atom.erb	Mon Jul 17 04:23:09 2023 +0900
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
-  <id><%= atom_id(@user.id) %></id>
+  <id><%= atom_id(@user[:id]) %></id>
 
-  <link rel="alternate" type="text/html" href="https://twitter.com/<%= @user.screen_name %>" />
+  <link rel="alternate" type="text/html" href="https://twitter.com/<%= @user[:username] %>" />
   <link rel="self" type="application/atom+xml" href="<%= request.url %>" />
 
-  <title><%= "#{@user.name.printable} (#{@user.screen_name})" %></title>
-  <icon><%= @user.profile_image_url_https %></icon>
-  <logo><%= @user.profile_image_url_https %></logo>
+  <title><%= "#{@user[:name].printable} (#{@user[:username]})" %></title>
+  <icon><%= @user[:avatar_url] %></icon>
+  <logo><%= @user[:avatar_url] %></logo>
 
-  <updated><%= (@tweets.first.try(:created_at) || Time.at(0)).xmlschema %></updated>
+  <updated><%= (@tweets.first.try(:[], :created_at) || Time.at(0)).xmlschema %></updated>
 
   <%= render :partial => "tweet", :collection => @tweets, :cached => true %>
 </feed>