timothydc / laravel-lightspeed-retail-api Goto Github PK
View Code? Open in Web Editor NEWConnect with the Lightspeed Retail API
License: MIT License
Connect with the Lightspeed Retail API
License: MIT License
Api url should be updated to https://api.lightspeedapp.com/API/V3/Account
instead of the current https://api.merchantos.com/API/Account
.
This also will change a few query parameters.
https://developers.lightspeedhq.com/retail/introduction/parameters/
I will create a pull request to start these changes.
Hi,
Everything was loading fine until I try to make an artisan command (php artisan make:command) to run my sync code.
My code is working but as soon as I call one of your class, I get an error. (Same code that run inside my app is ok)
When any API class in an artisan command I get this error
"
syntax error, unexpected 'ApiClient' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
at vendor/timothydc/laravel-lightspeed-retail-api/src/LightspeedRetailApi.php:10
6| use TimothyDC\LightspeedRetailApi\Services\ApiClient;
7|
8| class LightspeedRetailApi
9| {
10| private ApiClient $apiClient;
11|
12| public function __construct(ApiClient $apiClient)
13| {
14| $this->apiClient = $apiClient;
+1 vendor frames
2 [internal]:0
Composer\Autoload\ClassLoader::loadClass("TimothyDC\LightspeedRetailApi\LightspeedRetailApi")
+10 vendor frames
13 app/StockSync.php:155
Illuminate\Support\Facades\Facade::__callStatic("api", [])
"
At first I was thinking it is the .env variables that was not loading but I did a dump(env(PRESTASHOP_WS_KEY)) and the value is ok.
Any ideas ?
Hi,
I'm trying to seed my DB with Lightspeed Items and having a strange issue with 'load_relations'.
The ApiClient accepts an array for queries, however, providing more than one relation does not work and simply returns an empty array.
// Works as expected
$products = LightspeedRetailApi::api()->getAll('Item', null, ['load_relations' => ['Images']]);
// Doesn't work as expected, returns []
$products = LightspeedRetailApi::api()->getAll('Item', null, ['load_relations' => ['Images', 'ItemECommerce']]);
Hi,
I try a new install (composer require timothydc/laravel-lightspeed-retail-api
) under a Laravel 8 projet. But I got this error:
"Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.2.0].
- Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.2.0].
- timothydc/laravel-lightspeed-retail-api v0.12-alpha requires guzzlehttp/guzzle ^6.5 -> satisfiable by guzzlehttp/guzzle[6.5.x-dev].
- Installation request for timothydc/laravel-lightspeed-retail-api ^0.12.0@alpha -> satisfiable by timothydc/laravel-lightspeed-retail-api[v0.12-alpha].
- Installation request for guzzlehttp/guzzle (locked at 7.2.0, required as ^7.0.1) -> satisfiable by guzzlehttp/guzzle[7.2.0]."
Any idea?
In the SaveAccessTokenController
class:
return property_exists($this, 'redirectTo')
? $this->redirectTo
: route('home');
The route('home')
I would like to change to the new Laravel default: RouteServiceProvider::HOME
I will make a pull request for this.
In the V3 version of the Lightspeed retail API the method for pagination is changed.
There is an next and previous attribute.
These URLs to the next 'page' have a after and before token.
The tokes provided are already encoded.
And for now they are un accessible via the get method.
Is it possible to add a new release with the V3 version of the API @timothydc?
That would be great. ๐
Hi,
Sorry I am new to Laravel so maybe it is just me but I got this error when installing the package :
$ composer require timothydc/laravel-lightspeed-retail-api
[InvalidArgumentException]
Could not find a version of package timothydc/laravel-lightspeed-retail-api matching your minimum-stability (stable). Require it with an explicit version constraint allowin
g its desired stability.
Anything I can do to by pass this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.