forked from arcanez/WWW-Mailchimp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
51 lines (37 loc) · 1.77 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
NAME
WWW::Mailchimp - Perl wrapper around the Mailchimp v1.3 API
SYNOPSIS
use strict; use WWW::Mailchimp
my $mailchimp = WWW::Mailchimp->new(apikey => $apikey); # defaults (
datacenter => 'us1', timeout => 5, output_format => 'json', api_version
=> 1.3 )
my $campaigns = $mailchimp->campaigns; my $lists = $mailchimp->lists; my
$subscribers = $mailchimp->listMembers( $lists->[0]->{id} ); my $ok =
$mailchimp->listSubscribe( id => $lists->[0]->{id}, email_address =>
'[email protected]', update_existing => 1, merge_vars => [ FNAME => 'foo',
LNAME => 'bar' ] );
DESCRIPTION
WWW::Mailchimp is a simple Perl wrapper around the Mailchimp API v1.3.
It is as simple as creating a new WWW::Mailchimp object and calling
->method Each key/value pair becomes part of a query string, for
example:
$mailchimp->listSubscribe( id => 1, email_address => '[email protected]' );
results in the query string:
?method=listSubscribe&id=1&[email protected] apikey, output, etc
are tacked on by default. This is also uri_escaped
BUGS
Currently, this module is hardcoded to JSON::from_json the result of the
LWP request. This should be changed to be dependent on the
output_format. Patches welcome.
I am also rather sure handling of merge_vars can be done better. If it
isn't working properly, you can always use a key of 'merge_vars[FNAME]',
for example.
SEE ALSO
Mail::Chimp::API - Perl wrapper around the Mailchimp v1.2 API using
XMLRPC
AUTHOR
Justin Hunter <[email protected]>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Justin Hunter
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.