Beispiel #1
0
 /// <summary>
 /// 构造器
 /// </summary>
 /// <param name="tid">帖子的ID</param>
 public TieThread(long tid)
 {
     JObject th = JSON.parse(_stbapi.sendTieba("/c/f/pb/page", "kz=" + tid + "&pn=1", ""));
     this.tid = tid;
     if (th["error_code"].Value<int>() != 0)
     {
         throw new ThreadNotFindField(tid, th["error_code"].Value<int>(), th["error_msg"].Value<String>());
     }
     maxPage = th["page"]["total_page"].Value<long>();
     title = th["thread"]["title"].Value<String>();
     reply_num = th["thread"]["reply_num"].Value<long>();
     author = new userInBar(th["thread"]["author"]["id"].Value<long>(),
         th["thread"]["author"]["name"].Value<String>(), th["thread"]["author"]["is_like"].Value<int>() == 1,
         th["thread"]["author"]["level_id"].Value<int>(), th["thread"]["author"]["portrait"].Value<String>());
     maxPage = th["page"]["total_page"].Value<long>();
     kw = new kwf(th["forum"]["id"].Value<long>(), th["forum"]["name"].Value<String>());
     tinfo = th;
 }
Beispiel #2
0
 /// <summary>
 /// [内部调用]
 /// </summary>
 /// <param name="tid"></param>
 /// <param name="title"></param>
 /// <param name="reply_num"></param>
 /// <param name="last_time"></param>
 /// <param name="is_top"></param>
 /// <param name="is_good"></param>
 /// <param name="author"></param>
 /// <param name="kw"></param>
 public basethread(long tid, String title, long reply_num, long last_time, bool is_top,
     bool is_good, user author, String kw, long zan, List<userWithPic> zanusr, bool isBduL, long fpid)
 {
     this.tid = tid;
     this.title = title;
     this.reply_num = reply_num;
     this.last_time = last_time;
     this.is_top = is_top;
     this.is_good = is_good;
     this.author = author;
     this.kw = kw;
     this.zan = zan;
     this.zanusr = zanusr;
     this.isBduLiked = isBduL;
     this.fristPid = fpid;
 }