Code Monkey home page Code Monkey logo

Comments (5)

benbowler avatar benbowler commented on June 17, 2024

Thanks for taking to the time to look at that. Is it completely working for you now?

from codeigniter-mailchimp-api-v2.

vbujak avatar vbujak commented on June 17, 2024

here is correct __construct:

$this->ci =& get_instance();
$this->ci->load->config('mailchimp', TRUE);
$this->api_key = $this->ci->config->item('api_key', 'mailchimp');
$this->api_endpoint = $this->ci->config->item('api_endpoint', 'mailchimp');

list(, $datacentre) = explode('-', $this->api_key);
$this->api_endpoint = str_replace('<dc>', $datacentre, $this->api_endpoint);

from codeigniter-mailchimp-api-v2.

benbowler avatar benbowler commented on June 17, 2024

Great can you submit a pull request? I'll ad it in. If you're not bothered about the ref back I'll just build it in and commit myself.

I'm back using this again!

from codeigniter-mailchimp-api-v2.

tcgumus avatar tcgumus commented on June 17, 2024

Also we need to call the function in lowercase like this.

    $this->load->library('mailchimp_library');
    $lists = $this->mailchimp_library->call('lists/list');

This solved my problem.

from codeigniter-mailchimp-api-v2.

momon avatar momon commented on June 17, 2024

For those having issues with this, the problem is rather simple... in the construct there is a line that is actually breaking things. Specifically:

$this->api_endpoint = $this->ci->config->item('api_endpoint', 'mailchimp');

This is overwriting $this->api_endpoint from the value set on the class: private $api_endpoint = 'https://.api.mailchimp.com/2.0/';

So by the time you get to $this->api_endpoint = str_replace('', $datacentre, $this->api_endpoint); the value that it is expecting is no longer there.

The fix is simply to comment out or remove the line:

$this->api_endpoint = $this->ci->config->item('api_endpoint', 'mailchimp');

Cheers,
Jose R. Lopez

from codeigniter-mailchimp-api-v2.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.