From b08d16ef2bf5995ca2feee2d2688e0080eaf5124 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 9 Oct 2009 17:32:53 -0700 Subject: These same params are used in most API actions; moved to base API class --- lib/api.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/api.php b/lib/api.php index 3afb20612..95a0779ad 100644 --- a/lib/api.php +++ b/lib/api.php @@ -43,8 +43,14 @@ if (!defined('STATUSNET')) { class ApiAction extends Action { - var $format = null; - + var $format = null; + var $user = null; + var $page = null; + var $count = null; + var $max_id = null; + var $since_id = null; + var $since = null; + /** * Initialization. * @@ -56,7 +62,14 @@ class ApiAction extends Action function prepare($args) { parent::prepare($args); + $this->format = $this->arg('format'); + $this->page = (int)$this->arg('page', 1); + $this->count = (int)$this->arg('count', 20); + $this->max_id = (int)$this->arg('max_id', 0); + $this->since_id = (int)$this->arg('since_id', 0); + $this->since = $this->arg('since'); + return true; } -- cgit v1.2.3-54-g00ecf