eighteen73 / dear-api
PHP Library for dear systems API v2 https://dearinventory.docs.apiary.io
v1.0.5
2023-05-09 09:18 UTC
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-09 13:41:55 UTC
README
PHP Library for DEAR Systems API v2.
Originally forked from UmiMood/dear-api.
Requirements
- PHP 8.0+
- guzzlehttp/guzzle 7.4+
- ext-json extension
Installation
composer require eighteen73/dear-api
Otherwise just download the package and add it to the autoloader.
API Documentation
Usage
Create a Dear instance.
$dear = Eighteen73\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, []);