2017 © Pedro Peláez
 

symfony-bundle mailchimp-bundle

Mailchimp v2.0 API Wrapper

image

prolixtechnikos/mailchimp-bundle

Mailchimp v2.0 API Wrapper

  • Thursday, November 21, 2013
  • by ravindrakhokharia
  • Repository
  • 2 Watchers
  • 0 Stars
  • 212 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Prolix MailchimpBundle for API V2.0

Symfony2.x bundle for MailChimp API V2 and Export API API V1 Wrapper bundle that makes accessing Mailchimp functions easily in object oriented using method chaining, (*1)

License, (*2)

ProlixMailChimpBundle released under MIT LICENSE, (*3)

Supported API Methods

Campaigns related, (*4)

  1. campaigns/create
  2. campaigns/content
  3. campaigns/list
  4. campaigns/delete
  5. campaigns/pause
  6. campaigns/ready
  7. campaigns/replicate
  8. campaigns/ready
  9. campaigns/resume
  10. campaigns/send
  11. campaigns/send-test
  12. campaigns/segment-test
  13. campaigns/schedule
  14. campaigns/schedule-batch
  15. campaigns/unschedule
  16. campaigns/update

Lists related, (*5)

  1. lists/abuse-reports
  2. lists/activity
  3. lists/subscribe
  4. lists/unsubscribe
  5. lists/member-info
  6. lists/interest-groupings
  7. lists/interest-grouping-add
  8. lists/interest-grouping-del
  9. lists/interest-grouping-update
  10. lists/interest-group-add
  11. lists/interest-group-update
  12. lists/interest-group-del

Templates related, (*6)

  1. templates/add
  2. templates/list
  3. templates/del
  4. templates/info
  5. templates/undel

Need support for a method not on the list submit an issue, (*7)

Setup

Step 1: Download ProlixMailchimp using composer

Add ProlixMailchimp in your composer.json:, (*8)

{
    "require": {
        "prolixtechnikos/mailchimp-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:, (*9)

``` bash $ php composer.phar update "prolixtechnikos/mailchimp-bundle", (*10)


Composer will install the bundle to your project's `vendor/prolixtechnikos/mailchimp-bundle` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php get('mailchimp'); ?>

Examples

Create new campaign

``` php get('mailchimp.campaign'); $data = $campaignApi->create('regular', array( 'list_id' => 'xxxxxxxx', 'from_name' => 'Ravindra Khokharia', 'from_email' => 'ravindrakhokharia@gmail.com', 'subject' => 'Subscribe to Prolix NewsLetter', 'to_name' => 'ProlixTechnikos Subscriber'), array( 'archive' => 'test' 'sections' => array(), 'text' => 'test', 'html' => 'Test HTML Data', 'url' => 'http://www.prolixtechnikos.com', )); var_dump($data); ?>, (*11)

###Delete existing campaign
``` php
get('mailchimp.campaign');
    $data = $campaignApi->setCampaignId('xxxxxxxx')->delete();

    var_dump($data);
?>

Send campaign

``` php get('mailchimp.campaign'); $data = $campaignApi->setCampaignId('xxxxxxxx')->send(); var_dump($data); ?>, (*12)


###Subscribe new user to list ``` php <?php $listApi = $this->get('mailchimp.list'); $data = $listApi->subscribe('subscriber@prolixtechnikos.com'); var_dump($data); ?>

Note that the user will be subscriber to the default list set in config.yml if you want to change the list for this time only, you can use php get('mailchimp.list'); $data = $listApi->setListId('xxxxxxx') ->subscribe('subscriber@prolixtechnikos.com'); var_dump($data); ?>, (*13)

The Versions

21/11 2013

dev-master

9999999-dev https://github.com/prolixtechnikos/mailchimp-bundle

Mailchimp v2.0 API Wrapper

  Sources   Download

MIT

The Requires

 

api newsletter template symfony mailchimp subscribe campaign lists-groups