function cc::cc in Constant Contact 7.3
Same name and namespace in other branches
- 6.3 class.cc.php \cc::cc()
- 6.2 class.cc.php \cc::cc()
Constructor method.
Sets default params. Constructs the correct API URL. Sets variables for the http_methods. If you want to change the APi key use the set_api_key() method
@access public
Parameters
string The username for your Constant Contact account:
string The password for your Constant Contact account:
string The API key for your Constant Contact developer account (deprecated):
File
- ./
class.cc.php, line 229 - Constant Contact PHP Class
Class
- cc
- @file Constant Contact PHP Class
Code
function cc($api_username, $api_password) {
// Initialize metadata properties.
$this->list_meta_data = new stdClass();
$this->member_meta_data = new stdClass();
$this->contact_meta_data = new stdClass();
$this->api_username = $api_username;
$this->api_password = $api_password;
$this->api_url .= '/ws/customers/' . rawurlencode($api_username) . '/';
$this->api_uri .= '/ws/customers/' . urlencode($api_username) . '/';
$this->http_user = $this->api_key . "%" . $api_username;
$this->http_pass = $api_password;
$this
->http_set_content_type($this->http_default_content_type);
}