Exobrain-Foursquare
view release on metacpan or search on metacpan
lib/Exobrain/Agent/Foursquare.pm view on Meta::CPAN
}
1;
__END__
=pod
=head1 NAME
Exobrain::Agent::Foursquare - Roles for Exobrain Foursquare agents
=head1 VERSION
version 0.01
=head1 SYNOPSIS
use Moose;
with 'Exobrain::Agent::Foursquare'
=head1 DESCRIPTION
This role provides useful methods and attributes for agents wishing
to integrate with Foursquare
=head1 METHODS
=head2 mech
my $mech = $self->mech;
Returns a L<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 L</foursquare_api>.
=head2 auth_token
my $token = $self->auth_token
Returns the auth_token, taken from the user's configuration.
Primarily used by L</foursquare_api>.
=head2 api_base
Returns the Foursquare API base path to use. By default this is
C<https://api.foursquare.com/v2>.
Primarily used by L</foursquare_api>.
=head2 foursquare_api
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.
=for Pod::Coverage component_name
=head1 AUTHOR
Paul Fenwick <pjf@cpan.org>
=head1 COPYRIGHT AND LICENSE
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.
=cut
( run in 1.764 second using v1.01-cache-2.11-cpan-800906f7e73 )