1. Go to this page and download the library: Download mralston/quake-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mralston / quake-sdk example snippets
useMralston\Quake\Client;
useMralston\Quake\Contact;
useMralston\Quake\Flow;
// Log in
$client = new Client(
$username,
$password,
$companyId,
$apiEndpoint
);
// Create contact
$contact = $client->createContact(
$firstName,
$lastName,
$mobileNumber
)
// Delete contact
$client->deleteContact($contact);
// Create flow instance
$flowInstance = $client->createFlowInstance(
$flow,
$contact,
$parameters
);
// Fetch flow instance by ID
$flowInstance = $client->showFlowInstance($id);
// Invite a flow instance (trigger the flow)
$client->inviteFlowInstance($flowInstance);
// Fetch all flow instancesforeach ($client->listFlowInstances() as $flowInstance) {
dump($flowInstance);
}
// Fetch all flowsforeach ($client->listFlows() as $flow) {
dump($flow);
}
// Fetch all entitiesforeach ($client->listEntities() as $entity) {
dump($entity);
}