line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Dropbox::Files::ListFolder; |
2
|
10
|
|
|
10
|
|
67
|
use strict; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
289
|
|
3
|
10
|
|
|
10
|
|
49
|
use warnings; |
|
10
|
|
|
|
|
19
|
|
|
10
|
|
|
|
|
251
|
|
4
|
10
|
|
|
10
|
|
45
|
use parent qw(Exporter); |
|
10
|
|
|
|
|
40
|
|
|
10
|
|
|
|
|
82
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @EXPORT = do { |
7
|
10
|
|
|
10
|
|
652
|
no strict 'refs'; |
|
10
|
|
|
|
|
29
|
|
|
10
|
|
|
|
|
3120
|
|
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; |