KlaviyoApi
class KlaviyoApi (View source)
The main Klaviyo API class for communicating with the Klaviyo API.
Properties
static | $endPoint | ||
static | $dataMap |
Methods
The constructor for KlaviyoApi.
Retrieve the model type based on the percieved model type.
Helper method for creating a new API object.
Retrieve a specific option.
Set a specific option.
Retrieve an an array of all available options.
Perform a request against the API.
Prepare the options array before use in the request.
Details
at line line 40
__construct(ClientInterface $http_client, $api_key = '', $options = array())
The constructor for KlaviyoApi.
at line line 71
static string
getModelType(string $model_type, bool $reverse = FALSE)
Retrieve the model type based on the percieved model type.
Sometimes Klaviyo changinges the model type by placing "$" in front of them also I am not sure if there are other mutations that might happen on this or if they might change. In order to attempt to prevent this we will use a getter for the Klaviyo model type.
at line line 94
static KlaviyoApi
create($api_key = '', $options = array())
Helper method for creating a new API object.
at line line 109
mixed
getOption(string $option)
Retrieve a specific option.
at line line 129
$this
setOption(string $option, mixed $value)
Set a specific option.
at line line 138
getAllOptions()
Retrieve an an array of all available options.
at line line 155
ResponseInterface
request($method, $resource, $options = array(), $public = FALSE)
Perform a request against the API.
at line line 192
array
prepareRequestOptions($method, $options, $public = FALSE)
Prepare the options array before use in the request.