コード例 #1
0
        public List <GamesAndSubs.GameAccount> GetOwnedGames()
        {
            webView.NavigateAndWait(gamesUrl);
            var textGames = webView.GetPageText();
            var games     = Serialization.FromJson <GamesAndSubs>(textGames);

            return(games.gameAccounts);
        }
コード例 #2
0
        public AccountBasicRespose GetAccountInfo()
        {
            webView.NavigateAndWait(@"https://menu.gog.com/v1/account/basic");
            var stringInfo  = webView.GetPageText();
            var accountInfo = JsonConvert.DeserializeObject <AccountBasicRespose>(stringInfo);

            return(accountInfo);
        }
コード例 #3
0
        public AccountBasicRespose GetAccountInfo()
        {
            webView.NavigateAndWait(@"https://menu.gog.com/v1/account/basic");
            var stringInfo  = webView.GetPageText();
            var accountInfo = Serialization.FromJson <AccountBasicRespose>(stringInfo);

            return(accountInfo);
        }
コード例 #4
0
        public string GetWishList()
        {
            string url = string.Format(@"https://embed.gog.com/user/wishlist.json");

            webView.NavigateAndWait(url);
            return(webView.GetPageText());
        }
コード例 #5
0
        public AuthTokenResponse GetAccessToken()
        {
            webView.NavigateAndWait(tokenUrl);
            var stringInfo = webView.GetPageText();
            var tokenData  = JsonConvert.DeserializeObject <AuthTokenResponse>(stringInfo);

            return(tokenData);
        }
コード例 #6
0
        public AuthTokenResponse GetAccessToken()
        {
            webView.NavigateAndWait(tokenUrl);
            var stringInfo = webView.GetPageText();
            var tokenData  = Serialization.FromJson <AuthTokenResponse>(stringInfo);

            return(tokenData);
        }
コード例 #7
0
        //  public class MyCookieVisitor : ICookieVisitor
        //  {

        //      private static ILogger logger = LogManager.GetLogger();
        //      public bool Visit(CefSharp.Cookie cookie, int count, int total, ref bool deleteCookie)
        //      {
        //          logger.Info(cookie.Domain);
        //          logger.Info(cookie.Name);
        //          logger.Info(cookie.Value);
        //          logger.Info(cookie.Path);
        //          return true;
        //      }
        //      public void Dispose()
        //      {

        //      }
        //  }

        public string GetAccessToken()
        {
            webView.NavigateAndWait(tokenUrl);

            string myjson  = webView.GetPageText();
            JArray objects = null;

            try
            {
                objects = JArray.Parse(webView.GetPageText());
                //MyCookieVisitor v = new MyCookieVisitor();
                //  Cef.GetGlobalCookieManager().VisitAllCookies(v);


                return("x");
            }
            catch (Exception e)
            {
                return("");
            }
        }
コード例 #8
0
        internal List <Order> GetOrders(List <string> gamekeys)
        {
            var orders = new List <Order>();

            foreach (var key in gamekeys)
            {
                webView.NavigateAndWait(string.Format(orderUrlMask, key));
                var strContent = webView.GetPageText();
                orders.Add(Serialization.FromJson <Order>(strContent));
            }

            return(orders);
        }