| 1 |
<?php |
| 2 |
require('sopresto.php'); |
| 3 |
$public = 'XXX'; |
| 4 |
$secret = 'YYY'; |
| 5 |
$version = '1.3'; // or '2.0' |
| 6 |
|
| 7 |
$sopresto = new Sopresto_MailChimp($public, $secret, $version); |
| 8 |
|
| 9 |
if ( $version == '2.0' ) { |
| 10 |
// First underscore will be changed for a slash. |
| 11 |
// Remaning underscores will be changed by a dash |
| 12 |
// Ie.- to call 'helper/search-members' you should use $sopresto->helper_search_members() |
| 13 |
|
| 14 |
$response = $sopresto->campaigns_list(array(), 0, 2); |
| 15 |
} else { |
| 16 |
$response = $sopresto->campaigns(array(), 0, 2); |
| 17 |
} |
| 18 |
|
| 19 |
print_r($response); |
| 20 |
|
| 21 |
|