Exobrain::Agent::Foursquare - Roles for Exobrain Foursquare agents
version 0.01
use Moose; with 'Exobrain::Agent::Foursquare'
This role provides useful methods and attributes for agents wishing to integrate with Foursquare
my $mech = $self->mech;
Returns a WWW::Mechanize object. By default its stack depth is set to zero (which avoid memory leaks in long-running processes), and autocheck is on (so it will throw an exception on error).
Primarily used by "foursquare_api".
my $token = $self->auth_token
Returns the auth_token, taken from the user's configuration.
Returns the Foursquare API base path to use. By default this is https://api.foursquare.com/v2.
https://api.foursquare.com/v2
my $checkins = $self->foursquare_api('checkins/recent', afterTimestamp => $last_check, );
Calls the Foursquare API endpoint specified in the first argument, and converts the response into a Perl data structure. All additional named arguments are considered to be parameters that will be appended to the call.
This method automatically adds auth tokens and version strings as appropriate.
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 Exobrain::Foursquare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Exobrain::Foursquare
CPAN shell
perl -MCPAN -e shell install Exobrain::Foursquare
For more information on module installation, please visit the detailed CPAN module installation guide.