dolibarr 21.0.0-alpha
|
Public Member Functions | |
__construct () | |
Constructor. | |
get ($id) | |
Get properties of a target object. | |
index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='', $pagination_data=false) | |
List targets. | |
post ($request_data=null) | |
Create target object. | |
put ($id, $request_data=null) | |
Update target. | |
delete ($id) | |
Delete target. | |
listOfTriggers () | |
Get the list of all available triggers. | |
Public Member Functions inherited from DolibarrApi | |
__construct ($db, $cachedir='', $refreshCache=false) | |
Constructor. | |
Protected Member Functions | |
_cleanObjectDatas ($object) | |
Clean sensible object datas. | |
Protected Member Functions inherited from DolibarrApi | |
_checkValForAPI ($field, $value, $object) | |
Check and convert a string depending on its type/name. | |
_filterObjectProperties ($object, $properties) | |
Filter properties that will be returned on object. | |
_checkFilters ($sqlfilters, &$error='') | |
Return if a $sqlfilters parameter is valid Function no more used. | |
Private Member Functions | |
_validate ($data) | |
Validate fields before create or update object. | |
_fetch ($rowid, $ref='') | |
Fetch properties of a target object. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from DolibarrApi | |
static | _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') |
Check access by user to a given resource. | |
static | _forge_criteria_callback ($matches) |
Function to forge a SQL criteria from a Generic filter string. | |
Definition at line 27 of file api_webhook.class.php.
|
protected |
Clean sensible object datas.
Object | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 312 of file api_webhook.class.php.
References $object.
|
private |
Fetch properties of a target object.
Return an array with target information
int | $rowid | Id of target party to load (Use 0 to get a specimen record, use null to use other search criteria) |
string | $ref | Reference of target party, name (Warning, this can return several records) |
RestException |
Definition at line 398 of file api_webhook.class.php.
References _cleanObjectDatas().
Referenced by get().
|
private |
Validate fields before create or update object.
array | $data | Datas to validate |
RestException |
Definition at line 293 of file api_webhook.class.php.
Referenced by post().
Webhook::delete | ( | $id | ) |
Delete target.
int | $id | Target ID |
Definition at line 229 of file api_webhook.class.php.
References $id.
Webhook::get | ( | $id | ) |
Get properties of a target object.
Return an array with target information
int | $id | Id of target to load |
RestException |
Definition at line 66 of file api_webhook.class.php.
Webhook::index | ( | $sortfield = "t.rowid", | |
$sortorder = 'ASC', | |||
$limit = 100, | |||
$page = 0, | |||
$sqlfilters = '', | |||
$properties = '', | |||
$pagination_data = false ) |
List targets.
Get a list of targets
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "((t.nom:like:'TheCompany%') or (t.name_alias:like:'TheCompany%')) and (t.datec:<:'20160101')" |
string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
bool | $pagination_data | If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0* |
Definition at line 85 of file api_webhook.class.php.
References _cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().
Webhook::listOfTriggers | ( | ) |
Get the list of all available triggers.
@url GET triggers
Definition at line 260 of file api_webhook.class.php.
Webhook::post | ( | $request_data = null | ) |
Create target object.
array | $request_data | Request datas |
Definition at line 164 of file api_webhook.class.php.
References DolibarrApi\_checkValForAPI(), and _validate().
Webhook::put | ( | $id, | |
$request_data = null ) |
Update target.
int | $id | Id of target to update |
array | $request_data | Datas |
RestException | 401 |
RestException | 404 |
RestException | 500 |
Definition at line 198 of file api_webhook.class.php.
References $id, and DolibarrApi\_checkValForAPI().