ListService
class ListService extends BaseService (View source)
The list manager class used to handle lists.
Traits
Methods
Reteive all records for the specified paginated resource.
Retrieve the records from a specific page.
Retrieve a specific page from Klaviyo.
Retrieve all lists from Klaviyo.
Get lists from a specific page.
Create a new list.
Check if the specified members are in the list by email address.
Check if the specified members are in the segment by email address.
Add a person to an existing List.
Details
in BaseService at line line 28
__construct(KlaviyoApi $api)
The constructor for the list manager class.
in BaseService at line line 35
static
create(KlaviyoApi $api)
Instantiates a new instance of this class.
in BaseService at line line 46
string
getResourcePath($resource)
Retrieve the full resource path.
in PagerTrait at line line 15
getApi()
Retrieve the KlaviyoApi service object.
in PagerTrait at line line 28
array
getAllRecords($resource, $query_parameters = array())
Reteive all records for the specified paginated resource.
in PagerTrait at line line 50
array
getRecordsFromSpecificPage($resource, $page, $count, $query_parameters = array())
Retrieve the records from a specific page.
in PagerTrait at line line 66
array
getPage($resource, $page, $count = 50, $query_parameters = array())
Retrieve a specific page from Klaviyo.
at line line 36
array
getAllLists()
Retrieve all lists from Klaviyo.
at line line 51
array
getListsFromPage(int $page, int $count)
Get lists from a specific page.
at line line 112
array
checkMembersAreInList(ListModel $list, array $emails)
Check if the specified members are in the list by email address.
at line line 124
checkMembersAreInSegment(ListModel $segment, $emails)
Check if the specified members are in the segment by email address.
at line line 144
PersonListModel
addPersonToList(ListModel $list, PersonModel $person, bool $confirm_opt_in = TRUE)
Add a person to an existing List.