diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-04-21 17:03:31 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-04-21 17:03:31 +0200 |
commit | 41f6ccc039633890b42f3a1a4495dfd8c7262da0 (patch) | |
tree | 0f5725227c81334d7f19b7938e8487929c593c41 /view | |
parent | e472d79b1e64c91dd3e19227151bdf82eb209192 (diff) | |
download | volse-hubzilla-41f6ccc039633890b42f3a1a4495dfd8c7262da0.tar.gz volse-hubzilla-41f6ccc039633890b42f3a1a4495dfd8c7262da0.tar.bz2 volse-hubzilla-41f6ccc039633890b42f3a1a4495dfd8c7262da0.zip |
More works on api
Diffstat (limited to 'view')
-rw-r--r-- | view/api_timeline_atom.tpl | 21 | ||||
-rw-r--r-- | view/api_timeline_rss.tpl | 23 | ||||
-rw-r--r-- | view/api_timeline_xml.tpl | 21 | ||||
-rw-r--r-- | view/api_user_xml.tpl | 46 |
4 files changed, 111 insertions, 0 deletions
diff --git a/view/api_timeline_atom.tpl b/view/api_timeline_atom.tpl new file mode 100644 index 000000000..63782ce36 --- /dev/null +++ b/view/api_timeline_atom.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>
\ No newline at end of file diff --git a/view/api_timeline_rss.tpl b/view/api_timeline_rss.tpl new file mode 100644 index 000000000..d07ac42ad --- /dev/null +++ b/view/api_timeline_rss.tpl @@ -0,0 +1,23 @@ +<feed xml:lang="en-US" xmlns:georss="http://www.georss.org/georss" xmlns="http://www.w3.org/2005/Atom" xmlns:twitter="http://api.twitter.com"> + <title>Friendika</title> + <id>tag:friendika:Status</id> + <link type="text/html" rel="alternate" href="$rss.alternate"/> + <link type="application/atom+xml" rel="self" href="$rss.self"/> + <updated>$rss.updated</updated> + <subtitle>Friendika timeline</subtitle> + {{ for $statuses as $status }} + <entry> + <title>$status.text</title> + <content type="html">$status.text</content> + <id>$status.id</id> + <published>$status.created_at</published> + <updated>$status.created_at</updated> + <link type="text/html" rel="alternate" href="$status.url"/> + <author> + <name>$status.user.name</name> + <uri>$status.user.url</uri> + </author> + <twitter:source>$status.source</twitter:source> + </entry> + {{ endfor }} +</feed>
\ No newline at end of file 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 |