/// <summary>
        /// Attempt to login with specified username and password.
        /// </summary>
        /// <param name="tooManyRequests">Is true if response was denied because of too many requests made</param>
        /// <returns>Returns true if login successful</returns>
        public bool Authenticate(out bool tooManyRequests)
        {
            if (IsAuthenicated)
            {
                throw new InvalidOperationException("User is already authenticated!");
            }

            tooManyRequests = false;
            if (SankakuHttpHandler.LoginUser(Username, Password, out string cookieID, out string sankakuID, out string passHash, out tooManyRequests, out string actualUsername) == false ||
                passHash == null || sankakuID == null || sankakuID.Length < 2 || actualUsername == null)
            {
                return(false);
            }
            ;

            this.Username = actualUsername;
            this.SankakuComplexSessionID = sankakuID;
            this.cfduid       = cookieID;
            this.PasswordHash = passHash;

            IsAuthenicated = true;
            return(true);
        }
 public byte[] DownloadFullImage(string imageLink, out bool wasRedirected, bool containsVideo, double sizeLimitMB) => SankakuHttpHandler.DownloadImage(AssociatedUser, GetFullImageLink(), out wasRedirected, containsVideo, sizeLimitMB, PostID);
 public byte[] DownloadFullImage(out string imageLink, out bool wasRedirected)
 {
     imageLink = GetFullImageLink();
     return(SankakuHttpHandler.DownloadImage(AssociatedUser, imageLink, out wasRedirected, true, 0, PostID));
 }
 public byte[] DownloadFullImage(out bool wasRedirected) => SankakuHttpHandler.DownloadImage(AssociatedUser, GetFullImageLink(), out wasRedirected, true, 0, PostID);
 /// <summary>
 /// Get link to image in full quality
 /// </summary>
 /// <param name="user">SankakuChannel user to search the post as</param>
 /// <returns>Link to image in full quality</returns>
 public string GetFullImageLink() => SankakuHttpHandler.GetImageLink(AssociatedUser, this.PostReference);