Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Move base and contact lists to V3
  • Loading branch information
erik-ropez committed Oct 21, 2020
commit b4411b36a8495991478daaa86a1bb236b9fd09ec
2 changes: 1 addition & 1 deletion src/Ctct/Components/Contacts/ContactList.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct($list_id = null) {
*/
public static function create(array $props) {
$contact_list = new ContactList();
$contact_list->id = parent::getValue($props, "id");
$contact_list->id = parent::getValue($props, "list_id");
$contact_list->name = parent::getValue($props, "name");
$contact_list->status = parent::getValue($props, "status");
$contact_list->contact_count = parent::getValue($props, "contact_count");
Expand Down
4 changes: 2 additions & 2 deletions src/Ctct/Services/ListService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function getLists($accessToken, Array $params = array()) {
}

$lists = array();
foreach (json_decode($response->getBody(), true) as $contact) {
$lists[] = ContactList::create($contact);
foreach (json_decode($response->getBody(), true)['lists'] as $list) {
$lists[] = ContactList::create($list);
}

return $lists;
Expand Down
4 changes: 2 additions & 2 deletions src/Ctct/Util/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Config {
* REST endpoints
*/
'endpoints' => array(
'base_url' => 'https://api.constantcontact.com/v2/',
'base_url' => 'https://api.cc.email/v3/',
'account_verified_addresses' => 'account/verifiedemailaddresses',
'account_info' => 'account/info',
'activity' => 'activities/%s',
Expand All @@ -27,7 +27,7 @@ class Config {
'add_contacts_activity' => 'activities/addcontacts',
'contact' => 'contacts/%s',
'contacts' => 'contacts',
'lists' => 'lists',
'lists' => 'contact_lists',
'list' => 'lists/%s',
'list_contacts' => 'lists/%s/contacts',
'contact_lists' => 'contacts/%s/lists',
Expand Down