summaryrefslogtreecommitdiff
path: root/lib/api.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-09 17:32:53 -0700
committerZach Copley <zach@status.net>2009-10-09 17:32:53 -0700
commitb08d16ef2bf5995ca2feee2d2688e0080eaf5124 (patch)
treeec4f7e232f8508c160ae3599f6ca880a731bd255 /lib/api.php
parent57dfad64beae100187dcaf3c205645e89611e115 (diff)
These same params are used in most API actions; moved to base API class
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php17
1 files changed, 15 insertions, 2 deletions
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;
}