se
DateTime
Exception::Class
FindBin
HTTP::Request
HTTP::Response
IO::Interactive
JSON::RPC::Common
JSON::RPC::LWP
LWP::UserAgent
Math::Round
MIME::Lite
Moose
Number::Format
Scalar::Util
qw(sum max min);
use List::MoreUtils qw(any part uniq);
use Hash::Merge qw(merge);
use JSON qw(to_json from_json);
require YAML::Any;
use Carp;
use Data::Dumper;
sub new {
my ($self, $client, $
.json";
my $data;
if (-e $cache_file) {
local $/;
eval {
open( my $fh, '<', $cache_file );
my $json_text = <$fh>;
$data = from_json( $json
self->{config}->{cache_dir} . "/buildings.json";
$self->{cache}->{cache_time} = time;
if(open( my $fh, '>', $cache_file)) {
print $fh to_json($self->{cache});
close $fh;
',
fields => [qw(code text)],
},
);
use namespace::clean;
use Moose;
extends 'JSON::RPC::LWP';
has client => (
is => 'ro',
isa => 'Games::Lacuna::Client',
required => 1,
w
acuna::Client::Module; # base module class
use Data::Dumper ();
use YAML::Any ();
#our @ISA = qw(JSON::RPC::Client);
use Class::XSAccessor {
getters => [qw(
rpc
uri name password api_key
The return values of the methods are (currently) just exactly C<result> portion
of the deflated JSON responses. This is subject to change!
On failure, the methods C<croak> with a simple to parse me
(Log out happens in the
destructor.)
All methods that take a session id as first argument in the
JSON-RPC API B<DO NOT REQUIRE> that you pass the session_id
manually. This is handled internally and t