コード例 #1
0
        /// <summary>
        /// APP API
        /// </summary>
        /// <returns></returns>
        public static string AppSilver2coin()
        {
            string  url          = "https://api.live.bilibili.com/AppExchange/silver2coin";
            string  userAgent    = _biliClientUserAgent;
            string  cookies      = ReadCookie();
            string  responseData = HttpAide.HttpGet(url: url, cookies: cookies, ua: userAgent);
            dynamic jsonObj      = JsonAide.JsonStr2Obj(responseData);

            if (!JsonAide.IsPropertyExist(jsonObj, "msg"))
            {
                return(null);
            }
            else
            {
                return(jsonObj.msg.ToString());
            }
        }
コード例 #2
0
        public static string DailyBag()
        {
            string  url          = "https://api.live.bilibili.com/gift/v2/live/receive_daily_bag";
            string  userAgent    = _biliClientUserAgent;
            string  cookies      = ReadCookie();
            string  responseData = HttpAide.HttpGet(url: url, cookies: cookies, ua: userAgent);
            dynamic jsonObj      = JsonAide.JsonStr2Obj(responseData);

            if (!JsonAide.IsPropertyExist(jsonObj, "msg"))
            {
                return(null);
            }
            else
            {
                return(jsonObj.msg.ToString());
            }
        }
コード例 #3
0
        public static string SignIn()
        {
            string url       = "https://api.live.bilibili.com/sign/doSign";
            string userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36";

            string[] headers = new string[] {
                "authority: live.bilibili.com"
            };
            string  cookies      = ReadCookie();
            string  responseData = HttpAide.HttpGet(url: url, cookies: cookies, ua: userAgent, headers: headers);
            dynamic jsonObj      = JsonAide.JsonStr2Obj(responseData);

            if (!JsonAide.IsPropertyExist(jsonObj, "msg"))
            {
                return(null);
            }
            else
            {
                return(jsonObj.msg.ToString());
            }
        }