It's php wrapper for PowerLink CRM Api, that uses Guzzle HTTP Framework.
composer require stelzer/php-powerlink
<?php
require_once "vendor/autoload.php";
use \PowerLink\PowerLink as API;
$payload = array('your payload');
$token_id = '<YOUR TOKEN ID>';
$client = new API($token_id);
$client->create();
Params
- object_type —
string
- params —
array
$object_type = 'crmorder';
$params = array('your object');
$client->create($object_type, $params);
Params
- object_type —
string
- object_id —
int
- params —
array
$object_type = 'crmorder';
$object_id = 1;
$params = array('your object');
$client->update($object_type, $object_id, $params);
Params
- object_type —
string
- object_id —
int
$client->delete($object_type, $object_id);
use \PowerLink\PowerLink as API;
use \PowerLink\Query;
$token_id = '<YOUR TOKEN ID>';
$client = new API($token_id);
$query = new Query();
$query->setQuery(array(
array('name', '=', '10'), 'AND', array('second_field', '>=', 20)
));
$query->setPageNumger(2);
$query->setPageSize(20);
$query->setFields(array('first_field', 'second_field'));
$query->setOrderBy('third_field', 'asc');
$client->query($query);