Skip to content

Commit c652e34

Browse files
committed
DM接口OK
1 parent c9a613c commit c652e34

File tree

2 files changed

+38
-13
lines changed

2 files changed

+38
-13
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# php-aliyun-open-api-dm
2-
阿里云DM接口
2+
3+
Installation
4+
------------
5+
6+
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
7+
8+
Either run
9+
10+
```
11+
php composer.phar require --prefer-dist aliyunapi/php-aliyun-open-api-dm
12+
```
13+
14+
or add
15+
16+
```
17+
"aliyunapi/php-aliyun-open-api-dm": "~1.0"
18+
```
19+
20+
to the require section of your composer.json.
21+
22+
使用方式
23+
------------
24+
```
25+
$client = new \aliyun\dm\Client([
26+
'accessKeyId' => '123456',
27+
'accessSecret' => '123456'
28+
]);
29+
$package = [
30+
'Action' => 'DescribeLiveStreamsPublishList',
31+
'DomainName' => 'live.cctv.com',
32+
'StartTime' => gmdate('Y-m-d\TH:i:s\Z', strtotime('2017-03-15')),
33+
'EndTime' => gmdate('Y-m-d\TH:i:s\Z', strtotime('2017-04-01')),
34+
];
35+
$response = $client->createRequest($package);
36+
print_r($response);
37+
exit;
38+
```

composer.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,11 @@
2020
],
2121
"require": {
2222
"php": ">=5.5.0",
23-
"guzzlehttp/guzzle": "~6.0"
24-
},
25-
"require-dev": {
26-
"phpunit/phpunit": "4.*"
23+
"aliyunapi/guzzle-subscriber": "~1.0"
2724
},
2825
"autoload": {
2926
"psr-4": {
3027
"aliyun\\dm\\": "src"
3128
}
32-
},
33-
"autoload-dev": {
34-
"psr-4": {
35-
"aliyun\\test\\dm\\": "tests"
36-
}
37-
},
38-
"scripts": {
39-
"test": "phpunit"
4029
}
4130
}

0 commit comments

Comments
 (0)