* @link http://status.net/
* @see ApiAction
*/
-
class ApiSearchJSONAction extends ApiPrivateAuthAction
{
var $query;
*
* @return boolean true if nothing goes wrong
*/
-
function prepare($args)
{
- common_debug("apisearchjson prepare()");
-
parent::prepare($args);
$this->query = $this->trimmed('q');
$this->page = 1;
}
+ // TODO: Suppport max_id -- we need to tweak the backend
+ // Search classes to support it.
+
$this->since_id = $this->trimmed('since_id');
$this->geocode = $this->trimmed('geocode');
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showResults()
{
-
// TODO: Support search operators like from: and to:, boolean, etc.
$notice = new Notice();
$cnt = $notice->find();
}
- // TODO: since_id, lang, geocode
+ // TODO: max_id, lang, geocode
- $results = new JSONSearchResultsList($notice, $q, $this->rpp, $this->page);
+ $results = new JSONSearchResultsList($notice, $q, $this->rpp, $this->page, $this->since_id);
$this->initDocument('json');
$results->show();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;