Esempio n. 1
0
 /// <summary>
 /// 添加某个用户到黑名单
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="name">他人的帐户名</param>
 /// <returns>操作结果</returns>
 public ResponseData AddBlacklist(string requestUrl, string name)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("name", name);
     return this.GetResponseData<ResponseData>(requestUrl, parameters, null);
 }
Esempio n. 2
0
 /// <summary>
 /// 根据话题ID获取话题相关信息
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="ids">话题ID列表,最多15个</param>
 /// <returns>结果</returns>
 public HTData GetInfoByUrl(string requestUrl, params string[] ids)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("ids", string.Join(",", ids));
     return this.GetResponseData<HTData>(requestUrl, parameters);
 }
Esempio n. 3
0
 /// <summary>
 /// 根据话题名称查话题ID
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="httexts">话题名字列表</param>
 /// <returns>结果</returns>
 public HTCheckData QueryByUrl(string requestUrl, params string[] httexts)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("httexts", string.Join(",", httexts));
     return this.GetResponseData<HTCheckData>(requestUrl, parameters);
 }
Esempio n. 4
0
 /// <summary>
 /// 收藏一条微博
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="id">微博id</param>
 /// <returns>结果.</returns>
 public TweetOperateResult AddTweet(string requestUrl, long id)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("id", id);
     return this.GetResponseData<TweetOperateResult>(requestUrl, parameters, null);
 }
Esempio n. 5
0
 /// <summary>
 /// 收藏话题
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="id">需要收藏的话题ID</param>
 /// <returns>结果.</returns>
 public ResponseData AddHT(string requestUrl, long id)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("id", id);
     return this.GetResponseData<ResponseData>(requestUrl, parameters, null);
 }
Esempio n. 6
0
 /// <summary>
 /// 获取其他人资料
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="name">他人的帐户名</param>
 /// <returns>帐号信息.</returns>
 public UserProfileData<OtherUserProfile> GetOtherProfile(string requestUrl, string name)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("name", name);
     return this.GetResponseData<UserProfileData<OtherUserProfile>>(requestUrl, parameters);
 }
Esempio n. 7
0
 /// <summary>
 /// 获取主页时间线数据
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="pageflag">分页标识</param>
 /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param>
 /// <param name="reqnum">每次请求记录的条数(1-20条)</param>
 /// <returns>获取用户收听的人+用户本人最新n条微博信息,与用户“我的主页”返回内容相同。</returns>
 public TimelineData GetHomeTimeline(string requestUrl, PageFlag pageflag, long pagetime, int reqnum)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("pageflag", (int)pageflag);
     parameters.Add("pagetime", pagetime);
     parameters.Add("reqnum", reqnum);
     return this.GetResponseData<TimelineData>(requestUrl, parameters);
 }
Esempio n. 8
0
 /// <summary>
 /// 获取话题热榜
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="type">请求类型 1 话题名,2 搜索关键字 3 两种类型都有</param>
 /// <param name="reqnum">请求个数(最多20)</param>
 /// <param name="pos">请求位置,第一次请求时填0,继续填上次返回的pos</param>
 /// <returns>结果数据列表</returns>
 public ResponseData GetHTTrends(string requestUrl, HTTrendsType type, int reqnum, int pos)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("type", (byte)type);
     parameters.Add("reqnum", reqnum);
     parameters.Add("pos", pos);
     return this.GetResponseData<ResponseData>(requestUrl, parameters);
 }
Esempio n. 9
0
 /// <summary>
 /// 发一条私信
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="name">对方用户名</param>
 /// <param name="content">微博内容</param>
 /// <param name="clientip">用户ip(以分析用户所在地)</param>
 /// <param name="jing">经度(可以填空)</param>
 /// <param name="wei">纬度(可以填空)</param>
 /// <returns>结果</returns>
 public TweetOperateResult Add(string requestUrl, string name, string content, string clientip, string jing, string wei)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("name", name);
     parameters.Add("content", content);
     parameters.Add("clientip", clientip);
     parameters.Add("jing", jing);
     parameters.Add("wei", wei);
     return this.GetResponseData<TweetOperateResult>(requestUrl, parameters, null);
 }
Esempio n. 10
0
 public TimelineData GetBroadcast_timeline(PageFlag pageflag, long pagetime, int reqnum, int Lastid=0)
 {
     //return this.GetHomeTimeline("http://open.t.qq.com/api/statuses/broadcast_timeline", pageflag, pagetime, reqnum);
     string requestUrl = "http://open.t.qq.com/api/statuses/broadcast_timeline";
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("pageflag", (int)pageflag);
     parameters.Add("pagetime", pagetime);
     parameters.Add("reqnum", reqnum);
     parameters.Add("lastid", Lastid);
     return this.GetResponseData<TimelineData>(requestUrl, parameters);
 }
Esempio n. 11
0
 /// <summary>
 /// 同步获取授权的Access Token,调用此方法时必须设置Token与TokenSecret属性的值为request_token与request_secret
 /// 如果获取成功, 对象实例的Token与TokenSecret属性值将改为access_token与access_secret
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="verifier">请求授权request token时返回的验证码</param>
 /// <param name="name">微博帐户名</param>
 /// <returns>是否获取Access Token成功</returns>
 public bool GetAccessToken(string requestUrl, string verifier, out string name)
 {
     NameValueCollection responseData;
     Parameters parameters = new Parameters();
     parameters.Add("oauth_token", this.Token);
     parameters.Add("oauth_verifier", verifier);
     var r = this.GetOAuthToken(requestUrl, parameters, out responseData);
     name = responseData == null ? null : responseData["name"];
     return r;
 }
Esempio n. 12
0
        /// <summary>
        /// 对数据进行签名
        /// </summary>
        /// <param name="requestMethod">请求方法.如GET或POST</param>
        /// <param name="requestUrl">API请求地址</param>
        /// <param name="parameters">提交参数</param>
        /// <returns></returns>
        public string GenerateSignature(string requestMethod, string requestUrl, Parameters parameters)
        {
            HMACSHA1 hmacsha1 = new HMACSHA1();
            hmacsha1.Key = Encoding.ASCII.GetBytes(string.Format("{0}&{1}", Util.UrlEncode(this.AppSecret), Util.UrlEncode(this.TokenSecret)));

            StringBuilder data = new StringBuilder(100);
            data.AppendFormat("{0}&{1}&", requestMethod.ToUpper(), Util.UrlEncode(requestUrl));
            //处理参数
            if (parameters != null)
            {
                parameters.Sort();
                data.Append(Util.UrlEncode(parameters.BuildQueryString(true)));
            }

            byte[] dataBuffer = System.Text.Encoding.ASCII.GetBytes(data.ToString());
            byte[] hashBytes = hmacsha1.ComputeHash(dataBuffer);

            return Convert.ToBase64String(hashBytes);
        }
Esempio n. 13
0
        /// <summary>
        /// 解析XML数据
        /// </summary>
        protected override void Parse()
        {
            this.Name = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("name"));
            this.NickName = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("nick"));
            this.Head = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("head"));
            this.Location = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("location"));
            this.CountryCode = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("country_code"));
            this.ProvinceCode = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("province_code"));
            this.CityCode = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("city_code"));
            this.IsVip = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("isvip")) != 0;
            this.IsIdol = Util.GetXmlNodeValue<bool>(this.Xml.SelectSingleNode("isidol"));
            this.Fansnum = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("fansnum"));
            this.Idolnum = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("idolnum"));
            this.Tweet = Util.GetXmlNodeValue<TweetSummary>(this.Xml.SelectSingleNode("tweet"));
            this.Tags = null;

            var items = new Parameters();
            var tags = this.Xml.SelectNodes("tag");
            foreach (XmlNode n in tags)
            {
                string id = Util.GetXmlNodeValue<string>(n.SelectSingleNode("id"));
                string name = Util.GetXmlNodeValue<string>(n.SelectSingleNode("name"));
                items.Add(id, name);
            }
            this.Tags = items.Items.ToArray();
        }
Esempio n. 14
0
 /// <summary>
 /// 获取微博的转播数
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="ids">微博id集合</param>
 /// <returns>结果数据.</returns>
 public ResponseData GetReCount(string requestUrl, params long[] ids)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("ids", Util.Join<long>(",", ids));
     return this.GetResponseData<ResponseData>(requestUrl, parameters);
 }
Esempio n. 15
0
        /// <summary>
        /// 发表一条微博
        /// </summary>
        /// <param name="requestUrl">API请求地址</param>
        /// <param name="content">微博内容</param>
        /// <returns>发表结果</returns>
        public TweetOperateResult Add(string requestUrl, TweetContent content)
        {
            Parameters parameters = new Parameters();
            parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
            parameters.Add("content", content.Text);
            parameters.Add("clientip", content.ClientIP);
            parameters.Add("jing", content.Jing);
            parameters.Add("wei", content.Wei);

            Files files = null;
            if (content.HasImage)
            {
                files = new Files();
                files.Add("pic", content.Image);
            }
            return this.GetResponseData<TweetOperateResult>(requestUrl, parameters, files);
        }
Esempio n. 16
0
        /// <summary>
        /// 解析XML数据
        /// </summary>
        protected override void Parse()
        {
            this.Name = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("name"));
            this.NickName = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("nick"));
            this.Uid = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("uid"));
            this.Head = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("head"));
            this.Location = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("location"));
            this.CountryCode = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("country_code"));
            this.ProvinceCode = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("province_code"));
            this.CityCode = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("city_code"));
            this.IsVip = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("isvip")) != 0;
            this.IsEnt = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("isent")) != 0;
            this.Introduction = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("introduction"));
            this.VerifyInfo = Util.GetXmlNodeValue<string>(this.Xml.SelectSingleNode("verifyinfo"));
            this.BirthYear = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("birth_year"));
            this.BirthMonth = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("birth_month"));
            this.BirthDay = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("birth_day"));
            this.Sex = (Sex)Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("sex"));
            this.Fansnum = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("fansnum"));
            this.Idolnum = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("idolnum"));
            this.Tweetnum = Util.GetXmlNodeValue<int>(this.Xml.SelectSingleNode("tweetnum"));
            this.Tags = null;

            var items = new Parameters();
            var tags = this.Xml.SelectNodes("tag");
            foreach (XmlNode n in tags)
            {
                string id = Util.GetXmlNodeValue<string>(n.SelectSingleNode("id"));
                string name = Util.GetXmlNodeValue<string>(n.SelectSingleNode("name"));
                items.Add(id, name);
            }
            this.Tags = items.Items.ToArray();
        }
Esempio n. 17
0
 /// <summary>
 /// 获取获取话题时间线
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="pageflag">分页标识</param>
 /// <param name="httext">话题名字</param>
 /// <param name="pageinfo">分页标识(第一页 填空,继续翻页:根据返回的 pageinfo决定)</param>
 /// <param name="reqnum">每次请求记录的条数(1-20条)</param>
 /// <returns>获取某个话题有关的最新n条微博。</returns>
 public HTTimelineData GetHTTimeline(string requestUrl, PageFlag pageflag, string httext, string pageinfo, int reqnum)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("pageflag", (int)pageflag);
     parameters.Add("httext", httext);
     parameters.Add("pageinfo", pageinfo);
     parameters.Add("reqnum", reqnum);
     return this.GetResponseData<HTTimelineData>(requestUrl, parameters);
 }
Esempio n. 18
0
        /// <summary>
        /// 同步获取未授权的Request Token. 
        /// 如果获取成功, 对象实例的Token与TokenSecret属性值将改为request_token与request_secret
        /// </summary>
        /// <param name="requestUrl">API请求地址</param>
        /// <param name="callback">返回地址</param>
        /// <returns>是否获取request token成功</returns>
        public bool GetRequestToken(string requestUrl, string callback)
        {
            this.Token = string.Empty;
            this.TokenSecret = string.Empty;

            NameValueCollection responseData;
            Parameters parameters = new Parameters();
            parameters.Add("oauth_callback", string.IsNullOrEmpty(callback) ? "null" : callback);
            var r = this.GetOAuthToken(requestUrl, parameters, out responseData);

            return r;
        }
Esempio n. 19
0
 /// <summary>
 /// 获取我可能认识的人
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="ip">相同IP的人(用户的IP)</param>
 /// <param name="country_code">国家码 可以不填</param>
 /// <param name="province_code">省份码 可以不填</param>
 /// <param name="city_code">城市码 可以不填</param>
 /// <returns>用户列表</returns>
 public PersonData WhoIsIKnow(string requestUrl, string ip, string country_code, string province_code, string city_code)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("ip", ip);
     if (!string.IsNullOrEmpty(country_code)) parameters.Add("country_code", country_code);
     if (!string.IsNullOrEmpty(province_code)) parameters.Add("province_code", province_code);
     if (!string.IsNullOrEmpty(city_code)) parameters.Add("city_code", city_code);
     return this.GetResponseData<PersonData>(requestUrl, parameters);
 }
Esempio n. 20
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);
        }
Esempio n. 21
0
 /// <summary>
 /// 更新用户信息
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="nick">昵称</param>
 /// <param name="sex">性别 0 ,1:男2:女</param>
 /// <param name="year">出生年 1900-?</param>
 /// <param name="month">出生月 1-12</param>
 /// <param name="day">出生日 1-31</param>
 /// <param name="countrycode">国家码</param>
 /// <param name="provincecode">地区码</param>
 /// <param name="citycode">城市码</param>
 /// <param name="introduction">个人介绍</param>
 /// <returns>更新结果</returns>
 public ResponseData Update(string requestUrl, string nick, Sex sex, int year, int month, int day, string countrycode, string provincecode, string citycode, string introduction)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("nick", nick);
     parameters.Add("sex", (byte)sex);
     parameters.Add("year", year);
     parameters.Add("month", month);
     parameters.Add("day", day);
     parameters.Add("countrycode", countrycode);
     parameters.Add("provincecode", provincecode);
     parameters.Add("citycode", citycode);
     parameters.Add("introduction", introduction);
     return this.GetResponseData<ResponseData>(requestUrl, parameters, null);
 }
Esempio n. 22
0
 /// <summary>
 /// 查看数据更新条数
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="op">请求类型, 如果值为Get,则忽略type参数值,否则将对应的type类型数据进行清零</param>
 /// <param name="type">数据类型</param>
 /// <returns>数据统计报表</returns>
 public StatisticsData GetStatistics(string requestUrl, StatisticsOperate op, StatisticsType type)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("op", (byte)op);
     if (op != StatisticsOperate.Get)
     {
         parameters.Add("type", (byte)type);
     }
     return this.GetResponseData<StatisticsData>(requestUrl, parameters);
 }
Esempio n. 23
0
        /// <summary>
        /// 获取授权Token
        /// </summary>
        /// <param name="requestUrl">API请求地址</param>
        /// <param name="parameters"></param>
        /// <param name="responseData"></param>
        /// <returns></returns>
        private bool GetOAuthToken(string requestUrl, Parameters parameters, out NameValueCollection responseData)
        {
            this.LastError = null;
            responseData = null;
            parameters.Add("oauth_consumer_key", this.AppKey);
            parameters.Add("oauth_signature_method", "HMAC-SHA1");
            parameters.Add("oauth_timestamp", Util.GenerateTimestamp());
            parameters.Add("oauth_nonce", Util.GenerateRndNonce());
            parameters.Add("oauth_version", "1.0");
            parameters.Add("oauth_signature", this.GenerateSignature("GET", requestUrl, parameters));
            string url = string.Concat(requestUrl, "?", parameters.BuildQueryString(true));

            SyncHttpRequest request = new SyncHttpRequest(url, this.Charset);
            try
            {
                string response = request.Get();
                if (!string.IsNullOrEmpty(response))
                {
                    responseData = HttpUtility.ParseQueryString(response, this.Charset);
                    this.Token = responseData["oauth_token"];
                    this.TokenSecret = responseData["oauth_token_secret"];
                    return !string.IsNullOrEmpty(this.Token) && !string.IsNullOrEmpty(this.TokenSecret);
                }
            }
            catch (Exception ex)
            {
                this.LastError = ex;
            }
            return false;
        }
Esempio n. 24
0
 /// <summary>
 /// 检测是否我听众或我收听的人
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="flag">检查类型</param>
 /// <param name="names">帐户名</param>
 /// <returns>操作结果</returns>
 public UserCheckData Check(string requestUrl, UserCheck flag, params string[] names)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("flag", (byte)flag);
     parameters.Add("names", string.Join(",", names));
     return this.GetResponseData<UserCheckData>(requestUrl, parameters);
 }
Esempio n. 25
0
 /// <summary>
 /// 获取广播大厅时间线
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="pos">记录的起始位置(第一次请求是填0,继续请求进填上次返回的pos)</param>
 /// <param name="reqnum">每次请求记录的条数(1-20条)</param>
 /// <returns>获取最新n条公共微博信息,与“广播大厅—全部广播”返回内容相同。</returns>
 public PublicTimelineData GetPublicTimeline(string requestUrl, long pos, int reqnum)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("pos", pos);
     parameters.Add("reqnum", reqnum);
     return this.GetResponseData<PublicTimelineData>(requestUrl, parameters);
 }
Esempio n. 26
0
 /// <summary>
 /// 获取用户本人的黑名单列表
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="reqnum">每次请求记录的条数(1-30条)</param>
 /// <param name="startindex">起始位置(第一页填0,继续向下翻页:填:【reqnum*(page-1)】)</param>
 /// <returns>获取用户本人已收听的最新n个人列表</returns>
 public PersonData GetBlacklist(string requestUrl, int reqnum, int startindex)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("reqnum", reqnum);
     parameters.Add("startindex", startindex);
     return this.GetResponseData<PersonData>(requestUrl, parameters);
 }
Esempio n. 27
0
 /// <summary>
 /// 获取其他帐户特别收听的人列表
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="name">用户帐户名</param>
 /// <param name="reqnum">每次请求记录的条数(1-30条)</param>
 /// <param name="startindex">起始位置(第一页填0,继续向下翻页:填:【reqnum*(page-1)】)</param>
 /// <returns>特别收听的人列表</returns>
 public UserData GetUserSpeciallist(string requestUrl, string name, int reqnum, int startindex)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("name", name);
     parameters.Add("reqnum", reqnum);
     parameters.Add("startindex", startindex);
     return this.GetResponseData<UserData>(requestUrl, parameters);
 }
Esempio n. 28
0
 /// <summary>
 /// 获取用户以收藏的话题列表
 /// </summary>
 /// <param name="requestUrl">API请求地址</param>
 /// <param name="pageflag">分页标识</param>
 /// <param name="pagetime">本页起始时间(第一页 0,继续:根据返回记录时间决定)</param>
 /// <param name="reqnum">每次请求记录的条数(1-15条)</param>
 /// <param name="lastid">翻页话题ID,首次请求时为0</param>
 /// <returns>获取用户以收藏的话题列表</returns>
 public ResponseData GetHTList(string requestUrl, PageFlag pageflag, long pagetime, int reqnum, long lastid)
 {
     Parameters parameters = new Parameters();
     parameters.Add("format", this.ResponseDataFormat.ToString().ToLower());
     parameters.Add("pageflag", (int)pageflag);
     parameters.Add("pagetime", pagetime);
     parameters.Add("reqnum", reqnum);
     parameters.Add("lastid", lastid);
     return this.GetResponseData<ResponseData>(requestUrl, parameters);
 }