public static DescribeLiveStreamSnapshotInfoResponse Unmarshall(UnmarshallerContext context) { DescribeLiveStreamSnapshotInfoResponse describeLiveStreamSnapshotInfoResponse = new DescribeLiveStreamSnapshotInfoResponse() { HttpResponse = context.HttpResponse, RequestId = context.StringValue("DescribeLiveStreamSnapshotInfo.RequestId"), NextStartTime = context.StringValue("DescribeLiveStreamSnapshotInfo.NextStartTime") }; List <DescribeLiveStreamSnapshotInfoResponse.LiveStreamSnapshotInfo> liveStreamSnapshotInfoList = new List <DescribeLiveStreamSnapshotInfoResponse.LiveStreamSnapshotInfo>(); for (int i = 0; i < context.Length("DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList.Length"); i++) { DescribeLiveStreamSnapshotInfoResponse.LiveStreamSnapshotInfo liveStreamSnapshotInfo = new DescribeLiveStreamSnapshotInfoResponse.LiveStreamSnapshotInfo() { OssEndpoint = context.StringValue($"DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[{i}].OssEndpoint"), OssBucket = context.StringValue($"DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[{i}].OssBucket"), OssObject = context.StringValue($"DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[{i}].OssObject"), CreateTime = context.StringValue($"DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[{i}].CreateTime") }; liveStreamSnapshotInfoList.Add(liveStreamSnapshotInfo); } describeLiveStreamSnapshotInfoResponse.LiveStreamSnapshotInfoList = liveStreamSnapshotInfoList; return(describeLiveStreamSnapshotInfoResponse); }
/// <summary> /// 查询一段时间内截图内容 /// </summary> /// <param name="userID"></param> /// <returns></returns> public string GetSnapshotInfo(string userID, DateTime startTime, DateTime endTime, int limit) { DescribeLiveStreamSnapshotInfoRequest request = new DescribeLiveStreamSnapshotInfoRequest(); request.AppName = ConfigSetting.AppName; request.Product = _ProductName; request.DomainName = ConfigSetting.DomainName; request.AcceptFormat = Aliyun.Acs.Core.Http.FormatType.JSON; request.StreamName = userID; request.StartTime = startTime.ToUniversalTime().ToString(_UtcFormat); request.EndTime = endTime.ToUniversalTime().ToString(_UtcFormat); request.Limit = limit; DescribeLiveStreamSnapshotInfoResponse response = _AcsClient.GetAcsResponse(request); return(GetString(response)); }
public static DescribeLiveStreamSnapshotInfoResponse Unmarshall(UnmarshallerContext _ctx) { DescribeLiveStreamSnapshotInfoResponse describeLiveStreamSnapshotInfoResponse = new DescribeLiveStreamSnapshotInfoResponse(); describeLiveStreamSnapshotInfoResponse.HttpResponse = _ctx.HttpResponse; describeLiveStreamSnapshotInfoResponse.RequestId = _ctx.StringValue("DescribeLiveStreamSnapshotInfo.RequestId"); describeLiveStreamSnapshotInfoResponse.NextStartTime = _ctx.StringValue("DescribeLiveStreamSnapshotInfo.NextStartTime"); List <DescribeLiveStreamSnapshotInfoResponse.DescribeLiveStreamSnapshotInfo_LiveStreamSnapshotInfo> describeLiveStreamSnapshotInfoResponse_liveStreamSnapshotInfoList = new List <DescribeLiveStreamSnapshotInfoResponse.DescribeLiveStreamSnapshotInfo_LiveStreamSnapshotInfo>(); for (int i = 0; i < _ctx.Length("DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList.Length"); i++) { DescribeLiveStreamSnapshotInfoResponse.DescribeLiveStreamSnapshotInfo_LiveStreamSnapshotInfo liveStreamSnapshotInfo = new DescribeLiveStreamSnapshotInfoResponse.DescribeLiveStreamSnapshotInfo_LiveStreamSnapshotInfo(); liveStreamSnapshotInfo.OssEndpoint = _ctx.StringValue("DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[" + i + "].OssEndpoint"); liveStreamSnapshotInfo.OssBucket = _ctx.StringValue("DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[" + i + "].OssBucket"); liveStreamSnapshotInfo.OssObject = _ctx.StringValue("DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[" + i + "].OssObject"); liveStreamSnapshotInfo.CreateTime = _ctx.StringValue("DescribeLiveStreamSnapshotInfo.LiveStreamSnapshotInfoList[" + i + "].CreateTime"); describeLiveStreamSnapshotInfoResponse_liveStreamSnapshotInfoList.Add(liveStreamSnapshotInfo); } describeLiveStreamSnapshotInfoResponse.LiveStreamSnapshotInfoList = describeLiveStreamSnapshotInfoResponse_liveStreamSnapshotInfoList; return(describeLiveStreamSnapshotInfoResponse); }