beautinow / dearapi
PHP Library for dear systems API v2 https://dearinventory.docs.apiary.io
v1.0.4
2022-03-29 02:58 UTC
Requires
- php: >7.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is not auto-updated.
Last update: 2024-11-05 15:11:34 UTC
README
PHP Library for dear systems API v2.
Requirements
- PHP 7.1+
- guzzlehttp/guzzle 7.0+
- ext-json extension
Installation
composer require umimood/dearapi
Otherwise just download the package and add it to the autoloader.
API Documentation
Usage
Create a Dear instance.
$dear = UmiMood\Dear\Dear::create("DEAR-ACCOUNT_ID", "DEAR-APPLICATION-KEY");
Get data from API
$products = $dear->product()->get([]); $accounts = $dear->account()->get([]); $me = $dear->me()->get([]);
Push a new record to the API
$response = $dear->product()->create($params); // see docs for available parameters
Update an existing record
$response = $dear->product()->update($guid, $params); // see docs for available parameters
Delete a record
$response = $dear->product()->delete($guid, []);