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".freeze
- ResultType =
DropboxApi::Results::ListFolderLongpollResult
- ErrorType =
DropboxApi::Errors::ListFolderLongpollError
Instance Method Summary collapse
-
#list_folder_longpoll(path, options = {}) ⇒ Object
A longpoll endpoint to wait for changes on an account.
Methods included from OptionsValidator
Methods inherited from RpcNotify
Methods inherited from Rpc
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::RpcNotify
Instance Method Details
#list_folder_longpoll(path, 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.
for at most this length of time, plus up to 90 seconds of random jitter added to avoid the thundering herd problem. Care should be taken when using this parameter, as some network infrastructure does not support long timeouts. The default for this field is 30.
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 |