File tree 1 file changed +31
-1
lines changed
1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ return [
41
41
42
42
使用
43
43
----
44
-
44
+
45
+ v1.0
45
46
``` php
46
47
use xutl\qcloud\Qcloud;
47
48
@@ -55,6 +56,35 @@ $package = [
55
56
print_r($wenzhi->TextKeywords($package));
56
57
```
57
58
59
+ v2.0 使用方法
60
+ ``` php
61
+ use xutl\qcloud\Qcloud;
62
+
63
+ /** var Qcloud $qcloud */
64
+ $qcloud = Yii::$app->qcloud;
65
+ /** @var \yii\httpclient\Response $response */
66
+ $response = $qcloud->createRequest(QCloud::API_CNS)->setData(['Action'=>'DomainList',])->send();;
67
+ print_r($response->data);
68
+ ```
69
+
70
+ v2.0 使用方法 2 ,适用于没有内置的接口,通过此方法来请求。
71
+ ``` php
72
+ use xutl\qcloud\Client;
73
+
74
+ /** var Client $client */
75
+ $request = (new Client([
76
+ 'serverHost' => 'cns.api.qcloud.com',
77
+ 'secretId' => '123456',
78
+ 'secretKey' => '654321',
79
+ 'region' => null
80
+ ]))
81
+ ->createRequest();
82
+
83
+ /** @var \yii\httpclient\Response $response */
84
+ $response = $request->setMethod('POST')->setData(['Action'=>'DomainList',])->send();;
85
+ print_r($response->data);
86
+ ```
87
+
58
88
资源
59
89
-----
60
90
You can’t perform that action at this time.
0 commit comments