aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-06-21 11:41:16 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-06-21 11:41:16 +0200
commit296f1b0123edd89b40b48362ffd19134499ef9f3 (patch)
treebe5c5715b6779bd150abde257665d8da85f15763 /view
parent5a23440fb4d1798d84b3f419fb2ddded8160a4a2 (diff)
downloadvolse-hubzilla-296f1b0123edd89b40b48362ffd19134499ef9f3.tar.gz
volse-hubzilla-296f1b0123edd89b40b48362ffd19134499ef9f3.tar.bz2
volse-hubzilla-296f1b0123edd89b40b48362ffd19134499ef9f3.zip
add users infos to rss and atom api responses
Diffstat (limited to 'view')
-rw-r--r--view/api_timeline_atom.tpl135
-rw-r--r--view/api_timeline_rss.tpl9
2 files changed, 118 insertions, 26 deletions
diff --git a/view/api_timeline_atom.tpl b/view/api_timeline_atom.tpl
index bc677d237..cd91f7a97 100644
--- a/view/api_timeline_atom.tpl
+++ b/view/api_timeline_atom.tpl
@@ -7,33 +7,120 @@
<updated>$rss.updated</updated>
<link type="text/html" rel="alternate" href="$rss.alternate"/>
<link type="application/atom+xml" rel="self" href="$rss.self"/>
+
+
+ <author>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <uri>$user.url</uri>
+ <name>$user.name</name>
+ <link rel="alternate" type="text/html" href="$user.url"/>
+ <link rel="avatar" type="image/jpeg" media:width="106" media:height="106" href="$user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="$user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="$user.profile_image_url"/>
+ <georss:point></georss:point>
+ <poco:preferredUsername>$user.screen_name</poco:preferredUsername>
+ <poco:displayName>$user.name</poco:displayName>
+ <poco:urls>
+ <poco:type>homepage</poco:type>
+ <poco:value>$user.url</poco:value>
+ <poco:primary>true</poco:primary>
+ </poco:urls>
+ <statusnet:profile_info local_id="$user.id"></statusnet:profile_info>
+ </author>
+
+ <!--Deprecation warning: activity:subject is present only for backward compatibility. It will be removed in the next version of StatusNet.-->
+ <activity:subject>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <id>$user.url</id>
+ <title>$user.name</title>
+ <link rel="alternate" type="text/html" href="$user.url"/>
+ <link rel="avatar" type="image/jpeg" media:width="106" media:height="106" href="$user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="$user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="$user.profile_image_url"/>
+ <poco:preferredUsername>$user.screen_name</poco:preferredUsername>
+ <poco:displayName>$user.name</poco:displayName>
+ <poco:urls>
+ <poco:type>homepage</poco:type>
+ <poco:value>$user.url</poco:value>
+ <poco:primary>true</poco:primary>
+ </poco:urls>
+ <statusnet:profile_info local_id="$user.id"></statusnet:profile_info>
+ </activity:subject>
+
+
{{ for $statuses as $status }}
<entry>
- <activity:object-type>$status.objecttype</activity:object-type>
- <id>$status.id</id>
- <title>$status.text</title>
- <content type="html">$status.html</content>
- <link rel="alternate" type="text/html" href="$status.url"/>
- <activity:verb>$status.verb</activity:verb>
- <published>$status.published</published>
- <updated>$status.updated</updated>
+ <activity:object-type>$status.objecttype</activity:object-type>
+ <id>$status.id</id>
+ <title>$status.text</title>
+ <content type="html">$status.html</content>
+ <link rel="alternate" type="text/html" href="$status.url"/>
+ <activity:verb>$status.verb</activity:verb>
+ <published>$status.published</published>
+ <updated>$status.updated</updated>
+
+ <link rel="ostatus:conversation" href="$status.url"/>
+ <!--
+ <source>
+ <id>http://identi.ca/api/statuses/user_timeline/397830.atom</id>
+ <title>Sin Mobopolitan</title>
+ <link rel="alternate" type="text/html" href="http://identi.ca/mobopolitan"/>
+ <link rel="self" type="application/atom+xml" href="http://identi.ca/api/statuses/user_timeline/397830.atom"/>
+ <link rel="license" href="http://creativecommons.org/licenses/by/3.0/"/>
+ <icon>http://avatar.identi.ca/397830-96-20110312195623.jpeg</icon>
+ <updated>2011-04-21T18:39:32+00:00</updated>
+ </source>
+ -->
+ <link rel="self" type="application/atom+xml" href="$status.self"/>
+ <link rel="edit" type="application/atom+xml" href="$status.edit"/>
+ <statusnet:notice_info local_id="$status.id" source="$status.source" favorite="false" repeated="false">
+ </statusnet:notice_info>
+
+ <author>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <uri>$status.user.url</uri>
+ <name>$status.user.name</name>
+ <link rel="alternate" type="text/html" href="$status.user.url"/>
+ <link rel="avatar" type="image/jpeg" media:width="106" media:height="106" href="$status.user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="$status.user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$status.user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="$status.user.profile_image_url"/>
+ <georss:point/>
+ <poco:preferredUsername>$status.user.screen_name</poco:preferredUsername>
+ <poco:displayName>$status.user.name</poco:displayName>
+ <poco:address/>
+ <poco:urls>
+ <poco:type>homepage</poco:type>
+ <poco:value>$status.user.url</poco:value>
+ <poco:primary>true</poco:primary>
+ </poco:urls>
+ <!-- <statusnet:profile_info local_id="123710" following="true" blocking="false"></statusnet:profile_info> -->
+ </author>
+ <!--Deprecation warning: activity:actor is present only for backward compatibility. It will be removed in the next version of StatusNet.-->
+ <activity:actor>
+ <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
+ <id>$status.user.url</id>
+ <title>$status.user.name</title>
+ <link rel="alternate" type="text/html" href="$status.user.url"/>
+ <link rel="avatar" type="image/jpeg" media:width="106" media:height="106" href="$status.user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="96" media:height="96" href="$status.user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="48" media:height="48" href="$status.user.profile_image_url"/>
+ <link rel="avatar" type="image/jpeg" media:width="24" media:height="24" href="$status.user.profile_image_url"/>
+ <georss:point/>
+ <poco:preferredUsername>$status.user.screen_name</poco:preferredUsername>
+ <poco:displayName>$status.user.name</poco:displayName>
+ <poco:address />
+ <poco:urls>
+ <poco:type>homepage</poco:type>
+ <poco:value>$status.user.url</poco:value>
+ <poco:primary>true</poco:primary>
+ </poco:urls>
+ <!-- <statusnet:profile_info local_id="123710" following="true" blocking="false"></statusnet:profile_info> -->
+ </activity:actor>
+ <link rel="ostatus:conversation" href="$status.conversation"/>
- <link rel="ostatus:conversation" href="$status.url"/>
- <!--
- <source>
- <id>http://identi.ca/api/statuses/user_timeline/397830.atom</id>
- <title>Sin Mobopolitan</title>
- <link rel="alternate" type="text/html" href="http://identi.ca/mobopolitan"/>
- <link rel="self" type="application/atom+xml" href="http://identi.ca/api/statuses/user_timeline/397830.atom"/>
- <link rel="license" href="http://creativecommons.org/licenses/by/3.0/"/>
- <icon>http://avatar.identi.ca/397830-96-20110312195623.jpeg</icon>
- <updated>2011-04-21T18:39:32+00:00</updated>
- </source>
- -->
- <link rel="self" type="application/atom+xml" href="$status.self"/>
- <link rel="edit" type="application/atom+xml" href="$status.edit"/>
- <statusnet:notice_info local_id="$status.id" source="$status.source" favorite="false" repeated="false">
- </statusnet:notice_info>
</entry>
{{ endfor }}
</feed>
diff --git a/view/api_timeline_rss.tpl b/view/api_timeline_rss.tpl
index fbba93ee9..40239273c 100644
--- a/view/api_timeline_rss.tpl
+++ b/view/api_timeline_rss.tpl
@@ -6,10 +6,15 @@
<description>Friendika timeline</description>
<language>$rss.language</language>
<ttl>40</ttl>
-
+ <image>
+ <link>$user.link</link>
+ <title>$user.name's items</title>
+ <url>$user.profile_image_url</url>
+ </image>
+
{{ for $statuses as $status }}
<item>
- <title>$status.text</title>
+ <title>$status.user.name: $status.text</title>
<description>$status.text</description>
<pubDate>$status.created_at</pubDate>
<guid>$status.url</guid>