Net::uTorrent;
use URI;
use URI::QueryParam;
use HTTP::Request::Common;
use LWP::UserAgent;
use JSON::XS;
use HTML::TreeBuilder;
use 5.010000;
use strict;
use warnings;
require Exporter;
our @ISA
:Request->new;
our $ua = LWP::UserAgent->new;
our $html_tree = HTML::TreeBuilder->new;
our $json = JSON::XS->new;
our $cid; #cache id
our $error;
sub new {
my ($class,%args) = @_;
my $self
%params;
my $json_text = api_query_result(@args);
my $decoded_json = $json->decode($json_text);
$cid = $decoded_json->{torrentc};
my @torrent = qw();
for (@{$decoded_json->{torrents}})