Class: DropboxApi::Endpoints::Files::Search
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/search.rb
Constant Summary collapse
- Method =
:post
- Path =
"/2/files/search".freeze
- ResultType =
DropboxApi::Results::SearchResult
- ErrorType =
DropboxApi::Errors::SearchError
Instance Method Summary collapse
-
#search(query, path = "", options = {}) ⇒ Object
Searches for files and folders.
Methods included from OptionsValidator
Methods inherited from Rpc
#build_request, #initialize, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Rpc
Instance Method Details
#search(query, path = "", options = {}) ⇒ Object
Searches for files and folders.
Note: Recent changes may not immediately be reflected in search results due to a short delay in indexing.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/dropbox_api/endpoints/files/search.rb', line 27 add_endpoint :search do |query, path = "", = {}| ([ :start, :max_results, :mode ], ) [:start] ||= 0 [:max_results] ||= 100 [:mode] ||= :filename perform_request .merge({ :query => query, :path => path }) end |