{"action":"created","issue":{"url":"https://api.github.com/repos/Sammaye/yii2-mailchimp/issues/2","labels_url":"https://api.github.com/repos/Sammaye/yii2-mailchimp/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Sammaye/yii2-mailchimp/issues/2/comments","events_url":"https://api.github.com/repos/Sammaye/yii2-mailchimp/issues/2/events","html_url":"https://github.com/Sammaye/yii2-mailchimp/issues/2","id":59706746,"number":2,"title":"Error when using example code","user":{"login":"con322","id":6308063,"avatar_url":"https://avatars.githubusercontent.com/u/6308063?v=3","gravatar_id":"","url":"https://api.github.com/users/con322","html_url":"https://github.com/con322","followers_url":"https://api.github.com/users/con322/followers","following_url":"https://api.github.com/users/con322/following{/other_user}","gists_url":"https://api.github.com/users/con322/gists{/gist_id}","starred_url":"https://api.github.com/users/con322/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/con322/subscriptions","organizations_url":"https://api.github.com/users/con322/orgs","repos_url":"https://api.github.com/users/con322/repos","events_url":"https://api.github.com/users/con322/events{/privacy}","received_events_url":"https://api.github.com/users/con322/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-03T21:16:51Z","updated_at":"2015-03-04T17:51:25Z","closed_at":"2015-03-04T08:29:02Z","body":"    $mc = new sammaye\\mailchimp\\Mailchimp(['apikey' => 'lalala']);\r\n    $mc->lists->getList();`\r\n\r\nWhen I use your example code I get the following error\r\n\r\n    Class 'frontend\\controllers\\sammaye\\mailchimp\\Mailchimp' not found\r\n\r\nHowever if i use \r\n    <?php \r\n    namespace frontend\\controllers;\r\n\r\n    use sammaye\\mailchimp\\Mailchimp;\r\n    .....\r\n    $api_key = new Mailchimp(['apikey' => 'xxxxxxxxxxxxx']);\r\n    $mc = new Mailchimp;\r\n    $mc->lists->getList();\r\n\r\nI get the following error \r\n\r\n    You must provide a MailChimp API key\r\n\r\nAlso can I use the following code \r\n\r\n    $list_id = \"xxxxxxxxxxx\";\r\n\r\n     $Mailchimp = new Mailchimp( $api_key );\r\n     $Mailchimp_Lists = new Mailchimp_Lists( $Mailchimp );\r\n     $subscriber = $Mailchimp_Lists->subscribe( $list_id, array( 'email' => $email ) );\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Sammaye/yii2-mailchimp/issues/comments/77208670","html_url":"https://github.com/Sammaye/yii2-mailchimp/issues/2#issuecomment-77208670","issue_url":"https://api.github.com/repos/Sammaye/yii2-mailchimp/issues/2","id":77208670,"user":{"login":"con322","id":6308063,"avatar_url":"https://avatars.githubusercontent.com/u/6308063?v=3","gravatar_id":"","url":"https://api.github.com/users/con322","html_url":"https://github.com/con322","followers_url":"https://api.github.com/users/con322/followers","following_url":"https://api.github.com/users/con322/following{/other_user}","gists_url":"https://api.github.com/users/con322/gists{/gist_id}","starred_url":"https://api.github.com/users/con322/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/con322/subscriptions","organizations_url":"https://api.github.com/users/con322/orgs","repos_url":"https://api.github.com/users/con322/repos","events_url":"https://api.github.com/users/con322/events{/privacy}","received_events_url":"https://api.github.com/users/con322/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T17:51:25Z","updated_at":"2015-03-04T17:51:25Z","body":"Apologies for creating an issue which didn't exists.\r\n\r\nIf anyone stumbles upon this then here was my code.\r\n\r\n    \t\t    $api_key = \"xxxxxxxxx\";\r\n\r\n\t\t    $mc = new Mailchimp(['apikey' => $api_key]);\r\n\r\n\t\t\t$result = $mc->call('lists/subscribe', array(\r\n\t\t\t                'id'                => 'xxxxxx',\r\n\t\t\t                'email'             => array('email'=>'xxxxxx@xxxxxx.com'),\r\n\t\t\t                'merge_vars'        => array('FNAME'=>'xxxxxx', 'LNAME'=>'xxxxxx'),\r\n\t\t\t                'double_optin'      => false,\r\n\t\t\t                'update_existing'   => true,\r\n\t\t\t                'replace_interests' => false,\r\n\t\t\t                'send_welcome'      => false,\r\n\t\t\t            ));\r\n\t\t\tprint_r($result);"}}