From e113f121cecf64281eac1ca74b853727142c2327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E4=B8=AD=E6=B5=B7?= Date: Tue, 18 Oct 2022 22:07:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feature=201.=20=E6=B7=BB=E5=8A=A0=EF=BC=9A?= =?UTF-8?q?=E6=8B=BC=E5=A4=9A=E5=A4=9A-=E6=8E=88=E6=9D=83=E5=A4=87?= =?UTF-8?q?=E6=A1=88-=E5=88=9B=E5=BB=BA=E3=80=81=E6=8B=BC=E5=A4=9A?= =?UTF-8?q?=E5=A4=9A-=E6=8E=88=E6=9D=83=E5=A4=87=E6=A1=88-=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E3=80=81=E6=8A=96=E9=9F=B3-=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/PddOauthGenerate.php | 42 ++++++++++++++++++++++++++++ api/PddOauthQuery.php | 42 ++++++++++++++++++++++++++++ api/TiktokOrderList.php | 50 ++++++++++++++++++++++++++++++++++ tests/TestPddOauthGenerate.php | 17 ++++++++++++ tests/TestPddOauthQuery.php | 17 ++++++++++++ tests/TestTiktokOrderList.php | 21 ++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 api/PddOauthGenerate.php create mode 100644 api/PddOauthQuery.php create mode 100644 api/TiktokOrderList.php create mode 100644 tests/TestPddOauthGenerate.php create mode 100644 tests/TestPddOauthQuery.php create mode 100644 tests/TestTiktokOrderList.php diff --git a/api/PddOauthGenerate.php b/api/PddOauthGenerate.php new file mode 100644 index 0000000..787e0f2 --- /dev/null +++ b/api/PddOauthGenerate.php @@ -0,0 +1,42 @@ +setAppKey('xxxxxxxxx'); +$client->setAppSecret('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); +$client->setVersion('v2.0.0'); + +$params = [ + "p_id_list" => '8978575_232157258', // 推广位,仅支持单个推广位 + "custom_parameters" => '{"uid":"11111","sid":"22222"}', // 自定义参数 +]; + +$res = $client->setParams($params)->request(); +var_dump($res); \ No newline at end of file diff --git a/tests/TestPddOauthQuery.php b/tests/TestPddOauthQuery.php new file mode 100644 index 0000000..86d097c --- /dev/null +++ b/tests/TestPddOauthQuery.php @@ -0,0 +1,17 @@ +setAppKey('xxxxxxxxx'); +$client->setAppSecret('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); +$client->setVersion('v2.0.0'); + +$params = [ + "pid" => '8978575_232157258', // 推广位 + "custom_parameters" => '{"uid":"11111","sid":"22222"}', // 自定义参数 +]; + +$res = $client->setParams($params)->request(); +var_dump($res); \ No newline at end of file diff --git a/tests/TestTiktokOrderList.php b/tests/TestTiktokOrderList.php new file mode 100644 index 0000000..690de83 --- /dev/null +++ b/tests/TestTiktokOrderList.php @@ -0,0 +1,21 @@ +setAppKey('xxxxxxxxx'); +$client->setAppSecret('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); +$client->setVersion('v2.0.0'); + +$params = [ + "start_time" => '', // 开始时间 + "end_time" => '', // 结束时间 + "order_ids" => '1', // 订单ID列表,多个订单以,分割 + "external_info" => '', // 外部参数 + "page" => 1, // 页码 + "size" => 20, // 每页数量 +]; + +$res = $client->setParams($params)->request(); +var_dump($res); \ No newline at end of file -- Gitee From ce94c4f6148d1d638751e07ddf99989de7508939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E4=B8=AD=E6=B5=B7?= Date: Wed, 19 Oct 2022 09:34:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?optimize=201.=20=E8=B0=83=E6=95=B4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/PddOauthGenerate.php | 2 +- api/PddOauthQuery.php | 2 +- api/TiktokOrderList.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/PddOauthGenerate.php b/api/PddOauthGenerate.php index 787e0f2..498f6ed 100644 --- a/api/PddOauthGenerate.php +++ b/api/PddOauthGenerate.php @@ -13,7 +13,7 @@ class PddOauthGenerate extends DtkClient protected $methodType = 'GET'; protected $requestParams = []; - const METHOD = "/api/ppd/generate-prom-url"; + const METHOD = "/open-api/ppd/generate-prom-url"; /** * @return string diff --git a/api/PddOauthQuery.php b/api/PddOauthQuery.php index f961bcd..6e8c950 100644 --- a/api/PddOauthQuery.php +++ b/api/PddOauthQuery.php @@ -13,7 +13,7 @@ class PddOauthQuery extends DtkClient protected $methodType = 'GET'; protected $requestParams = []; - const METHOD = "/api/ppd/authority-query"; + const METHOD = "/open-api/ppd/authority-query"; /** * @return string diff --git a/api/TiktokOrderList.php b/api/TiktokOrderList.php index e237738..fadacd0 100644 --- a/api/TiktokOrderList.php +++ b/api/TiktokOrderList.php @@ -21,7 +21,7 @@ class TiktokOrderList extends DtkClient protected $methodType = 'GET'; protected $requestParams = []; - const METHOD = "/api/tiktok/order-list"; + const METHOD = "/open-api/tiktok/order-list"; /** * @return string -- Gitee From e2140a3dffd4164c51aac038119b6febb989997d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E4=B8=AD=E6=B5=B7?= Date: Wed, 19 Oct 2022 15:31:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feature=201.=20=E6=9B=B4=E6=94=B9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/PddOauthGenerate.php | 2 +- api/PddOauthQuery.php | 2 +- api/TiktokOrderList.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/PddOauthGenerate.php b/api/PddOauthGenerate.php index 498f6ed..787e0f2 100644 --- a/api/PddOauthGenerate.php +++ b/api/PddOauthGenerate.php @@ -13,7 +13,7 @@ class PddOauthGenerate extends DtkClient protected $methodType = 'GET'; protected $requestParams = []; - const METHOD = "/open-api/ppd/generate-prom-url"; + const METHOD = "/api/ppd/generate-prom-url"; /** * @return string diff --git a/api/PddOauthQuery.php b/api/PddOauthQuery.php index 6e8c950..f961bcd 100644 --- a/api/PddOauthQuery.php +++ b/api/PddOauthQuery.php @@ -13,7 +13,7 @@ class PddOauthQuery extends DtkClient protected $methodType = 'GET'; protected $requestParams = []; - const METHOD = "/open-api/ppd/authority-query"; + const METHOD = "/api/ppd/authority-query"; /** * @return string diff --git a/api/TiktokOrderList.php b/api/TiktokOrderList.php index fadacd0..e237738 100644 --- a/api/TiktokOrderList.php +++ b/api/TiktokOrderList.php @@ -21,7 +21,7 @@ class TiktokOrderList extends DtkClient protected $methodType = 'GET'; protected $requestParams = []; - const METHOD = "/open-api/tiktok/order-list"; + const METHOD = "/api/tiktok/order-list"; /** * @return string -- Gitee