Beispiel #1
0
        /// <summary>
        /// 上传完成根据对象名查询视频主ID
        /// </summary>
        /// <returns>查询视屏ID返回结果的封装类</returns>
        public QueryVideoIDorWatermarkIDParam queryVideoID()
        {
            /* 接口 */
            string url = "https://vcloud.163.com/app/vod/video/query";
            //String url = Config.getQueryVideoIDURL();
            string json         = JsonHelper.ToJsonString(this.queryVideoIDorWatermarkIDModule);
            string responseJson = HttpClientBuilder.HttpPost(url, json);
            /* 得到Json数据 */
            QueryVideoIDorWatermarkIDParam queryVideoIDParam = (QueryVideoIDorWatermarkIDParam)JsonHelper.ToObject <QueryVideoIDorWatermarkIDParam>(responseJson);

            return(queryVideoIDParam);
        }
Beispiel #2
0
        /// <summary>
        /// 设置上传回调地址
        /// </summary>
        /// <returns>设置上传回调地址接口输出参数的封装类</returns>
        public SetCallbackParam setCallback()
        {
            /* 接口 */
            string url = "https://vcloud.163.com/app/vod/upload/setcallback";
            /* 设置请求的参数 */
            string json         = JsonHelper.ToJsonString(this.setCallbackModule);
            string responseJson = HttpClientBuilder.HttpPost(url, json);
            /* 得到Json数据 */
            SetCallbackParam setCallbackParam = (SetCallbackParam)JsonHelper.ToObject <SetCallbackParam>(responseJson);

            return(setCallbackParam);
        }
Beispiel #3
0
        /// <summary>
        /// 视频上传初始化
        /// </summary>
        /// <returns>视频上传初始化返回结果的封装类</returns>
        public InitUploadVideoParam initUploadVideo()
        {
            string url          = "https://vcloud.163.com/app/vod/upload/init";
            string json         = JsonHelper.ToJsonString(initUploadVideoModule);
            string responseJson = HttpClientBuilder.HttpPost(url, json);
            // Console.WriteLine(responseJson);
            string responseJsonNew = responseJson.Replace("\"object\"", "\"objectName\"");
            // Console.WriteLine(responseJsonNew);
            InitUploadVideoParam initUploadVideoParam = JsonHelper.ToObject <InitUploadVideoParam>(responseJsonNew);

            return(initUploadVideoParam);
        }