From 30268cff7899519f249861e067e3af680ee1c570 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 31 Jan 2010 15:16:59 -0500 Subject: Add Really Simple Discovery (RSD) support Anil Dash suggested that all implementers of the Twitter API include support for the remedial RSD format. This commit adds an RSD action that returns the API root and additional API data to help client developers discover and use our Twitter-compatible API. http://dashes.com/anil/2009/12/the-twitter-api-is-finished.html http://tales.phrasewise.com/rfc/rsd --- actions/public.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'actions/public.php') diff --git a/actions/public.php b/actions/public.php index 982dfde15..50278bfce 100644 --- a/actions/public.php +++ b/actions/public.php @@ -131,12 +131,20 @@ class PublicAction extends Action return _('Public timeline'); } } - + function extraHead() { parent::extraHead(); $this->element('meta', array('http-equiv' => 'X-XRDS-Location', 'content' => common_local_url('publicxrds'))); + + $rsd = common_local_url('rsd'); + + // RSD, http://tales.phrasewise.com/rfc/rsd + + $this->element('link', array('rel' => 'EditURI', + 'type' => 'application/rsd+xml', + 'href' => $rsd)); } /** -- cgit v1.2.3-54-g00ecf