From 0aeea42724b7eac2bd2cd78b9d740fe5491d8df4 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 15 Jul 2009 10:29:54 -0400 Subject: [PATCH] Added stub oembed api endpoint --- actions/api.php | 1 + actions/twitapilaconica.php | 8 ++++++++ lib/router.php | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/actions/api.php b/actions/api.php index 452ed8e824..fa5a7e7ae9 100644 --- a/actions/api.php +++ b/actions/api.php @@ -129,6 +129,7 @@ class ApiAction extends Action 'laconica/config', 'laconica/wadl', 'tags/timeline', + 'laconica/oembed', 'groups/timeline'); static $bareauth = array('statuses/user_timeline', diff --git a/actions/twitapilaconica.php b/actions/twitapilaconica.php index 8cd7a64b9f..ec40bc6273 100644 --- a/actions/twitapilaconica.php +++ b/actions/twitapilaconica.php @@ -171,4 +171,12 @@ class TwitapilaconicaAction extends TwitterapiAction parent::handle($args); $this->serverError(_('API method under construction.'), 501); } + + function oembed($args, $apidata) + { + parent::handle($args); + $url = $args['url']; + print_r($apidata); + die("oembed!"); + } } diff --git a/lib/router.php b/lib/router.php index e121386370..652d2a2663 100644 --- a/lib/router.php +++ b/lib/router.php @@ -390,6 +390,10 @@ class Router // laconica + $m->connect('api/laconica/:method', + array('action' => 'api', + 'apiaction' => 'laconica')); + $m->connect('api/laconica/:method', array('action' => 'api', 'apiaction' => 'laconica'));