{"id":19081505,"url":"https://github.com/intracto/campaignmonitorbundle","last_synced_at":"2025-10-30T21:20:37.326Z","repository":{"id":56992791,"uuid":"63778985","full_name":"Intracto/CampaignMonitorBundle","owner":"Intracto","description":"A Symfony wrapper for the Campaign Monitor PHP library","archived":false,"fork":false,"pushed_at":"2017-11-28T10:39:57.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-15T10:25:24.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Intracto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-20T12:18:46.000Z","updated_at":"2018-11-06T14:39:38.000Z","dependencies_parsed_at":"2022-08-21T10:40:52.552Z","dependency_job_id":null,"html_url":"https://github.com/Intracto/CampaignMonitorBundle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2FCampaignMonitorBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2FCampaignMonitorBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2FCampaignMonitorBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intracto%2FCampaignMonitorBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Intracto","download_url":"https://codeload.github.com/Intracto/CampaignMonitorBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249484838,"owners_count":21280014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T02:36:36.384Z","updated_at":"2025-10-30T21:20:32.273Z","avatar_url":"https://github.com/Intracto.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IntractoCampaignMonitorBundle\n\nWelcome to the IntractoCampaignMonitorBundle - a Symfony wrapper for the Campaign Monitor PHP library.\n\nFor details on how to get started with IntractoCampaignMonitorBundle, keep on reading.\n\n## What's inside?\n\nThe IntractoCampaignMonitorBundle has following features:\n- All results from the API are hydrated to different models.\n- Paged results are returned as a Paginator instance with a method to get the next set of records.\n- A defensive programming approach in all classes to prevent broken instances.\n\nAll code included in the IntractoCampaignMonitorBundle is released under the MIT or BSD license.\n\n## Installation\n\n### Step 1 - Install IntractoCampaignMonitorBundle using composer\nEdit your composer.json to include the bundle as a dependency.\n\n```js\n{\n    \"require\": {\n        \"intracto/campaign-monitor-bundle\": \"0.1\",\n    }\n}\n```\n\nOpen up a command line window and tell composer to download the new dependency.\n\n``` bash\n$ php composer.phar update intracto/campaign-monitor-bundle\n```\n\n### Step 2 - Register the bundle in your AppKernel file\n\n\n``` php\n\u003c?php\n// app/AppKernel.php\n\npublic function registerBundles()\n{\n    $bundles = array(\n        ...\n        new Intracto\\CampaignMonitorBundle\\IntractoCampaignMonitorBundle(),\n    );\n}\n```\n\n### Configure the bundle to use your Campaign Monitor API key\n\n``` yml\n// app/config/config.yml\n\nintracto_campaign_monitor:\n    api_key: YOUR_API_KEY\n\n```\n\n## Usage\nThere are 4 factory services at your disposal.\n\n- itr.campaign_monitor.factory.client_connector\n- itr.campaign_monitor.factory.list_connector\n- itr.campaign_monitor.factory.segment_connector\n- itr.campaign_monitor.factory.campaign_connector\n\nEach of these services implements the ConnectorFactory interface, which has one public method 'getConnectorForId', which accepts an id in the form of a string and returns a Connector. \n\nHere is an example of how to use the ClientConnectorFactory service.\n\n``` php\n\u003c?php\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass ClientController extends Controller\n{\n\t/**\n\t* @var Request $request\n\t* @return Response\n\t*/\n\tpublic function subscriberListsAction(Request $request)\t\n\t{\n\t\t$clientConnectorFactory = $this-\u003eget('itr.campaign_monitor.factory.client_connector');\n\t\t\n\t\t$clientId = $this-\u003egetParameter('your_client_id');\n\t\t$clientConnector = $clientConnectorFactory-\u003egetConnectorForId($clientId);\n\t\t\n\t\t/** @var ListReference[]|ArrayCollection $lists */\n\t\t$lists = $clientConnector-\u003egetLists();\n\t\t\n\t\treturn $this-\u003erender('your_template_file.html.twig', ['lists' =\u003e $lists]);\n\t}\n\t\n\t...\n}\n\n```\nHave a look inside the Connector classes to check out what methods are available. Nearly all methods will return a response in OOP-style.\n\nPaginated results like subscribers lists, will be put into a Paginator instance. This class has a next() method, that will execute another request to the Campaign Monitor API for the next page.\n\nNot all methods of the CampaignMonitor API are available yet. If some are missing, feel free to open up an issue. \n\nPull requests are also greatly appreciated!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintracto%2Fcampaignmonitorbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintracto%2Fcampaignmonitorbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintracto%2Fcampaignmonitorbundle/lists"}