NAME

Meetup::API::v3 - Meetup API

SYNOPSIS

my $meetup = Meetup::API->new(
    version => 'v3',
);

$meetup->read_credentials;

print Dumper $meetup->group('Perl-User-Groups-Rhein-Main')->get;

METHODS

->new

my $m = Meetup::API->new();
$m->read_credentials();

Creates a new instance of the Meetup API.

The accessors can be set in the call to new.

->API_BASE

Used to set/get the base hostname used for requests.

The default value is taken from $Meetup::API::API_BASE and is https://api.meetup.com.

->user_agent

Used to set/get the Future::HTTP user agent

->json

Used to set/get the JSON::XS JSON decoder

->url_map

Used to set/get the hashref mapping functions to API urls

->api_key

The getter for the API key. See Meetup::API for how to obtain it and ->read_credentials for how to initialize it.

->url_for( $items, %options )

my $url = $m->url_for( 'group', foo => 'bar );

Creates and returns an URLfor the function group from url_map, interpolates the URL parameters and appends the remaining parameters to the URL.

->read_credentials( %options )

$m->read_credentials();

Looks for a file named meetup.credentials, parses it as JSON and reads the value applicationKey from it.

The following options are recognized:

filename

The full path and filename to use instead of searching for meetup.credentials.

config_dirs

Arrayref of directories which to search. The default directories are ., $ENV{HOME} and $ENV{USERPROFILE}, in that order.

->request( $method, $url, %params )

my $r = $meetup->request(...);

Helper to create a Future::HTTP which returns decoded JSON.

->parse_response( $body, $headers )

Helper to parse the data structure out of a JSON response from the API.

->group( $urlname )

my $info = $meetup->group('Perl-User-Groups-Rhein-Main');
print $info->{name};
print $info->{descriptions};
print $info->{next_event}->{time};

Returns information about a meetup group given its name in the URL.

->group_events( $urlname )

my $info = $meetup->group_events('Perl-User-Groups-Rhein-Main');
print $info->[0]->{name};
print $info->[0]->{venue};

Returns information about events of a meetup group given its name in the URL.

REPOSITORY

The public repository of this module is https://github.com/Corion/Meetup-API.

SUPPORT

The public support forum of this module is https://perlmonks.org/.

AUTHOR

Max Maischein corion@cpan.org

COPYRIGHT (c)

Copyright 2016-2018 by Max Maischein corion@cpan.org.

LICENSE

This module is released under the same terms as Perl itself.