dolibarr  13.0.2
Public Member Functions | Private Member Functions | List of all members
ZapierApi Class Reference
+ Inheritance diagram for ZapierApi:
+ Collaboration diagram for ZapierApi:

Public Member Functions

 __construct ()
 Constructor. More...
 
 get ($id)
 Get properties of a hook object. More...
 
 getModulesChoices ()
 Get list of possibles choices for module. More...
 
 index ($sortfield="t.rowid", $sortorder= 'ASC', $limit=100, $page=0, $sqlfilters= '')
 List hooks. More...
 
 post ($request_data=null)
 Create hook object. More...
 
 delete ($id)
 Update hook. More...
 
 _cleanObjectDatas ($object)
 Clean sensible object datas. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir= '', $refreshCache=false)
 Constructor. More...
 

Private Member Functions

 validate ($data, $fields)
 Validate fields before create or update object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DolibarrApi
 _cleanObjectDatas ($object)
 Executed method when API is called without parameter. More...
 
 _checkFilters ($sqlfilters)
 Return if a $sqlfilters parameter is valid. More...
 
- Static Protected Member Functions inherited from DolibarrApi
static _checkAccessToResource ($resource, $resource_id=0, $dbtablename= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid')
 Check user access to a resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria. More...
 

Detailed Description

Definition at line 35 of file api_zapier.class.php.

Constructor & Destructor Documentation

ZapierApi::__construct ( )

Constructor.

GET /

Definition at line 56 of file api_zapier.class.php.

References db.

Member Function Documentation

ZapierApi::_cleanObjectDatas (   $object)

Clean sensible object datas.

Parameters
Object$objectObject to clean
Returns
Object Object with cleaned properties

Definition at line 342 of file api_zapier.class.php.

Referenced by get(), and index().

ZapierApi::delete (   $id)

Update hook.

Parameters
int$idId of hook to update
array$request_dataDatas
Returns
int

PUT /hooks/{id} Delete hook

Parameters
int$idHook ID
Returns
array

DELETE /hook/{id}

Definition at line 309 of file api_zapier.class.php.

References DolibarrApi\_checkAccessToResource().

ZapierApi::get (   $id)

Get properties of a hook object.

Return an array with hook informations

Parameters
int$idID of hook
Returns
array|mixed data without useless information

GET /hooks/{id}

Exceptions
RestException

Definition at line 74 of file api_zapier.class.php.

References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().

ZapierApi::getModulesChoices ( )

Get list of possibles choices for module.

Return an array with hook informations

Returns
array data

GET /getmoduleschoices/

Exceptions
RestException

Definition at line 102 of file api_zapier.class.php.

ZapierApi::index (   $sortfield = "t.rowid",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

List hooks.

Get a list of hooks

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
int$pagePage number
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
Returns
array Array of order objects
Exceptions
RestExceptionGET /hooks/

Definition at line 142 of file api_zapier.class.php.

References DolibarrApi\_checkFilters(), _cleanObjectDatas(), and db.

ZapierApi::post (   $request_data = null)

Create hook object.

Parameters
array$request_dataRequest datas
Returns
int ID of hook

POST /hook/

Definition at line 238 of file api_zapier.class.php.

References dol_syslog(), and validate().

ZapierApi::validate (   $data,
  $fields 
)
private

Validate fields before create or update object.

Parameters
array$dataArray of data to validate
array$fieldsArray of fields needed
Returns
array
Exceptions
RestException

Definition at line 366 of file api_zapier.class.php.

Referenced by post().


The documentation for this class was generated from the following file: