Skip to content

Commit ccd0431

Browse files
author
金山云SDK
authored
Merge pull request KscSDK#27 from KscSDK/trunk
Trunk
2 parents f7125fd + c3164fb commit ccd0431

File tree

2 files changed

+82
-14
lines changed

2 files changed

+82
-14
lines changed

examples/cdn.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,13 @@
532532
Parameters:
533533
StartTime String 获取数据起始时间点,日期格式按ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如:2016-08-01T21:14+0800
534534
EndTime String 结束时间需大于起始时间;获取日期格式按照ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如: 2016-08-01T21:14+0800
535-
StreamUrl String 流名,支持批量查询,多个流名用逗号(半角)分隔
535+
StreamUrls String 流名,支持批量查询,多个流名用逗号(半角)分隔
536536
Regions String 计费区域名称,取值为CN:中国大陆,HK:香港,TW:台湾,AS:亚洲其他,NA:北美洲,SA:南美洲,EU:欧洲,AU:大洋洲,AF:非洲,支持多计费区域查询,多个区域用逗号(半角)分隔,缺省为 CN
537537
ResultType String 取值为0:多域名多省份区域多运营商数据做合并;1:每个域名每个省份区域的每个运营商数据分别返回
538538
Granularity String 统计粒度,取值为 5(默认):5分钟粒度;10:10分钟粒度;20:20分钟粒度;60:1小时粒度;240:4小时粒度;480:8小时粒度;1440:1天粒度
539539
540540
'''
541-
#res = client.get_live_flow_data_by_stream(StartTime='2016-12-18T08:00+0800',EndTime='2016-12-20T08:00+0800',StreamUrl='rtmp://realflv3.plu.cn/live/ce781fecb2f6447d82d03590e520872f',ResultType='1',Regions='CN',Granularity='1440')
541+
#res = client.get_live_flow_data_by_stream(StartTime='2016-12-18T08:00+0800',EndTime='2016-12-20T08:00+0800',StreamUrls='rtmp://realflv3.plu.cn/live/ce781fecb2f6447d82d03590e520872f',ResultType='1',Regions='CN',Granularity='1440')
542542

543543

544544
'''
@@ -553,13 +553,13 @@
553553
Parameters:
554554
StartTime String 获取数据起始时间点,日期格式按ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如:2016-08-01T21:14+0800
555555
EndTime String 结束时间需大于起始时间;获取日期格式按照ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如: 2016-08-01T21:14+0800
556-
StreamUrl String 流名,支持批量查询,多个流名用逗号(半角)分隔
556+
StreamUrls String 流名,支持批量查询,多个流名用逗号(半角)分隔
557557
Regions String 计费区域名称,取值为CN:中国大陆,HK:香港,TW:台湾,AS:亚洲其他,NA:北美洲,SA:南美洲,EU:欧洲,AU:大洋洲,AF:非洲,支持多计费区域查询,多个区域用逗号(半角)分隔,缺省为 CN
558558
ResultType String 取值为0:多域名多省份区域多运营商数据做合并;1:每个域名每个省份区域的每个运营商数据分别返回
559559
Granularity String 统计粒度,取值为 5(默认):5分钟粒度;10:10分钟粒度;20:20分钟粒度;60:1小时粒度;240:4小时粒度;480:8小时粒度;1440:1天粒度
560560
561561
'''
562-
#res = client.get_live_bandwidth_data_by_stream(StartTime='2016-12-19T08:00+0800',EndTime='2016-12-20T08:00+0800',StreamUrl='rtmp://realflv3.plu.cn/live/ce781fecb2f6447d82d03590e520872f',ResultType='1',Regions='CN',Granularity='1440')
562+
#res = client.get_live_bandwidth_data_by_stream(StartTime='2016-12-19T08:00+0800',EndTime='2016-12-20T08:00+0800',StreamUrls='rtmp://realflv3.plu.cn/live/ce781fecb2f6447d82d03590e520872f',ResultType='1',Regions='CN',Granularity='1440')
563563

564564

565565
'''
@@ -598,13 +598,13 @@
598598
Parameters:
599599
StartTime String 获取数据起始时间点,日期格式按ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如:2016-08-01T21:14+0800
600600
EndTime String 结束时间需大于起始时间;获取日期格式按照ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如: 2016-08-01T21:14+0800
601-
StreamUrl String 流名,支持批量查询,多个流名用逗号(半角)分隔
601+
StreamUrls String 流名,支持批量查询,多个流名用逗号(半角)分隔
602602
Regions String 计费区域名称,取值为CN:中国大陆,HK:香港,TW:台湾,AS:亚洲其他,NA:北美洲,SA:南美洲,EU:欧洲,AU:大洋洲,AF:非洲,支持多计费区域查询,多个区域用逗号(半角)分隔,缺省为 CN
603603
ResultType String 取值为0:多域名多省份区域多运营商数据做合并;1:每个域名每个省份区域的每个运营商数据分别返回
604604
Granularity String 统计粒度,取值为 5(默认):5分钟粒度;10:10分钟粒度;20:20分钟粒度;60:1小时粒度;240:4小时粒度;480:8小时粒度;1440:1天粒度
605605
606606
'''
607-
#res = client.get_live_online_user_data_by_stream(StartTime='2016-12-19T08:00+0800',EndTime='2016-12-20T08:00+0800',StreamUrl='rtmp://realflv3.plu.cn/live/ce781fecb2f6447d82d03590e520872f',ResultType='0',Regions='CN',Granularity='5')
607+
#res = client.get_live_online_user_data_by_stream(StartTime='2016-12-19T08:00+0800',EndTime='2016-12-20T08:00+0800',StreamUrls='rtmp://realflv3.plu.cn/live/ce781fecb2f6447d82d03590e520872f',ResultType='0',Regions='CN',Granularity='5')
608608

609609

610610
'''
@@ -625,7 +625,19 @@
625625
'''
626626
#res = client.get_live_top_online_user_data(StartTime='2016-11-19T08:00+0800',ResultType='1',Regions='CN',LimitN='100')
627627

628-
628+
'''
629+
get_domain_logs 日志下载接口
630+
631+
Parameters:
632+
PageSize long 分页大小,默认20,最大500,取值1~500间整数
633+
PageNumber long 取第几页。默认为1,取值1~10000
634+
DomainId string 按域名过滤,默认为空,代表当前用户下所有域名
635+
Time string 按域名状态过滤,默认为空,代表当前用户下所有域名状态全部
636+
637+
Returns:
638+
<type 'dict'>
639+
'''
640+
#res = client.get_domain_logs(PageSize=20,PageNumber=1,DomainId='2D09W48',Time='')
629641

630642

631643
#print '****************************cdn test*****************:'

kscore/data/cdn/2016-09-01/service-2.yaml

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
version: '2.0'
2+
version: '2.1'
33

44
metadata:
55
# Version
@@ -16,6 +16,16 @@ documentation: ''
1616

1717
operations:
1818

19+
GetDomainLogs:
20+
name: GetDomainLogs
21+
http:
22+
method: GET
23+
requestUri: /2016-09-01/log/GetDomainLogs
24+
input:
25+
shape: GetDomainLogsRequest
26+
output:
27+
shape: GetDomainLogsResponse
28+
1929
GetCdnDomains:
2030
name: GetCdnDomains
2131
http:
@@ -390,6 +400,52 @@ shapes:
390400
member:
391401
shape: Domain
392402

403+
GetDomainLogsRequest:
404+
type: structure
405+
required:
406+
- DomainId
407+
members:
408+
PageSize:
409+
shape: Long
410+
PageNumber:
411+
shape: Long
412+
DomainId:
413+
shape: String
414+
Time:
415+
shape: String
416+
417+
DomainLogData:
418+
type: structure
419+
members:
420+
StartTime:
421+
shape: String
422+
EndTime:
423+
shape: String
424+
LogName:
425+
shape: String
426+
LogUrl:
427+
shape: String
428+
LogSize:
429+
shape: Long
430+
DomainLogList:
431+
type: list
432+
member:
433+
shape: DomainLogData
434+
435+
GetDomainLogsResponse:
436+
type: structure
437+
members:
438+
PageNumber:
439+
shape: Long
440+
PageSize:
441+
shape: Long
442+
TotalCount:
443+
shape: Long
444+
DomainId:
445+
shape: String
446+
DomainLogs:
447+
shape: DomainLogList
448+
393449
GetCdnDomainsRequest:
394450
type: structure
395451
members:
@@ -1770,14 +1826,14 @@ shapes:
17701826
required:
17711827
- StartTime
17721828
- EndTime
1773-
- StreamUrl
1829+
- StreamUrls
17741830
- ResultType
17751831
members:
17761832
StartTime:
17771833
shape: String
17781834
EndTime:
17791835
shape: String
1780-
StreamUrl:
1836+
StreamUrls:
17811837
shape: String
17821838
Regions:
17831839
shape: String
@@ -1848,14 +1904,14 @@ shapes:
18481904
required:
18491905
- StartTime
18501906
- EndTime
1851-
- StreamUrl
1907+
- StreamUrls
18521908
- ResultType
18531909
members:
18541910
StartTime:
18551911
shape: String
18561912
EndTime:
18571913
shape: String
1858-
StreamUrl:
1914+
StreamUrls:
18591915
shape: String
18601916
Regions:
18611917
shape: String
@@ -2005,14 +2061,14 @@ shapes:
20052061
required:
20062062
- StartTime
20072063
- EndTime
2008-
- StreamUrl
2064+
- StreamUrls
20092065
- ResultType
20102066
members:
20112067
StartTime:
20122068
shape: String
20132069
EndTime:
20142070
shape: String
2015-
StreamUrl:
2071+
StreamUrls:
20162072
shape: String
20172073
Regions:
20182074
shape: String

0 commit comments

Comments
 (0)