Skip to content

Instantly share code, notes, and snippets.

@klhall1987
Created April 8, 2016 14:32
Show Gist options
  • Save klhall1987/c78bb4242b3e9332051c2af984892b2a to your computer and use it in GitHub Desktop.
Save klhall1987/c78bb4242b3e9332051c2af984892b2a to your computer and use it in GitHub Desktop.
<?php
//Does the string 'members/signup' do? I see you do this quite a bit in mailchimp as well
//I didn't see
$this->response = $this->emma->make_request('members/signup', 'POST', $member_data);
//This is the method you are calling inside the Emma library.
//I'm just trying to get my head wrapped around this concept.
/**
* Make a request to the Emma API
*
* @param string $api_method The API method to be called
* @param string $http_method The HTTP method to be used (GET, POST, PUT, DELETE, etc.)
* @param array $data Any data to be sent to the API
* @return string|array API request results
**/
function make_request($api_method, $http_method = NULL, $data = NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment