public List <GamesAndSubs.GameAccount> GetOwnedGames() { webView.NavigateAndWait(gamesUrl); var textGames = webView.GetPageText(); var games = Serialization.FromJson <GamesAndSubs>(textGames); return(games.gameAccounts); }
public AccountBasicRespose GetAccountInfo() { webView.NavigateAndWait(@"https://menu.gog.com/v1/account/basic"); var stringInfo = webView.GetPageText(); var accountInfo = JsonConvert.DeserializeObject <AccountBasicRespose>(stringInfo); return(accountInfo); }
public AccountBasicRespose GetAccountInfo() { webView.NavigateAndWait(@"https://menu.gog.com/v1/account/basic"); var stringInfo = webView.GetPageText(); var accountInfo = Serialization.FromJson <AccountBasicRespose>(stringInfo); return(accountInfo); }
public string GetWishList() { string url = string.Format(@"https://embed.gog.com/user/wishlist.json"); webView.NavigateAndWait(url); return(webView.GetPageText()); }
public AuthTokenResponse GetAccessToken() { webView.NavigateAndWait(tokenUrl); var stringInfo = webView.GetPageText(); var tokenData = JsonConvert.DeserializeObject <AuthTokenResponse>(stringInfo); return(tokenData); }
public AuthTokenResponse GetAccessToken() { webView.NavigateAndWait(tokenUrl); var stringInfo = webView.GetPageText(); var tokenData = Serialization.FromJson <AuthTokenResponse>(stringInfo); return(tokenData); }
// 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(""); } }
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); }