| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::Akeneo; |
|
2
|
|
|
|
|
|
|
$WebService::Akeneo::VERSION = '0.001'; |
|
3
|
3
|
|
|
3
|
|
665629
|
use v5.38; |
|
|
3
|
|
|
|
|
11
|
|
|
4
|
3
|
|
|
3
|
|
2385
|
use Object::Pad; |
|
|
3
|
|
|
|
|
42414
|
|
|
|
3
|
|
|
|
|
20
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Akeneo REST API client built with Mojo::UserAgent and Object::Pad |
|
7
|
|
|
|
|
|
|
# VERSION |
|
8
|
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
2124
|
use WebService::Akeneo::Config; |
|
|
3
|
|
|
|
|
8
|
|
|
|
3
|
|
|
|
|
143
|
|
|
10
|
3
|
|
|
3
|
|
1580
|
use WebService::Akeneo::Auth; |
|
|
3
|
|
|
|
|
11
|
|
|
|
3
|
|
|
|
|
251
|
|
|
11
|
3
|
|
|
3
|
|
2162
|
use WebService::Akeneo::Transport; |
|
|
3
|
|
|
|
|
13
|
|
|
|
3
|
|
|
|
|
148
|
|
|
12
|
3
|
|
|
3
|
|
1801
|
use WebService::Akeneo::Paginator; |
|
|
3
|
|
|
|
|
11
|
|
|
|
3
|
|
|
|
|
185
|
|
|
13
|
3
|
|
|
3
|
|
1720
|
use WebService::Akeneo::Resource::Categories; |
|
|
3
|
|
|
|
|
11
|
|
|
|
3
|
|
|
|
|
190
|
|
|
14
|
3
|
|
|
3
|
|
1713
|
use WebService::Akeneo::Resource::Products; |
|
|
3
|
|
|
|
|
9
|
|
|
|
3
|
|
|
|
|
158
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
3
|
|
|
3
|
|
20
|
use Mojo::UserAgent; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
22
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
class WebService::Akeneo 0.001; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
field $config :param; |
|
21
|
|
|
|
|
|
|
field $ua; |
|
22
|
|
|
|
|
|
|
field $auth; |
|
23
|
|
|
|
|
|
|
field $t; |
|
24
|
|
|
|
|
|
|
field $categories; |
|
25
|
|
|
|
|
|
|
field $products; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
BUILD { |
|
28
|
|
|
|
|
|
|
$ua = Mojo::UserAgent->new; |
|
29
|
|
|
|
|
|
|
$auth = WebService::Akeneo::Auth->new( config => $config, ua => $ua ); |
|
30
|
|
|
|
|
|
|
$t = WebService::Akeneo::Transport->new( config => $config, auth => $auth ); |
|
31
|
|
|
|
|
|
|
$categories = WebService::Akeneo::Resource::Categories->new( t => $t ); |
|
32
|
|
|
|
|
|
|
$products = WebService::Akeneo::Resource::Products->new( t => $t ); |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
method categories { $categories } |
|
36
|
|
|
|
|
|
|
method products { $products } |
|
37
|
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
0
|
|
method ua ($new_ua = undef) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
if (defined $new_ua) { |
|
40
|
0
|
0
|
|
|
|
|
$t->set_ua($new_ua) if $t->can('set_ua'); |
|
41
|
0
|
|
|
|
|
|
$ua = $new_ua; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
0
|
|
|
|
|
|
return $ua; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
0
|
|
method on_request ($cb) { $t->on_request($cb) } |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
0
|
|
method on_response($cb) { $t->on_response($cb) } |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |