Closed wfinley closed 8 years ago
Just thought I'd leave some sample wrapper code for those who are getting around to upgrading to 3.0. Below is some sample code for putListMember. Cheers!
` mc = new MailChimp( apiKey="YOURAPIKEY", // see http://kb.mailchimp.com/accounts/management/about-api-keys serviceURL="https://us1.api.mailchimp.com/3.0/", debug="true"); // note debug setting lists = mc.getLists(); newMember = mc.putListMember( listId="YOURLISTID", // see http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id data={ "email_address":"hey@hey.com", "status":"subscribed", "merge_fields" = {"FNAME":"Hey", "Now":"Finley","COMPANY":"Acme"} } );
Just thought I'd leave some sample wrapper code for those who are getting around to upgrading to 3.0. Below is some sample code for putListMember. Cheers!
`
mc = new MailChimp(
apiKey="YOURAPIKEY", // see http://kb.mailchimp.com/accounts/management/about-api-keys
serviceURL="https://us1.api.mailchimp.com/3.0/", debug="true"); // note debug setting lists = mc.getLists(); newMember = mc.putListMember(
listId="YOURLISTID", // see http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id data={ "email_address":"hey@hey.com", "status":"subscribed", "merge_fields" = {"FNAME":"Hey", "Now":"Finley","COMPANY":"Acme"} }
);