作者 lackoxygen

feat:c n

... ... @@ -34,7 +34,7 @@ use Lackoxygen\TiktokShop\Support\Verify;
* @method Request\Material\MaterialInterface material()
* @method Request\Address\AddressInterface address()
*/
class TiktokShop
class Application
{
/**
* @var Option
... ...
... ... @@ -2,9 +2,9 @@
namespace Lackoxygen\TiktokShop;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
class TiktokShopProvider extends ServiceProvider
class ServiceProvider extends LaravelServiceProvider
{
/**
* @var string
... ... @@ -36,7 +36,7 @@ class TiktokShopProvider extends ServiceProvider
public function register()
{
$this->app->singleton(static::$name, function (\Illuminate\Foundation\Application $application, array $args) {
return new TiktokShop(...$args);
return new Application(...$args);
});
}
... ...
... ... @@ -70,6 +70,9 @@ class Signature
return $this;
}
/**
* @return false|string
*/
public function generate()
{
$paramPattern = 'app_key' . $this->appKey . 'method' .
... ...
<?php
namespace Lackoxygen\Tests;
use Lackoxygen\TiktokShop\Facade\TiktokShop;
use Lackoxygen\TiktokShop\Passage\ResultSet;
class FetchTest extends \PHPUnit\Framework\TestCase
{
public function testRequest()
{
$obj = TiktokShop::alliance()->materialsProductsSearch([]);
$this->assertInstanceOf($obj, ResultSet::class);
}
}