正在显示
19 个修改的文件
包含
37 行增加
和
74 行删除
| @@ -543,6 +543,8 @@ FACADE; | @@ -543,6 +543,8 @@ FACADE; | ||
| 543 | return $left . ' static' . $right; | 543 | return $left . ' static' . $right; |
| 544 | }, $metas); | 544 | }, $metas); |
| 545 | 545 | ||
| 546 | + array_unshift($metas, ' * @method static Application accessToken(string $token)'); | ||
| 547 | + | ||
| 546 | $metaAnnotate = '/**' . "\n"; | 548 | $metaAnnotate = '/**' . "\n"; |
| 547 | $metaAnnotate .= join("\n", $metas) . "\n"; | 549 | $metaAnnotate .= join("\n", $metas) . "\n"; |
| 548 | $metaAnnotate .= ' */'; | 550 | $metaAnnotate .= ' */'; |
| @@ -31,7 +31,7 @@ use Lackoxygen\TiktokShop\Support\Verify; | @@ -31,7 +31,7 @@ use Lackoxygen\TiktokShop\Support\Verify; | ||
| 31 | * @method Request\Logistics\LogisticsInterface logistics() | 31 | * @method Request\Logistics\LogisticsInterface logistics() |
| 32 | * @method Request\Warehouse\WarehouseInterface warehouse() | 32 | * @method Request\Warehouse\WarehouseInterface warehouse() |
| 33 | * @method Request\Product\ProductInterface product() | 33 | * @method Request\Product\ProductInterface product() |
| 34 | - * @method Request\Material\MaterialInterface material() | 34 | + * @method Request\\Interface () |
| 35 | * @method Request\Address\AddressInterface address() | 35 | * @method Request\Address\AddressInterface address() |
| 36 | */ | 36 | */ |
| 37 | class Application | 37 | class Application |
| @@ -9,6 +9,7 @@ use Lackoxygen\TiktokShop\Support\Verify; | @@ -9,6 +9,7 @@ use Lackoxygen\TiktokShop\Support\Verify; | ||
| 9 | use Lackoxygen\TiktokShop\Application; | 9 | use Lackoxygen\TiktokShop\Application; |
| 10 | 10 | ||
| 11 | /** | 11 | /** |
| 12 | + * @method static Application accessToken(string $token) | ||
| 12 | * @method static Verify verify() | 13 | * @method static Verify verify() |
| 13 | * @method static Request\Pigeon\PigeonInterface pigeon() | 14 | * @method static Request\Pigeon\PigeonInterface pigeon() |
| 14 | * @method static Request\Sms\SmsInterface sms() | 15 | * @method static Request\Sms\SmsInterface sms() |
| @@ -31,7 +32,7 @@ use Lackoxygen\TiktokShop\Application; | @@ -31,7 +32,7 @@ use Lackoxygen\TiktokShop\Application; | ||
| 31 | * @method static Request\Logistics\LogisticsInterface logistics() | 32 | * @method static Request\Logistics\LogisticsInterface logistics() |
| 32 | * @method static Request\Warehouse\WarehouseInterface warehouse() | 33 | * @method static Request\Warehouse\WarehouseInterface warehouse() |
| 33 | * @method static Request\Product\ProductInterface product() | 34 | * @method static Request\Product\ProductInterface product() |
| 34 | - * @method static Request\Material\MaterialInterface material() | 35 | + * @method static Request\\Interface () |
| 35 | * @method static Request\Address\AddressInterface address() | 36 | * @method static Request\Address\AddressInterface address() |
| 36 | */ | 37 | */ |
| 37 | class Facade extends LaravelFacade | 38 | class Facade extends LaravelFacade |
| @@ -427,6 +427,17 @@ class Logistics extends Request implements LogisticsInterface | @@ -427,6 +427,17 @@ class Logistics extends Request implements LogisticsInterface | ||
| 427 | /** | 427 | /** |
| 428 | * @inheritDoc | 428 | * @inheritDoc |
| 429 | */ | 429 | */ |
| 430 | + public function logisticsCreateSFOrder(array $params = []) | ||
| 431 | + { | ||
| 432 | + $this->builder->method('POST') | ||
| 433 | + ->service('logistics.createSFOrder') | ||
| 434 | + ->path('/logistics/createSFOrder') | ||
| 435 | + ->params($params); | ||
| 436 | + } | ||
| 437 | + | ||
| 438 | + /** | ||
| 439 | + * @inheritDoc | ||
| 440 | + */ | ||
| 430 | public function addressGetAreasByProvince(array $params = []) | 441 | public function addressGetAreasByProvince(array $params = []) |
| 431 | { | 442 | { |
| 432 | $this->builder->method('POST') | 443 | $this->builder->method('POST') |
| @@ -314,6 +314,14 @@ interface LogisticsInterface | @@ -314,6 +314,14 @@ interface LogisticsInterface | ||
| 314 | public function addressGetProvince(array $params = []); | 314 | public function addressGetProvince(array $params = []); |
| 315 | 315 | ||
| 316 | /** | 316 | /** |
| 317 | + * 顺丰新下单接口 | ||
| 318 | + * @link https://op.jinritemai.com/docs/api-docs/16/1847 | ||
| 319 | + * @param array $params | ||
| 320 | + * @return ResultSet | ||
| 321 | + */ | ||
| 322 | + public function logisticsCreateSFOrder(array $params = []); | ||
| 323 | + | ||
| 324 | + /** | ||
| 317 | * 根据省获取全量四级地址 | 325 | * 根据省获取全量四级地址 |
| 318 | * @link https://op.jinritemai.com/docs/api-docs/16/1844 | 326 | * @link https://op.jinritemai.com/docs/api-docs/16/1844 |
| 319 | * @param array $params | 327 | * @param array $params |
| @@ -64,17 +64,6 @@ class Member extends Request implements MemberInterface | @@ -64,17 +64,6 @@ class Member extends Request implements MemberInterface | ||
| 64 | /** | 64 | /** |
| 65 | * @inheritDoc | 65 | * @inheritDoc |
| 66 | */ | 66 | */ |
| 67 | - public function memberGetJoinBonusCountForUser(array $params = []) | ||
| 68 | - { | ||
| 69 | - $this->builder->method('POST') | ||
| 70 | - ->service('member.GetJoinBonusCountForUser') | ||
| 71 | - ->path('/member/GetJoinBonusCountForUser') | ||
| 72 | - ->params($params); | ||
| 73 | - } | ||
| 74 | - | ||
| 75 | - /** | ||
| 76 | - * @inheritDoc | ||
| 77 | - */ | ||
| 78 | public function memberBatchGetHistoryMemberUnionId(array $params = []) | 67 | public function memberBatchGetHistoryMemberUnionId(array $params = []) |
| 79 | { | 68 | { |
| 80 | $this->builder->method('POST') | 69 | $this->builder->method('POST') |
| @@ -50,14 +50,6 @@ interface MemberInterface | @@ -50,14 +50,6 @@ interface MemberInterface | ||
| 50 | public function memberGetUserShopMemberCard(array $params = []); | 50 | public function memberGetUserShopMemberCard(array $params = []); |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | - * 获取用户裂变引导入会人数 | ||
| 54 | - * @link https://op.jinritemai.com/docs/api-docs/66/1801 | ||
| 55 | - * @param array $params | ||
| 56 | - * @return ResultSet | ||
| 57 | - */ | ||
| 58 | - public function memberGetJoinBonusCountForUser(array $params = []); | ||
| 59 | - | ||
| 60 | - /** | ||
| 61 | * 【品牌会员店铺专用】根据店铺会员的openId获取品牌维度的用户身份标识unionId | 53 | * 【品牌会员店铺专用】根据店铺会员的openId获取品牌维度的用户身份标识unionId |
| 62 | * @link https://op.jinritemai.com/docs/api-docs/66/2136 | 54 | * @link https://op.jinritemai.com/docs/api-docs/66/2136 |
| 63 | * @param array $params | 55 | * @param array $params |
| @@ -273,17 +273,6 @@ class Product extends Request implements ProductInterface | @@ -273,17 +273,6 @@ class Product extends Request implements ProductInterface | ||
| 273 | /** | 273 | /** |
| 274 | * @inheritDoc | 274 | * @inheritDoc |
| 275 | */ | 275 | */ |
| 276 | - public function opptyProductApply(array $params = []) | ||
| 277 | - { | ||
| 278 | - $this->builder->method('POST') | ||
| 279 | - ->service('opptyProduct.apply') | ||
| 280 | - ->path('/opptyProduct/apply') | ||
| 281 | - ->params($params); | ||
| 282 | - } | ||
| 283 | - | ||
| 284 | - /** | ||
| 285 | - * @inheritDoc | ||
| 286 | - */ | ||
| 287 | public function productQualityDetail(array $params = []) | 276 | public function productQualityDetail(array $params = []) |
| 288 | { | 277 | { |
| 289 | $this->builder->method('POST') | 278 | $this->builder->method('POST') |
| @@ -317,17 +306,6 @@ class Product extends Request implements ProductInterface | @@ -317,17 +306,6 @@ class Product extends Request implements ProductInterface | ||
| 317 | /** | 306 | /** |
| 318 | * @inheritDoc | 307 | * @inheritDoc |
| 319 | */ | 308 | */ |
| 320 | - public function opptyProductClue(array $params = []) | ||
| 321 | - { | ||
| 322 | - $this->builder->method('POST') | ||
| 323 | - ->service('opptyProduct.clue') | ||
| 324 | - ->path('/opptyProduct/clue') | ||
| 325 | - ->params($params); | ||
| 326 | - } | ||
| 327 | - | ||
| 328 | - /** | ||
| 329 | - * @inheritDoc | ||
| 330 | - */ | ||
| 331 | public function spuAddShopSpu(array $params = []) | 309 | public function spuAddShopSpu(array $params = []) |
| 332 | { | 310 | { |
| 333 | $this->builder->method('POST') | 311 | $this->builder->method('POST') |
| @@ -202,14 +202,6 @@ interface ProductInterface | @@ -202,14 +202,6 @@ interface ProductInterface | ||
| 202 | public function opptyProductGetApplyProgress(array $params = []); | 202 | public function opptyProductGetApplyProgress(array $params = []); |
| 203 | 203 | ||
| 204 | /** | 204 | /** |
| 205 | - * 机会品提报 | ||
| 206 | - * @link https://op.jinritemai.com/docs/api-docs/14/1798 | ||
| 207 | - * @param array $params | ||
| 208 | - * @return ResultSet | ||
| 209 | - */ | ||
| 210 | - public function opptyProductApply(array $params = []); | ||
| 211 | - | ||
| 212 | - /** | ||
| 213 | * 商品信息质量分查询API | 205 | * 商品信息质量分查询API |
| 214 | * @link https://op.jinritemai.com/docs/api-docs/14/1830 | 206 | * @link https://op.jinritemai.com/docs/api-docs/14/1830 |
| 215 | * @param array $params | 207 | * @param array $params |
| @@ -234,14 +226,6 @@ interface ProductInterface | @@ -234,14 +226,6 @@ interface ProductInterface | ||
| 234 | public function productEditBuyerLimit(array $params = []); | 226 | public function productEditBuyerLimit(array $params = []); |
| 235 | 227 | ||
| 236 | /** | 228 | /** |
| 237 | - * 机会品线索触达 | ||
| 238 | - * @link https://op.jinritemai.com/docs/api-docs/14/1828 | ||
| 239 | - * @param array $params | ||
| 240 | - * @return ResultSet | ||
| 241 | - */ | ||
| 242 | - public function opptyProductClue(array $params = []); | ||
| 243 | - | ||
| 244 | - /** | ||
| 245 | * 店铺新增SPU | 229 | * 店铺新增SPU |
| 246 | * @link https://op.jinritemai.com/docs/api-docs/14/1827 | 230 | * @link https://op.jinritemai.com/docs/api-docs/14/1827 |
| 247 | * @param array $params | 231 | * @param array $params |
| @@ -6,8 +6,7 @@ use Lackoxygen\TiktokShop\Attribute\Config\Config; | @@ -6,8 +6,7 @@ use Lackoxygen\TiktokShop\Attribute\Config\Config; | ||
| 6 | use Lackoxygen\TiktokShop\Attribute\Config\Option; | 6 | use Lackoxygen\TiktokShop\Attribute\Config\Option; |
| 7 | use Lackoxygen\TiktokShop\Exception\ClientException; | 7 | use Lackoxygen\TiktokShop\Exception\ClientException; |
| 8 | use Lackoxygen\TiktokShop\Response\ResultSet; | 8 | use Lackoxygen\TiktokShop\Response\ResultSet; |
| 9 | -use Lackoxygen\TiktokShop\Util\Json; | ||
| 10 | -use Psr\Http\Message\ResponseInterface; | 9 | +use Lackoxygen\TiktokShop\Support\Json; |
| 11 | 10 | ||
| 12 | class RequestProxy extends Config | 11 | class RequestProxy extends Config |
| 13 | { | 12 | { |
| @@ -4,7 +4,7 @@ namespace Lackoxygen\TiktokShop\Response; | @@ -4,7 +4,7 @@ namespace Lackoxygen\TiktokShop\Response; | ||
| 4 | 4 | ||
| 5 | use Illuminate\Contracts\Support\Arrayable; | 5 | use Illuminate\Contracts\Support\Arrayable; |
| 6 | use Illuminate\Support\Arr; | 6 | use Illuminate\Support\Arr; |
| 7 | -use Lackoxygen\TiktokShop\Util\Json; | 7 | +use Lackoxygen\TiktokShop\Support\Json; |
| 8 | 8 | ||
| 9 | class ResultSet implements Arrayable, \Countable, \ArrayAccess | 9 | class ResultSet implements Arrayable, \Countable, \ArrayAccess |
| 10 | { | 10 | { |
| @@ -10,9 +10,9 @@ use Lackoxygen\TiktokShop\Attribute\Config\Option; | @@ -10,9 +10,9 @@ use Lackoxygen\TiktokShop\Attribute\Config\Option; | ||
| 10 | use Lackoxygen\TiktokShop\Attribute\Request; | 10 | use Lackoxygen\TiktokShop\Attribute\Request; |
| 11 | use Lackoxygen\TiktokShop\Exception\ClientException; | 11 | use Lackoxygen\TiktokShop\Exception\ClientException; |
| 12 | use Lackoxygen\TiktokShop\Exception\RetryException; | 12 | use Lackoxygen\TiktokShop\Exception\RetryException; |
| 13 | -use Lackoxygen\TiktokShop\Util\Json; | ||
| 14 | -use Lackoxygen\TiktokShop\Util\Signature; | ||
| 15 | -use Lackoxygen\TiktokShop\Util\Sort; | 13 | +use Lackoxygen\TiktokShop\Support\Json; |
| 14 | +use Lackoxygen\TiktokShop\Support\Signature; | ||
| 15 | +use Lackoxygen\TiktokShop\Support\Sort; | ||
| 16 | use Psr\Http\Message\ResponseInterface; | 16 | use Psr\Http\Message\ResponseInterface; |
| 17 | 17 | ||
| 18 | class Client | 18 | class Client |
| @@ -8,7 +8,7 @@ use GuzzleHttp\Psr7\Response; | @@ -8,7 +8,7 @@ use GuzzleHttp\Psr7\Response; | ||
| 8 | use GuzzleHttp\RequestOptions; | 8 | use GuzzleHttp\RequestOptions; |
| 9 | use Lackoxygen\TiktokShop\Exception\ClientException; | 9 | use Lackoxygen\TiktokShop\Exception\ClientException; |
| 10 | use Lackoxygen\TiktokShop\Exception\MockException; | 10 | use Lackoxygen\TiktokShop\Exception\MockException; |
| 11 | -use Lackoxygen\TiktokShop\Util\Json; | 11 | +use Lackoxygen\TiktokShop\Support\Json; |
| 12 | 12 | ||
| 13 | class Mock | 13 | class Mock |
| 14 | { | 14 | { |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Lackoxygen\TiktokShop\Util; | 3 | +namespace Lackoxygen\TiktokShop\Support; |
| 4 | 4 | ||
| 5 | use Lackoxygen\TiktokShop\Attribute\Config\Config; | 5 | use Lackoxygen\TiktokShop\Attribute\Config\Config; |
| 6 | 6 | ||
| @@ -62,12 +62,11 @@ class Signature extends Config | @@ -62,12 +62,11 @@ class Signature extends Config | ||
| 62 | 62 | ||
| 63 | switch ($this->config->getSignMethod()) { | 63 | switch ($this->config->getSignMethod()) { |
| 64 | case 'hmac-sha256': | 64 | case 'hmac-sha256': |
| 65 | - case 'sha256': | ||
| 66 | return $this->sha256($body); | 65 | return $this->sha256($body); |
| 67 | case 'md5': | 66 | case 'md5': |
| 68 | return $this->md5($body); | 67 | return $this->md5($body); |
| 69 | default: | 68 | default: |
| 70 | - return ''; | 69 | + throw new \InvalidArgumentException('Signature method not supported'); |
| 71 | } | 70 | } |
| 72 | } | 71 | } |
| 73 | 72 |
-
请 注册 或 登录 后发表评论