作者 lackoxygen

feat:c n

@@ -34,7 +34,7 @@ use Lackoxygen\TiktokShop\Support\Verify; @@ -34,7 +34,7 @@ use Lackoxygen\TiktokShop\Support\Verify;
34 * @method Request\Material\MaterialInterface material() 34 * @method Request\Material\MaterialInterface material()
35 * @method Request\Address\AddressInterface address() 35 * @method Request\Address\AddressInterface address()
36 */ 36 */
37 -class TiktokShop 37 +class Application
38 { 38 {
39 /** 39 /**
40 * @var Option 40 * @var Option
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 2
3 namespace Lackoxygen\TiktokShop; 3 namespace Lackoxygen\TiktokShop;
4 4
5 -use Illuminate\Support\ServiceProvider; 5 +use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
6 6
7 -class TiktokShopProvider extends ServiceProvider 7 +class ServiceProvider extends LaravelServiceProvider
8 { 8 {
9 /** 9 /**
10 * @var string 10 * @var string
@@ -36,7 +36,7 @@ class TiktokShopProvider extends ServiceProvider @@ -36,7 +36,7 @@ class TiktokShopProvider extends ServiceProvider
36 public function register() 36 public function register()
37 { 37 {
38 $this->app->singleton(static::$name, function (\Illuminate\Foundation\Application $application, array $args) { 38 $this->app->singleton(static::$name, function (\Illuminate\Foundation\Application $application, array $args) {
39 - return new TiktokShop(...$args); 39 + return new Application(...$args);
40 }); 40 });
41 } 41 }
42 42
@@ -70,6 +70,9 @@ class Signature @@ -70,6 +70,9 @@ class Signature
70 return $this; 70 return $this;
71 } 71 }
72 72
  73 + /**
  74 + * @return false|string
  75 + */
73 public function generate() 76 public function generate()
74 { 77 {
75 $paramPattern = 'app_key' . $this->appKey . 'method' . 78 $paramPattern = 'app_key' . $this->appKey . 'method' .
1 -<?php  
2 -  
3 -namespace Lackoxygen\Tests;  
4 -  
5 -use Lackoxygen\TiktokShop\Facade\TiktokShop;  
6 -use Lackoxygen\TiktokShop\Passage\ResultSet;  
7 -  
8 -class FetchTest extends \PHPUnit\Framework\TestCase  
9 -{  
10 - public function testRequest()  
11 - {  
12 - $obj = TiktokShop::alliance()->materialsProductsSearch([]);  
13 -  
14 - $this->assertInstanceOf($obj, ResultSet::class);  
15 - }  
16 -}