承接 timothydc/laravel-lightspeed-ecom-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

timothydc/laravel-lightspeed-ecom-api

最新稳定版本:v1.7.0

Composer 安装命令:

composer require timothydc/laravel-lightspeed-ecom-api

包简介

Connect with the Lightspeed eCom API

README 文档

README

Latest Version on Packagist Total Downloads Github Tests Action Tests Github Tests Action Styling

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

Via Composer:

composer require timothydc/laravel-lightspeed-ecom-api

Configuration

You can publish the config file with:

php artisan vendor:publish --tag=lightspeed-ecom-api:config 

Usage

Interaction works the same as the Lightspeed API.

Authentication

// change API language
LightspeedEcomApi::setLanguage('en');

// change API key and secret
LightspeedEcomApi::setCredentials('key', 'secret');

Rate limits

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);

Calling resources

// 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']);

Testing

composer test

Security

If you discover any security related issues, please email mail@timothydc.be instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.7k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-29