This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Via Composer:
composer require timothydc/laravel-lightspeed-ecom-api
You can publish the config file with:
php artisan vendor:publish --tag=lightspeed-ecom-api:config
Interaction works the same as the Lightspeed API.
// change API language
LightspeedEcomApi::setLanguage('en');
// change API key and secret
LightspeedEcomApi::setCredentials('key', 'secret');
By default, each API key caches its remaining calls and next reset time.
If you would like to disable this behavior, deactive this feature by setting save_remaining_calls_to_cache
to false
in config/lightspeed-ecom-api.php
.
// get max calls for your API keys
LightspeedEcomApi::getMaxCalls();
// get Carbon with next reset time - from the cache
LightspeedEcomApi::getResetTime();
// get Carbon with next reset time - from the last API response header
LightspeedEcomApi::getResetTime(false);
// get available API limits - from the cache
LightspeedEcomApi::getRemainingCalls();
// get available API limits - from the last API response header
LightspeedEcomApi::getRemainingCalls(false);
// get products
LightspeedEcomApi::products()->get();
// get single product
LightspeedEcomApi::products()->get(123456789);
// get filtered products
LightspeedEcomApi::products()->get(null, ['limit' => 250, 'page' => 1, 'since_id' => 123]);
// create product
LightspeedEcomApi::products()->create(['title' => 'my product']);
// update product
LightspeedEcomApi::products()->update(123456789, ['title' => 'my other product']);
composer test
If you discover any security related issues, please email mail@timothydc.be instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.