You are here

public function dropbox::search in Dropbox Client 7.3

Same name and namespace in other branches
  1. 7.4 dropbox.php \dropbox::search()
  2. 7 dropbox.php \dropbox::search()
  3. 7.2 dropbox.php \dropbox::search()

Retrieve metadata for all files and folders that match the search query

Parameters

string $path The path to the file or folder in question:

string $query The search query must be at least 3 characters in length:

array $params (optional) Consult the Dropbox API documentation for more details:

strint $root (optional) Either 'dropbox' or 'sandbox':

Return value

a response object

File

./dropbox.php, line 287

Class

dropbox

Code

public function search($path, $query, array $params = array(), $root = 'dropbox') {
  $path = str_replace(' ', '%20', $path);
  $query = rawurlencode($query);
  $parstr = empty($params) ? '' : '&' . http_build_query($params);
  return $this
    ->_response_request("/search/{$root}/{$path}?query={$query}{$parstr}");
}