The library provides method for work with iikoAPI

0.1.5 2024-03-20 14:51 UTC

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.