iikoapilibrary / iikoapi
The library provides method for work with iikoAPI
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^6.3.1|^7.0.1
- illuminate/cache: ^8.0 || ^9.0 || ^10.0
- illuminate/http: ^8.0 || ^9.0 || ^10.0
- illuminate/support: ^8.0 || ^9.0 || ^10.0
- symfony/http-kernel: ^5.3 || ^6.0
This package is auto-updated.
Last update: 2024-04-20 14:56:50 UTC
README
iikoAPI Library is a PHP client for interacting with the iiko API. It is designed to simplify the process of making API calls to iiko and handling the responses.
Installation
You can install the package via composer:
composer require iikoapilibrary/iikoapi
Configuration
After installing the iikoAPI Library, publish its configuration file to your Laravel project:
php artisan vendor:publish --provider="IikoApiLibrary\Providers\iikoServiceProvider" --tag="iikoapi-config"
Resources
Also you need to publish resource files to your Laravel project
php artisan vendor:publish --provider="IikoApiLibrary\Providers\iikoServiceProvider" --tag="iikoapi-resources"
This will publish the iikoapi.php configuration file to your config directory. In this file, you can specify the API login credentials and other settings.
Usage
Here is a simple example of how to use the iikoAPI client:
$organization = iikoClientFacade::create()->GetOrganizationsInfo(); $menu = iikoClientFacade::create()->ExportMenu($organization['organizations'][0]['id']); $arr = $menu->toArray(1); echo dd($arr);
Make sure to check out the API documentation for a list of available methods.