diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/api_timeline_atom.tpl | 39 | ||||
-rw-r--r-- | view/api_timeline_rss.tpl | 21 | ||||
-rw-r--r-- | view/api_timeline_xml.tpl | 21 | ||||
-rw-r--r-- | view/api_user_xml.tpl | 46 |
4 files changed, 127 insertions, 0 deletions
diff --git a/view/api_timeline_atom.tpl b/view/api_timeline_atom.tpl new file mode 100644 index 000000000..069ff7651 --- /dev/null +++ b/view/api_timeline_atom.tpl @@ -0,0 +1,39 @@ +<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:media="http://purl.org/syndication/atommedia" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:statusnet="http://status.net/schema/api/1/"> + <generator uri="http://status.net" version="0.9.7">StatusNet</generator> + <id>tag:friendika:PublicTimeline</id> + <title>Network on Friendika</title> + <subtitle>Your network updates on Friendika</subtitle> + <logo>$rss.logo</logo> + <updated>$rss.updated</updated> + <link type="text/html" rel="alternate" href="$rss.alternate"/> + <link type="application/atom+xml" rel="self" href="$rss.self"/> + {{ 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.created_at</published> + <updated>$status.created_at</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> + </entry> + {{ endfor }} +</feed> diff --git a/view/api_timeline_rss.tpl b/view/api_timeline_rss.tpl new file mode 100644 index 000000000..fbba93ee9 --- /dev/null +++ b/view/api_timeline_rss.tpl @@ -0,0 +1,21 @@ +<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:twitter="http://api.twitter.com"> + <channel> + <title>Friendika</title> + <link>$rss.alternate</link> + <atom:link type="application/rss+xml" rel="self" href="$rss.self"/> + <description>Friendika timeline</description> + <language>$rss.language</language> + <ttl>40</ttl> + +{{ for $statuses as $status }} + <item> + <title>$status.text</title> + <description>$status.text</description> + <pubDate>$status.created_at</pubDate> + <guid>$status.url</guid> + <link>$status.url</link> + <twitter:source>$status.source</twitter:source> + </item> +{{ endfor }} + </channel> +</rss> diff --git a/view/api_timeline_xml.tpl b/view/api_timeline_xml.tpl new file mode 100644 index 000000000..85f73064e --- /dev/null +++ b/view/api_timeline_xml.tpl @@ -0,0 +1,21 @@ +<statuses type="array"> + {{ for $statuses as $status }} + <status> + <created_at>$status.created_at</created_at> + <id>$status.id</id> + <text>$status.text</text> + <source>$status.source</source> + <truncated>$status.truncated</truncated> + <url>$status.url</url> + <in_reply_to_status_id>$status.in_reply_to_status_id</in_reply_to_status_id> + <in_reply_to_user_id>$status.in_reply_to_user_id</in_reply_to_user_id> + <favorited>$status.favorited</favorited> + <in_reply_to_screen_name>$status.in_reply_to_screen_name</in_reply_to_screen_name> + <geo>$status.geo</geo> + <coordinates>$status.coordinates</coordinates> + <place>$status.place</place> + <contributors>$status.contributors</contributors> + {{ inc view/api_user_xml.tpl with $user=$status.user }}{{ endinc }} + </status> + {{ endfor }} +</statuses>
\ No newline at end of file diff --git a/view/api_user_xml.tpl b/view/api_user_xml.tpl new file mode 100644 index 000000000..15517fc42 --- /dev/null +++ b/view/api_user_xml.tpl @@ -0,0 +1,46 @@ +<user> + <id>$user.id</id> + <name>$user.name</name> + <screen_name>$user.screen_name</screen_name> + <location>$user.location</location> + <description>$user.description</description> + <profile_image_url>$user.profile_image_url</profile_image_url> + <url>$user.url</url> + <protected>$user.protected</protected> + <followers_count>$user.followers</followers_count> + <profile_background_color>$user.profile_background_color</profile_background_color> + <profile_text_color>$user.profile_text_color</profile_text_color> + <profile_link_color>$user.profile_link_color</profile_link_color> + <profile_sidebar_fill_color>$user.profile_sidebar_fill_color</profile_sidebar_fill_color> + <profile_sidebar_border_color>$user.profile_sidebar_border_color</profile_sidebar_border_color> + <friends_count>$user.friends_count</friends_count> + <created_at>$user.created_at</created_at> + <favourites_count>$user.favourites_count</favourites_count> + <utc_offset>$user.utc_offset</utc_offset> + <time_zone>$user.time_zone</time_zone> + <profile_background_image_url>$user.profile_background_image_url</profile_background_image_url> + <profile_background_tile>$user.profile_background_tile</profile_background_tile> + <profile_use_background_image>$user.profile_use_background_image</profile_use_background_image> + <notifications></notifications> + <geo_enabled>$user.geo_enabled</geo_enabled> + <verified>$user.verified</verified> + <following></following> + <statuses_count>$user.statuses_count</statuses_count> + <lang>$user.lang</lang> + <contributors_enabled>$user.contributors_enabled</contributors_enabled> + <status>{{ if $user.status }} + <created_at>$user.status.created_at</created_at> + <id>$user.status.id</id> + <text>$user.status.text</text> + <source>$user.status.source</source> + <truncated>$user.status.truncated</truncated> + <in_reply_to_status_id>$user.status.in_reply_to_status_id</in_reply_to_status_id> + <in_reply_to_user_id>$user.status.in_reply_to_user_id</in_reply_to_user_id> + <favorited>$user.status.favorited</favorited> + <in_reply_to_screen_name>$user.status.in_reply_to_screen_name</in_reply_to_screen_name> + <geo>$user.status.geo</geo> + <coordinates>$user.status.coordinates</coordinates> + <place>$user.status.place</place> + <contributors>$user.status.contributors</contributors> + {{ endif }}</status> +</user>
\ No newline at end of file |