Class: DropboxApi::Endpoints::Files::ListFolderLongpoll
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/list_folder_longpoll.rb
Constant Summary collapse
- Method =
:post
- Path =
'/2/files/list_folder/longpoll'
- ResultType =
DropboxApi::Results::ListFolderLongpollResult
- ErrorType =
DropboxApi::Errors::ListFolderLongpollError
Instance Method Summary collapse
-
#list_folder_longpoll(cursor, options = {}) ⇒ Object
A longpoll endpoint to wait for changes on an account.
Methods included from OptionsValidator
Methods inherited from RpcNotify
Methods inherited from Rpc
#build_request, #initialize, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::RpcNotify
Instance Method Details
#list_folder_longpoll(cursor, options = {}) ⇒ Object
A longpoll endpoint to wait for changes on an account. In conjunction with list_folder, this call gives you a low-latency way to monitor an account for file changes. The connection will block until there are changes available or a timeout occurs. This endpoint is useful mostly for client-side apps. If you're looking for server-side notifications, check out our webhooks documentation.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/dropbox_api/endpoints/files/list_folder_longpoll.rb', line 25 add_endpoint :list_folder_longpoll do |cursor, = {}| ([ :timeout ], ) [:timeout] ||= 30 perform_request .merge({ cursor: cursor }) end |