Example #1
0
 /// <summary>
 /// 添加文件
 /// </summary>
 /// <param name="name"></param>
 /// <param name="file"></param>
 public void Add(string name, UploadFile file)
 {
     this.Items.Add(new KeyValuePair<string, UploadFile>(name, file));
 }
Example #2
0
 /// <summary>
 /// 采用默认API请求地址更新用户头像信息
 /// </summary>
 /// <param name="headPicture">头像图片文件</param>
 /// <returns>更新结果</returns>
 public ResponseData UpdateHead(UploadFile headPicture)
 {
     return this.UpdateHead("http://open.t.qq.com/api/user/update_head", headPicture);
 }
Example #3
0
        /// <summary>
        /// 更新用户头像信息
        /// </summary>
        /// <param name="requestUrl">API请求地址</param>
        /// <param name="headPicture">头像图片文件</param>
        /// <returns>更新结果</returns>
        public ResponseData UpdateHead(string requestUrl, UploadFile headPicture)
        {
            Parameters parameters = new Parameters();
            parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());

            Files files = new Files();
            files.Add("pic", headPicture);

            return this.GetResponseData<ResponseData>(requestUrl, parameters, files);
        }
Example #4
0
 /// <summary>
 /// 添加文件
 /// </summary>
 /// <param name="name"></param>
 /// <param name="file"></param>
 public void Add(string name, UploadFile file)
 {
     this.Items.Add(new KeyValuePair <string, UploadFile>(name, file));
 }