WebService::ZombiesRun - Access run information from the Zombies, Run! game
version 0.01
use WebService::ZombiesRun; my $zombies = WebService::ZombiesRun->new( player => 'pjf' ); my $runs = $zombies->runs_raw; foreach my $run (@$runs) { say "Ran $run->{distance} metres, burning $run->{energy} calories"; }
This module provides a thin interface that crawls the Zombies, Run! website for your running stats.
As a thin interface, any method ending with _raw is simply returning the JSON as used internally by the Zombies, Run! website. These structures may change.
_raw
my $runs = $zombies->runs_raw; foreach my $run (@$runs) { say "Ran $run->{distance} metres, burning $run->{energy} calories"; }
Returns an array reference of run records. These are returned directly translated from the JSON provided by the underlying server.
my $runs = $zombies->total_runs;
Returns the total runs completed by the player.
my $metadata = $zombies->meta_raw;
Returns the contents of the 'meta' data in the manfiest. At the time of writing, this is returned as a hash in the following form, which is directly interpreted from the JSON returned by the server:
{ 'total_count' => 12, 'offset' => 0, 'limit' => 1000, 'previous' => undef, 'next' => undef }
Cmdline tool for retrieving information. Also a great proof of concept for using this module.
The Zombies, Run! game.
Paul Fenwick <pjf@cpan.org>
This software is copyright (c) 2014 by Paul Fenwick.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::ZombiesRun, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::ZombiesRun
CPAN shell
perl -MCPAN -e shell install WebService::ZombiesRun
For more information on module installation, please visit the detailed CPAN module installation guide.