line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
sub Mojo::Webqq::Model::get_single_long_nick{ |
2
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
3
|
0
|
|
|
|
|
|
my $uin = shift; |
4
|
|
|
|
|
|
|
|
5
|
0
|
|
|
|
|
|
my $api_url = 'https://s.web2.qq.com/api/get_single_long_nick2'; |
6
|
0
|
|
|
|
|
|
my $headers = {Referer=>'https://s.web2.qq.com/proxy.html?v=20130916001&callback=1&id=1',json=>1}; |
7
|
0
|
|
|
|
|
|
my @query_string = ( |
8
|
|
|
|
|
|
|
tuin => $uin, |
9
|
|
|
|
|
|
|
vfwebqq => $self->vfwebqq, |
10
|
|
|
|
|
|
|
t => time, |
11
|
|
|
|
|
|
|
); |
12
|
0
|
|
|
|
|
|
my $json = $self->http_get($self->gen_url($api_url,@query_string),$headers); |
13
|
0
|
0
|
|
|
|
|
return undef unless defined $json; |
14
|
0
|
0
|
|
|
|
|
return undef if $json->{retcode} !=0; |
15
|
|
|
|
|
|
|
#{"retcode":0,"result":[{"uin":308165330,"lnick":""}]} |
16
|
0
|
|
|
|
|
|
my $single_long_nick = $json->{result}[0]{lnick}; |
17
|
0
|
|
|
|
|
|
return $single_long_nick; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
1; |