I;
use warnings;
use strict;
use utf8;
use Digest::MD5 qw(md5 md5_hex);
use WWW::Mechanize;
use JSON;
=pod
=head1 NAME
VKontakte::API - Module for login into vkontakte.ru and sending requests
=h
;
$params->{'method'} = $method;
$params->{'timestamp'} = time();
$params->{'format'} = 'json';
$params->{'rnd'} = int(rand()*10000);
my $sig = defined $self->{'mid'} ? $self->{'mid'} :
_get_contents($query);
my $response = $mech->content();
utf8::encode($response);
return decode_json($response);
}
=head2 _params
prepares parameters for request
=cut
sub _params {
my $self =
h;
use warnings;
use strict;
use utf8;
use Digest::MD5 qw(md5 md5_hex);
use WWW::Mechanize;
use JSON;
=pod
=head1 NAME
VKontakte::API::OAuth - Module for login into vkontakte.ru using OAuth 2.0 a
$mech->get($query);
my $response = $mech->content();
utf8::encode($response);
my $h=decode_json($response);
return undef unless(defined $h->{'access_token'});
$self->{'access_token'}=$h-
= $mech->get($query);
my $response = $mech->content();
utf8::encode($response);
return decode_json($response);
}
sub _params {
my $self = shift;
my $params = shift;
return unless ( ref $par