Group
Extension

Matches 35359

Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client.pod ( view source; MetaCPAN )
生一个监听本地指定端口的HTTP服务器,用于接收api请求

返回数据完全为JSON格式,接口包括:

    获取个人信息        /openqq/get_user_info
    获取好友信息
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/GetRecentInfo.pm ( view source; MetaCPAN )
escape);
use JSON;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = shift;
    return [
        200,
        ['Content-Type' => 'text/plain'],
        [JSON->new->encod
Dancer-Plugin-PageHistory ( S/SY/SYSPETE/Dancer-Plugin-PageHistory-0.102.tar.gz, SYSPETE, 2015; MetaCPAN )
Dancer-Plugin-PageHistory/lib/Dancer/Plugin/PageHistory.pm ( view source; MetaCPAN )
r::Session::CHI>,
L<Cookie|Dancer::Session::Cookie>, 
L<DBIC|Dancer::Session::DBIC>,
L<JSON|Dancer::Session::JSON>,
L<Memcached|Dancer::Session::Memcached>,
L<Memcached::Fast|Dancer::Session::Memcache
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/GetDiscussInfo.pm ( view source; MetaCPAN )
escape);
use JSON;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = shift;
    return [
        200,
        ['Content-Type' => 'text/plain'],
        [JSON->new->encod
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/SendGroupMessage.pm ( view source; MetaCPAN )
:Openqq::SendGroupMessage;
use parent qw(Plack::Component);
use URI::Escape qw(uri_unescape);
use JSON;
use Encode;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = shi
  };
            my $json = JSON->new->utf8->encode($res);
            $responder->([
                200,
                ['Content-Type' => 'text/plain'],
                [$json],
            ]);
  
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/GetUserInfo.pm ( view source; MetaCPAN )
escape);
use JSON;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = shift;
    return [
        200,
        ['Content-Type' => 'text/plain'],
        [JSON->new->encod
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/GetFriendInfo.pm ( view source; MetaCPAN )
escape);
use JSON;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = shift;
    return [
        200,
        ['Content-Type' => 'text/plain'],
        [JSON->new->encod
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/GetDiscuss.pm ( view source; MetaCPAN )
escape);
use JSON;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = shift;
    return [
        200,
        ['Content-Type' => 'text/plain'],
        [JSON->new->encod
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Plack/App/Openqq/SendSessMessage.pm ( view source; MetaCPAN )
::Openqq::SendSessMessage;
use parent qw(Plack::Component);
use URI::Escape qw(uri_unescape);
use JSON;
use Encode;;
sub call{
    my $self = shift;
    my $client = $self->{client};
    my $env  = sh
  };
            my $json = JSON->new->utf8->encode($res);
            $responder->([
                200,
                ['Content-Type' => 'text/plain'],
                [$json],
            ]);
  
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_get_discuss_list_info.pm ( view source; MetaCPAN )
use JSON;
use Encode;
sub Webqq::Client::_get_discuss_list_info {
    my $self = shift;
    my $ua = $self->{ua};
    return undef if $self->{type} ne 'smartqq';
    my $api_url = 'http://s.web2.qq.co
      my $json;
        eval{
            $json = JSON->new->utf8->decode($response->content()) ;
        };
        print $@ if $@ and $self->{debug};
        $json = {} unless defined $json;
       
 return undef if $json->{retcode}!=0;  
        for(@{ $json->{result}{dnamelist} }){
            $_->{name} = encode("utf8",$_->{name});
        } 
        return $json->{result}{dnamelist};
        
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_send_group_message.pm ( view source; MetaCPAN )
use JSON;
use Encode;
use Storable qw(dclone);
sub Webqq::Client::_send_group_message{
    my($self,$msg) = @_;
    #将整个hash从UTF8还原回uincode编码
    my $ua = $self->{asyn_ua};

    my $
$msg->{content}),[]];
    my %s = (
        group_uin   => $msg->{to_uin},
        content     => JSON->new->utf8->encode($content),
        msg_id      => $msg->{msg_id},
        clientid    => $self
$self->{qq_database}{user}{face} || "591";
    }
    my $post_content = [
        r           =>  JSON->new->utf8->encode(\%s),
    ]; 
    if($self->{type} eq 'webqq'){
        push @$post_content,(
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/get_qq_from_uin.pm ( view source; MetaCPAN )
use JSON;
use Webqq::Client::Util qw(console);
sub Webqq::Client::get_qq_from_uin{
    my $self = shift;
    my $uin = shift;
    my $cache_data =  $self->{cache_for_uin_to_qq}->retrieve($uin);
    re
 print $response->content(),"\n" if $self->{debug};
        my $json = JSON->new->utf8->decode( $response->content() );
        if($json->{retcode} !=0){
            console "从指定uin: $uin 查询
    $self->{cache_for_uin_to_qq}->store($uin,$json->{result}{account});
        $self->{cache_for_qq_to_uin}->store($json->{result}{account},$uin);
        return $json->{result}{account};
    }
}
1;
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_get_user_info.pm ( view source; MetaCPAN )
use JSON;
use Webqq::Client::Util qw(code2state code2client);
sub Webqq::Client::_get_user_info{
    my $self = shift;
    my $webqq_api_url   ='http://s.web2.qq.com/api/get_friend_info2';
    my $sma
       my $json = JSON->new->utf8->decode( $response->content() );    
        return undef if $json->{retcode} !=0;
        $json->{result}{state} = $self->{qq_param}{state};
        $json->{result}{
client_type} = 'web';
        return $json->{result};
    }
    else{return undef}
}
1;
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/doc/Client.pod ( view source; MetaCPAN )
生一个监听本地指定端口的HTTP服务器,用于接收api请求

返回数据完全为JSON格式,接口包括:

    获取个人信息        /openqq/get_user_info
    获取好友信息
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_send_message.pm ( view source; MetaCPAN )
use JSON;
use Encode;
use Storable qw(dclone);
sub Webqq::Client::_send_message{
    my($self,$msg) = @_;
    #将整个hash从UTF8还原为unicode
    my $ua = $self->{asyn_ua};
    my $callback = su
=> $msg->{to_uin},
        face    => $self->{qq_database}{user}{face} || 570,
        content => JSON->new->utf8->encode($content),
        msg_id  =>  $msg->{msg_id},
        clientid => $self->{qq_
$self->{qq_database}{user}{face} || "591";
    }
    my $post_content = [
        r           =>  JSON->new->utf8->encode(\%s),
    ];
    if($self->{type} eq 'webqq'){
        push @$post_content,(
 
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/get_single_long_nick.pm ( view source; MetaCPAN )
use JSON;
use Encode;
sub Webqq::Client::get_single_long_nick{
    my $self = shift;
    my $uin = shift;
    
    my $cache_data =  $self->{cache_for_single_long_nick}->retrieve($uin);    
    return
response->content(),"\n" if $self->{debug};
        my $json = JSON->new->utf8->decode( $response->content() );    
        return undef if $json->{retcode} !=0;
        #{"retcode":0,"result":[{"uin"
:308165330,"lnick":""}]}
        my $single_long_nick = encode("utf8",$json->{result}[0]{lnick});
        $self->{cache_for_single_long_nick}->store($uin,$single_long_nick);
        return $single_lon
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_get_vfwebqq.pm ( view source; MetaCPAN )
use JSON;
use Webqq::Client::Util qw(console);
sub Webqq::Client::_get_vfwebqq {
    my $self = shift;
    return 1 if $self->{type} ne 'smartqq';
    console "获取vfwebqq值...\n";
    my $api_url 
     print $response->content,"\n" if $self->{debug};
        my $json = JSON->new->utf8->decode($response->content);
        if($json->{retcode}!=0){
            console "获取vfwebqq值失败...\n"
;
            return 0;
        }
        $self->{qq_param}{vfwebqq} = $json->{result}{vfwebqq};
        return $json->{result}{vfwebqq};
    }
    else{   
        console "获取vfwebqq值失败...\
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_get_friends_state.pm ( view source; MetaCPAN )
use JSON;
use Webqq::Client::Util qw(code2state code2client);
sub Webqq::Client::_get_friends_state {
    my $self = shift;
    return undef if $self->{type} ne 'smartqq';
    my $ua = $self->{ua};
  
),"\n" if $self->{debug};
        my $json = JSON->new->utf8->decode( $response->content() );    
        return undef if $json->{retcode} !=0;
        for(@{$json->{result}}){
            $_->{client
_type} = code2client($_->{client_type});
            $_->{state} = $_->{status};
            delete $_->{status};
        }
        return $json->{result};
    }
    else{return undef}
}
1;
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/_get_user_friends.pm ( view source; MetaCPAN )
use JSON;
use Webqq::Client::Util qw(hash);
sub Webqq::Client::_get_user_friends{
    my $self = shift;
    my $api_url = 'http://s.web2.qq.com/api/get_user_friends2';
    my $ua = $self->{ua};
    my
$ua->post($api_url,[r=>JSON->new->utf8->encode(\%r)],@headers);
    if($response->is_success){
        print $response->content(),"\n" if $self->{debug};
        my $json = JSON->new->utf8->decode($re
sponse->content());
        return undef if $json->{retcode}!=0 ;
        my $friends_state = $self->_get_friends_state();
        my %categories ;
        my %info;
        my %marknames;
        my 
Webqq-Client ( S/SJ/SJDY/Webqq-Client-8.5.3.tar.gz, SJDY, 2015; MetaCPAN )
Webqq-Client/lib/Webqq/Client/Method/get_dwz.pm ( view source; MetaCPAN )
use JSON;
use Webqq::Client::Util qw(console);
sub Webqq::Client::get_dwz {
    my $self = shift;
    my $url = shift;
    my $api = 'http://dwz.cn/create.php';
    my $ua = $self->{ua};
    my $res;
alarm 0;
        if($res->is_success){
            my $json = JSON->new->utf8->decode($res->content);
            $dwz = $json->{tinyurl} if $json->{status}==0; 
        };
    };
    console "[Webqq:

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.