Exemplo n.º 1
0
 /// <summary>
 /// 会话管理器
 /// </summary>
 public PrivSessionManager(IAuthBase auth)
 {
     sess = new ThirdPartAPIs(auth.GetLoginCookies());
     followed_sessions   = new List <PrivMessageSession>();
     unfollowed_sessions = new List <PrivMessageSession>();
     group_sessions      = new List <PrivMessageSession>();
 }
Exemplo n.º 2
0
        public BiliLiveRoom(int roomid, IAuthBase auth)
        {
            this.sess = new ThirdPartAPIs(auth.GetLoginCookies());
            string  data = ThirdPartAPIs._get("https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom?room_id=" + roomid);
            JObject json = (JObject)JsonConvert.DeserializeObject(data);

            roomid      = json["data"]["room_info"].Value <int>("room_id");
            shortid     = json["data"]["room_info"].Value <int>("short_id");
            title       = json["data"]["room_info"].Value <string>("title");
            cover       = json["data"]["room_info"].Value <string>("cover");
            tags        = json["data"]["room_info"].Value <string>("tags").Split(',');
            keyframe    = json["data"]["room_info"].Value <string>("keyframe");
            status      = json["data"]["room_info"].Value <short>("live_status");
            lid         = json["data"]["room_info"].Value <int>("live_start_time");
            this.roomid = roomid;
            manage      = new LiveManagement(this);
            //keyframe
        }
Exemplo n.º 3
0
 public BiliSpaceDynamic(int uid, IAuthBase auth)
 {
     this.sess = new ThirdPartAPIs(auth.GetLoginCookies());
     this.uid  = uid;
 }