Download the PHP package phplicengine/phplicengine-api without Composer
On this page you can find all versions of the php package phplicengine/phplicengine-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phplicengine/phplicengine-api
More information about phplicengine/phplicengine-api
Files in phplicengine/phplicengine-api
Package phplicengine-api
Short Description API for PHPLicengine
License Apache
Homepage http://www.phplicengine.com
Informations about the package phplicengine-api
API
PHPLicengine API
You can use this API library for any needs, not necessarily for PHPLicengine API. With PHPLicengine API library you can contact with any RESTApi server and receive response as json/xml and parse them.
Contents
- Usage
- Installation
- Sample
- Manual
- Changelog
- License
Usage
You can use this API library for any needs, not necessarily for PHPLicengine API. To do so, you should call Api class directly or implement your own service class. You can call setApiKeyVar() method of Api class to change the Api key header variable according to requirements of your Api server, and setValidResponseHeader() method of Result class, if your Api server returns a response Api header, and you need to get it. You can get it with [getReference() method] (https://github.com/phplicengine/phplicengine-api/blob/master/lib/PHPLicengine/Api/Result.php#L116). By default these are setup according to requirements of PHPLicengine API.
You can directly call Api class for your PHPLicengine API, but for your convenience we've created service classes that you can call them instead of Api class, for example see Client service class.
Installation
Versioning is the same as PHPLicengine. For general usage you can install any version as desired. But if you want to use PHPLicengine service classes, you should install the same version as your PHPLicengine or lower if there is not the same version.
Sample
NOTE: Usually RESTApi servers return a json response with 'error' and ' message' elements if an error occurs. If your RESTApi server returns another format, you'd need to customize isError() and getErrorMessage() methods in Result class.
Manual
Custom cURL Options
If you need to add some CURLOPT_* constants that are not enabled by default, you can call setCurlCallback() method to add them.
Upload Files
You can upload files with POST method and with this array structure as post parameter. Note that 'filename' must be absolute path to file.
Service Classes
For service classes usage, See here.
Changelog
New methods: (v2.x.x)
New methods: (v2.2.2)
Added patch()
method.
License
PHPLicengine Api is distributed under the Apache License. See License.
All versions of phplicengine-api with dependencies
ext-curl Version *