| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::Dropbox::Files::ListFolder; |
|
2
|
10
|
|
|
10
|
|
63
|
use strict; |
|
|
10
|
|
|
|
|
16
|
|
|
|
10
|
|
|
|
|
276
|
|
|
3
|
10
|
|
|
10
|
|
46
|
use warnings; |
|
|
10
|
|
|
|
|
27
|
|
|
|
10
|
|
|
|
|
235
|
|
|
4
|
10
|
|
|
10
|
|
42
|
use parent qw(Exporter); |
|
|
10
|
|
|
|
|
37
|
|
|
|
10
|
|
|
|
|
75
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @EXPORT = do { |
|
7
|
10
|
|
|
10
|
|
629
|
no strict 'refs'; |
|
|
10
|
|
|
|
|
21
|
|
|
|
10
|
|
|
|
|
3182
|
|
|
8
|
|
|
|
|
|
|
grep { $_ !~ qr{ \A [A-Z]+ \z }xms } keys %{ __PACKAGE__ . '::' }; |
|
9
|
|
|
|
|
|
|
}; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder |
|
13
|
|
|
|
|
|
|
sub list_folder { |
|
14
|
0
|
|
|
0
|
0
|
|
my ($self, $path, $optional_params) = @_; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $params = { |
|
17
|
|
|
|
|
|
|
path => $path, |
|
18
|
0
|
0
|
|
|
|
|
%{ $optional_params || {} }, |
|
|
0
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
}; |
|
20
|
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
$self->api({ |
|
22
|
|
|
|
|
|
|
url => 'https://api.dropboxapi.com/2/files/list_folder', |
|
23
|
|
|
|
|
|
|
params => $params, |
|
24
|
|
|
|
|
|
|
}); |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue |
|
28
|
|
|
|
|
|
|
sub list_folder_continue { |
|
29
|
0
|
|
|
0
|
0
|
|
my ($self, $cursor) = @_; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
my $params = { |
|
32
|
|
|
|
|
|
|
cursor => $cursor, |
|
33
|
|
|
|
|
|
|
}; |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
$self->api({ |
|
36
|
|
|
|
|
|
|
url => 'https://api.dropboxapi.com/2/files/list_folder/continue', |
|
37
|
|
|
|
|
|
|
params => $params, |
|
38
|
|
|
|
|
|
|
}); |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-get_latest_cursor |
|
42
|
|
|
|
|
|
|
sub list_folder_get_latest_cursor { |
|
43
|
0
|
|
|
0
|
0
|
|
my ($self, $path, $optional_params) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $params = { |
|
46
|
|
|
|
|
|
|
path => $path, |
|
47
|
0
|
0
|
|
|
|
|
%{ $optional_params || {} }, |
|
|
0
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
}; |
|
49
|
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
$self->api({ |
|
51
|
|
|
|
|
|
|
url => 'https://api.dropboxapi.com/2/files/list_folder/get_latest_cursor', |
|
52
|
|
|
|
|
|
|
params => $params, |
|
53
|
|
|
|
|
|
|
}); |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-longpoll |
|
57
|
|
|
|
|
|
|
sub list_folder_longpoll { |
|
58
|
0
|
|
|
0
|
0
|
|
my ($self, $cursor, $optional_params) = @_; |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $params = { |
|
61
|
|
|
|
|
|
|
cursor => $cursor, |
|
62
|
0
|
0
|
|
|
|
|
%{ $optional_params || {} }, |
|
|
0
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
}; |
|
64
|
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
$self->api({ |
|
66
|
|
|
|
|
|
|
url => 'https://notify.dropboxapi.com/2/files/list_folder/longpoll', |
|
67
|
|
|
|
|
|
|
params => $params, |
|
68
|
|
|
|
|
|
|
}); |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |