public override bool checkLogin(loginCookies login) { if (login.username == "" || login.cookies == "") { return(false); } webHandler.setCookies(login.cookies); userLoginName = login.username; return(isLoggedIn()); }
//public override Submission getNextImage() //{ // if (pos >= subs.Count()) // { // return new Submission(); // } // int i = pos; // pos++; // string uri = subs[i].thumbnail.ToString(); // Image image = webHandler.getImage(uri); // Submission sub = new Submission(); // sub.thumbnail = image; // sub.title = subs[i].title; // string str = string.Format("FA_{0}", subs[i].id); // sub.pageSource = str; // return sub; //} //public override List<Subs> getThumbsList() //{ // return subs; //} public override async Task <bool> checkLogin(loginCookies login) { if (login.username == "" || login.cookies == "") { return(false); } webHandler.setCookies(login.cookies); userLoginName = login.username; return(await isLoggedInAsync()); }
public override async Task <bool> checkLogin(loginCookies login) { WebHandler webHandler = new WebHandler(); string data = string.Format("sid={0}", login.cookies); string url = baseUrl + "api_submissions.php"; string html = await webHandler.getPageAsync(url, data); dynamic json = JsonConvert.DeserializeObject(html); if (json.sid == "" || jsonError(json)) { return(false); } sid = json.sid; loggedinUsername = login.username; return(true); }
public override bool checkLogin(loginCookies login) { WebHandler webHandler = new WebHandler(); string data = string.Format("username={0}&password={1}", login.username, login.password); string url = baseUrl + "api_login.php"; string html = webHandler.getPage(url, data); dynamic json = JsonConvert.DeserializeObject(html); if (json.sid == "" || jsonError(json)) { return(false); } sid = json.sid; loggedinUsername = login.username; return(true); }
public virtual async Task <bool> checkLogin(loginCookies login) { return(false); }
public virtual bool checkLogin(loginCookies login) { return(false); }