| line |
true |
false |
branch |
|
17
|
1 |
15 |
unless $self->{'client_id'} |
|
18
|
1 |
14 |
unless defined $self->{'client_secret'} |
|
28
|
2 |
12 |
if ($self->{'grant_type'} eq 'password') { } |
|
|
1 |
11 |
elsif ($self->{'grant_type'} eq 'installed') { } |
|
|
7 |
4 |
elsif ($self->{'grant_type'} eq 'authorization_code') { } |
|
30
|
1 |
1 |
unless defined $self->{'username'} and defined $self->{'password'} |
|
46
|
13 |
0 |
unless $self->{'_endpoint_explicit'} |
|
49
|
2 |
11 |
if (defined $self->{'access_token'}) |
|
54
|
2 |
11 |
if (defined $self->{'refresh_token'}) |
|
64
|
13 |
0 |
unless $explicit_ep |
|
90
|
1 |
0 |
defined $self->{'_access_token'} ? : |
|
|
1 |
0 |
defined $self->{'_refresh_token'} ? : |
|
109
|
0 |
2 |
unless defined $args{'redirect_uri'} |
|
111
|
1 |
1 |
if (ref $scope eq "ARRAY") |
|
131
|
0 |
2 |
unless $http |
|
134
|
0 |
2 |
unless defined $args{'code'} |
|
135
|
0 |
2 |
unless defined $args{'redirect_uri'} |
|
162
|
1 |
9 |
unless ($resp->is_success) |
|
168
|
0 |
9 |
if (my $e = $@) |
|
171
|
0 |
9 |
unless ($data->{'access_token'}) |
|
180
|
2 |
7 |
if (defined $data->{'refresh_token'}) |
|
183
|
1 |
8 |
if (my $cb = $self->{'on_token_refresh'}) |
|
194
|
2 |
1 |
if ($self->{'_access_token'} and $self->{'_token_expires_at'} and time + $self->{'token_margin'} < $self->{'_token_expires_at'}) |
|
202
|
1 |
8 |
if ($self->{'_refresh_token'}) |
|
212
|
1 |
7 |
if ($self->grant_type eq "authorization_code") |
|
221
|
1 |
6 |
if ($self->grant_type eq 'password') { } |
|
|
1 |
5 |
elsif ($self->grant_type eq 'installed') { } |
|
242
|
0 |
9 |
defined $opts->{'subreddit'} ? : |
|
243
|
0 |
9 |
defined $sub && length $sub ? : |
|
253
|
0 |
9 |
if defined $sub and length $sub |
|
254
|
0 |
9 |
$opts->{'include_nsfw'} ? : |
|
264
|
0 |
9 |
unless ($resp->is_success) |
|
270
|
0 |
9 |
if (my $e = $@) |
|
280
|
2 |
17 |
if defined $self->{'user_agent'} |