作者 竞泽

docs:doc link

... ... @@ -9,6 +9,7 @@ use Lackoxygen\TiktokShop\Passage\Order\OrderInterface;
use Lackoxygen\TiktokShop\Passage\Product\ProductInterface;
use Lackoxygen\TiktokShop\Passage\Shop\ShopInterface;
use Lackoxygen\TiktokShop\Passage\Verify;
use Lackoxygen\TiktokShop\TiktokShop as TiktokShopKernel;
/**
* @method static OrderInterface order()
... ... @@ -17,6 +18,7 @@ use Lackoxygen\TiktokShop\Passage\Verify;
* @method static Authorize authorize()
* @method static Verify verify()
* @method static Alliance alliance()
* @method static TiktokShopKernel setAccessToken(string $accessToken)
*/
class TiktokShop extends Facade
{
... ... @@ -25,6 +27,6 @@ class TiktokShop extends Facade
*/
protected static function getFacadeAccessor(): string
{
return \Lackoxygen\TiktokShop\TiktokShop::class;
return TiktokShopKernel::class;
}
}
... ...
... ... @@ -31,8 +31,11 @@ class TiktokShop
* @var array|string[]
*/
protected static array $passages = [
'order' => Passage\Order\Order::class, 'shop' => Passage\Shop\Shop::class,
'product' => Passage\Product\Product::class, 'authorize' => Authorize::class, 'verify' => Verify::class,
'order' => Passage\Order\Order::class,
'shop' => Passage\Shop\Shop::class,
'product' => Passage\Product\Product::class,
'authorize' => Authorize::class,
'verify' => Verify::class,
'alliance' => Alliance::class
];
... ... @@ -62,7 +65,7 @@ class TiktokShop
Arr::get($options, 'app_key'),
Arr::get($options, 'app_secret'),
Arr::get($options, 'base_uri'),
(float)Arr::get($options, 'timeout'),
(float) Arr::get($options, 'timeout'),
Arr::get($options, 'enable_mock')
);
}
... ... @@ -80,11 +83,13 @@ class TiktokShop
/**
* @param string $accessToken
*
* @return void
* @return $this
*/
public function setAccessToken(string $accessToken): void
public function setAccessToken(string $accessToken): TiktokShop
{
$this->config->setAccessToken($accessToken);
return $this;
}
/**
... ...