File Coverage

blib/lib/Mojo/Webqq/Model/Remote/_qiandao.pm
Criterion Covered Total %
statement 0 10 0.0
branch 0 8 0.0
condition n/a
subroutine 0 1 0.0
pod n/a
total 0 19 0.0


line stmt bran cond sub pod time code
1             sub Mojo::Webqq::Model::_qiandao {
2 0     0     my($self,$uid) = @_;
3 0 0         if(not defined $uid){
4 0           $self->warn("无效的群组号码");
5 0           return;
6             }
7 0           my $api = 'http://qiandao.qun.qq.com/cgi-bin/sign';
8 0           my $json = $self->http_post(
9             $api,
10             {json=>1,Referer=>"http://qiandao.qun.qq.com/index.html?groupUin=$uid&appID=100729587"},
11             form=>{
12             gc=>$uid,
13             is_sign=>0,
14             bkn=>$self->get_csrf_token,
15             }
16             );
17 0 0         return if not defined $json;
18             #{"conti_count":1,"ec":0,"is_new":0,"is_sign":1,"now":1464858442,"rank":2,"sign_time":1464858442,"today_count":2,"total_count":1}
19 0 0         return if $json->{ec} != 0;
20 0 0         return if $json->{is_sign} != 1;
21 0           return 1;
22             }
23             1;