-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A package for integrating a variety of captcha solving services. -- -- A package for integrating a variety of captcha solving services. -- -- Feature list: -- -- @package captcha-2captcha @version 0.1.0.0 -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Error -- | All possible errors when solving a captcha using 2Captcha. data TwoCaptchaError TwoCaptchaResponseError :: TwoCaptchaErrorCode -> TwoCaptchaError UnknownResponseError :: Text -> Text -> TwoCaptchaError UnknownError :: Text -> TwoCaptchaError NetworkError :: HttpException -> TwoCaptchaError TimeoutError :: TwoCaptchaError -- | An error code returned by the TwoCaptcha API. data TwoCaptchaErrorCode -- | The api key you provided is invalid. Please ensure it is 32 characters -- long. WrongUserKey :: TwoCaptchaErrorCode -- | The key you've provided does not exist. KeyDoesNotExist :: TwoCaptchaErrorCode -- | You don't have funds in your account. ZeroBalance :: TwoCaptchaErrorCode -- | The pageurl parameter is missing in your request. PageUrlMissing :: TwoCaptchaErrorCode -- | You can receive this error in two cases: -- --
    --
  1. If you solve token-based captchas (reCAPTCHA, hCaptcha, -- ArkoseLabs FunCaptcha, GeeTest, etc): the queue of your captchas -- that are not distributed to workers is too long. Queue limit changes -- dynamically and depends on total amount of captchas awaiting solution -- and usually it’s between 50 and 100 captchas.
  2. --
  3. If you solve Normal Captcha: your maximum rate for normal -- captchas is lower than current rate on the server. You can change your -- maximum rate in your account's settings.
  4. --
NoSlotAvailable :: TwoCaptchaErrorCode -- | Image size is less than 100 bytes. ZeroCaptchaFileSize :: TwoCaptchaErrorCode -- | Image size is more than 100 kB. TooBigCaptchaFileSize :: TwoCaptchaErrorCode -- | Image file has unsupported extension. Accepted extensions: jpg, jpeg, -- gif, png. WrongFileExtension :: TwoCaptchaErrorCode -- | Server can't recognize image file type. ImageTypeNotSupported :: TwoCaptchaErrorCode -- | Server can't get file data from your POST-request. That happens if -- your POST-request is malformed or base64 data is not a valid base64 -- image. UploadFailure :: TwoCaptchaErrorCode -- | The request is sent from the IP that is not on the list of your -- allowed IPs. IpNotAllowed :: TwoCaptchaErrorCode -- | Your IP address is banned due to many frequent attempts to access the -- server using wrong authorization keys. IpBanned :: TwoCaptchaErrorCode -- | You can get this error code when sending reCAPTCHA V2. This happens if -- your request contains invalid pair of googlekey and pageurl. The -- common reason for that is that reCAPTCHA is loaded inside an iframe -- hosted on another domain/subdomain. BadTokenOrPageUrl :: TwoCaptchaErrorCode -- | You can get this error code when sending reCAPTCHA V2. That means that -- sitekey value provided in your request is incorrect: it's blank or -- malformed. GoogleKeyInvalid :: TwoCaptchaErrorCode -- | The googlekey parameter is missing in your request. GoogleKeyMissing :: TwoCaptchaErrorCode -- | You've sent an image that is marked in 2captcha's database as -- unrecognizable. Usually that happens if the website where you found -- the captcha stopped sending you captchas and started to send a "deny -- access" image. CaptchaImageBlocked :: TwoCaptchaErrorCode -- | You are sending too many unrecognizable images. TooManyBadImages :: TwoCaptchaErrorCode -- | You made more than 60 requests to in.php within 3 seconds. Your -- account is banned for 10 seconds. Ban will be lifted automatically. RateLimited :: TwoCaptchaErrorCode -- | The error code is returned if some required parameters are missing in -- your request or the values have incorrect format. For example if you -- submit Grid images but your request is missing an instruction -- for workers. -- -- Blocking time: 5 minutes. BadParameters :: TwoCaptchaErrorCode -- | You can get this error code when sending a captcha via proxy server -- which is marked as BAD by the 2captcha API. BadProxy :: TwoCaptchaErrorCode -- | Your captcha is not solved yet. CaptchaNotReady :: TwoCaptchaErrorCode -- | 2captcha was unable to solve your captcha - three of their workers -- were unable solve it or they didn't get an answer within 90 seconds -- (300 seconds for reCAPTCHA V2). -- -- You will not be charged for that request. CaptchaUnsolvable :: TwoCaptchaErrorCode -- | You've provided captcha ID in wrong format. The ID can contain numbers -- only. WrongIdFormat :: TwoCaptchaErrorCode -- | You provided an invalid captcha id. WrongCaptchaId :: TwoCaptchaErrorCode -- | Error is returned when 100% accuracy feature is enabled. The error -- means that max numbers of tries is reached but min number of matches -- not found. BadDuplicates :: TwoCaptchaErrorCode -- | Error is returned to your report request if you already -- complained lots of correctly solved captchas (more than 40%). Or if -- more than 15 minutes passed after you submitted the captcha. ReportNotRecorded :: TwoCaptchaErrorCode -- | Error is returned to your report request if you are trying to -- report the same captcha more than once. DuplicateReport :: TwoCaptchaErrorCode -- | You can receive this error code when sending GeeTest. This -- error means the challenge value you provided is expired. TokenExpired :: TwoCaptchaErrorCode -- | Action parameter is missing or no value is provided for action -- parameter. EmptyAction :: TwoCaptchaErrorCode -- | You can get this error code if we were unable to load a captcha -- through your proxy server. The proxy will be marked as BAD by our API -- and we will not accept requests with the proxy during 10 minutes. You -- will recieve ERROR_BAD_PROXY code from in.php API endpoint in such -- case. ProxyConnectionFailed :: TwoCaptchaErrorCode -- | Textual representation of a TwoCaptchaErrorCode errorCode :: TwoCaptchaErrorCode -> Text -- | Parse an error code into its equivalent TwoCaptchaErrorCode. parseError :: Text -> Maybe TwoCaptchaErrorCode instance GHC.Enum.Bounded Captcha.TwoCaptcha.Internal.Error.TwoCaptchaErrorCode instance GHC.Enum.Enum Captcha.TwoCaptcha.Internal.Error.TwoCaptchaErrorCode instance GHC.Classes.Ord Captcha.TwoCaptcha.Internal.Error.TwoCaptchaErrorCode instance GHC.Classes.Eq Captcha.TwoCaptcha.Internal.Error.TwoCaptchaErrorCode instance GHC.Show.Show Captcha.TwoCaptcha.Internal.Error.TwoCaptchaErrorCode instance GHC.Exception.Type.Exception Captcha.TwoCaptcha.Internal.Error.TwoCaptchaError instance GHC.Show.Show Captcha.TwoCaptcha.Internal.Error.TwoCaptchaError -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal -- | Used for picking MonadCaptcha instances for 2Captcha. data TwoCaptcha -- | Parse the http response into the captcha answer, handling any errors -- found. parseResponse :: (Value -> Maybe Value) -> Either HttpException (Response ByteString) -> Either TwoCaptchaError Value -- | Parse the proxy type to its textual representation. parseProxyType :: HasProxy a (Maybe Proxy) => a -> [Text] -- | Parse the proxy into the format: username:password@address:port parseProxy :: HasProxy a (Maybe Proxy) => a -> [Text] -- | Default option parameters when making 2Captcha requests. defaultOptions :: Options instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Unlift.MonadUnliftIO m) => Captcha.Internal.Monad.Class.MonadCaptcha Captcha.TwoCaptcha.Internal.TwoCaptcha r m instance Captcha.Internal.Monad.Class.CaptchaResponse Captcha.TwoCaptcha.Internal.TwoCaptcha ctx -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Types.FunCaptcha instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Class.MonadIO m) => Captcha.Internal.Monad.Class.CaptchaRequest Captcha.TwoCaptcha.Internal.TwoCaptcha Captcha.Internal.Types.FunCaptcha r m -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Types.HCaptcha instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Class.MonadIO m) => Captcha.Internal.Monad.Class.CaptchaRequest Captcha.TwoCaptcha.Internal.TwoCaptcha Captcha.Internal.Types.HCaptcha r m -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Types.Image instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Class.MonadIO m) => Captcha.Internal.Monad.Class.CaptchaRequest Captcha.TwoCaptcha.Internal.TwoCaptcha Captcha.Internal.Types.ImageCaptcha r m -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Types.ReCaptchaV2 instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Class.MonadIO m) => Captcha.Internal.Monad.Class.CaptchaRequest Captcha.TwoCaptcha.Internal.TwoCaptcha Captcha.Internal.Types.ReCaptchaV2 r m -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Types.ReCaptchaV3 instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Class.MonadIO m) => Captcha.Internal.Monad.Class.CaptchaRequest Captcha.TwoCaptcha.Internal.TwoCaptcha Captcha.Internal.Types.ReCaptchaV3 r m -- | This module is for internal-use and does not follow pvp versioning -- policies. module Captcha.TwoCaptcha.Internal.Types.Text instance (Captcha.Internal.Monad.HasCaptchaEnv r, Control.Monad.Reader.Class.MonadReader r m, Control.Monad.IO.Class.MonadIO m) => Captcha.Internal.Monad.Class.CaptchaRequest Captcha.TwoCaptcha.Internal.TwoCaptcha Captcha.Internal.Types.TextCaptcha r m -- | This module exports functions that follow the pvp versioning policies. module Captcha.TwoCaptcha -- | An error code returned by the TwoCaptcha API. data TwoCaptchaErrorCode -- | The api key you provided is invalid. Please ensure it is 32 characters -- long. WrongUserKey :: TwoCaptchaErrorCode -- | The key you've provided does not exist. KeyDoesNotExist :: TwoCaptchaErrorCode -- | You don't have funds in your account. ZeroBalance :: TwoCaptchaErrorCode -- | The pageurl parameter is missing in your request. PageUrlMissing :: TwoCaptchaErrorCode -- | You can receive this error in two cases: -- --
    --
  1. If you solve token-based captchas (reCAPTCHA, hCaptcha, -- ArkoseLabs FunCaptcha, GeeTest, etc): the queue of your captchas -- that are not distributed to workers is too long. Queue limit changes -- dynamically and depends on total amount of captchas awaiting solution -- and usually it’s between 50 and 100 captchas.
  2. --
  3. If you solve Normal Captcha: your maximum rate for normal -- captchas is lower than current rate on the server. You can change your -- maximum rate in your account's settings.
  4. --
NoSlotAvailable :: TwoCaptchaErrorCode -- | Image size is less than 100 bytes. ZeroCaptchaFileSize :: TwoCaptchaErrorCode -- | Image size is more than 100 kB. TooBigCaptchaFileSize :: TwoCaptchaErrorCode -- | Image file has unsupported extension. Accepted extensions: jpg, jpeg, -- gif, png. WrongFileExtension :: TwoCaptchaErrorCode -- | Server can't recognize image file type. ImageTypeNotSupported :: TwoCaptchaErrorCode -- | Server can't get file data from your POST-request. That happens if -- your POST-request is malformed or base64 data is not a valid base64 -- image. UploadFailure :: TwoCaptchaErrorCode -- | The request is sent from the IP that is not on the list of your -- allowed IPs. IpNotAllowed :: TwoCaptchaErrorCode -- | Your IP address is banned due to many frequent attempts to access the -- server using wrong authorization keys. IpBanned :: TwoCaptchaErrorCode -- | You can get this error code when sending reCAPTCHA V2. This happens if -- your request contains invalid pair of googlekey and pageurl. The -- common reason for that is that reCAPTCHA is loaded inside an iframe -- hosted on another domain/subdomain. BadTokenOrPageUrl :: TwoCaptchaErrorCode -- | You can get this error code when sending reCAPTCHA V2. That means that -- sitekey value provided in your request is incorrect: it's blank or -- malformed. GoogleKeyInvalid :: TwoCaptchaErrorCode -- | The googlekey parameter is missing in your request. GoogleKeyMissing :: TwoCaptchaErrorCode -- | You've sent an image that is marked in 2captcha's database as -- unrecognizable. Usually that happens if the website where you found -- the captcha stopped sending you captchas and started to send a "deny -- access" image. CaptchaImageBlocked :: TwoCaptchaErrorCode -- | You are sending too many unrecognizable images. TooManyBadImages :: TwoCaptchaErrorCode -- | You made more than 60 requests to in.php within 3 seconds. Your -- account is banned for 10 seconds. Ban will be lifted automatically. RateLimited :: TwoCaptchaErrorCode -- | The error code is returned if some required parameters are missing in -- your request or the values have incorrect format. For example if you -- submit Grid images but your request is missing an instruction -- for workers. -- -- Blocking time: 5 minutes. BadParameters :: TwoCaptchaErrorCode -- | You can get this error code when sending a captcha via proxy server -- which is marked as BAD by the 2captcha API. BadProxy :: TwoCaptchaErrorCode -- | Your captcha is not solved yet. CaptchaNotReady :: TwoCaptchaErrorCode -- | 2captcha was unable to solve your captcha - three of their workers -- were unable solve it or they didn't get an answer within 90 seconds -- (300 seconds for reCAPTCHA V2). -- -- You will not be charged for that request. CaptchaUnsolvable :: TwoCaptchaErrorCode -- | You've provided captcha ID in wrong format. The ID can contain numbers -- only. WrongIdFormat :: TwoCaptchaErrorCode -- | You provided an invalid captcha id. WrongCaptchaId :: TwoCaptchaErrorCode -- | Error is returned when 100% accuracy feature is enabled. The error -- means that max numbers of tries is reached but min number of matches -- not found. BadDuplicates :: TwoCaptchaErrorCode -- | Error is returned to your report request if you already -- complained lots of correctly solved captchas (more than 40%). Or if -- more than 15 minutes passed after you submitted the captcha. ReportNotRecorded :: TwoCaptchaErrorCode -- | Error is returned to your report request if you are trying to -- report the same captcha more than once. DuplicateReport :: TwoCaptchaErrorCode -- | You can receive this error code when sending GeeTest. This -- error means the challenge value you provided is expired. TokenExpired :: TwoCaptchaErrorCode -- | Action parameter is missing or no value is provided for action -- parameter. EmptyAction :: TwoCaptchaErrorCode -- | You can get this error code if we were unable to load a captcha -- through your proxy server. The proxy will be marked as BAD by our API -- and we will not accept requests with the proxy during 10 minutes. You -- will recieve ERROR_BAD_PROXY code from in.php API endpoint in such -- case. ProxyConnectionFailed :: TwoCaptchaErrorCode -- | All possible errors when solving a captcha using 2Captcha. data TwoCaptchaError TwoCaptchaResponseError :: TwoCaptchaErrorCode -> TwoCaptchaError UnknownResponseError :: Text -> Text -> TwoCaptchaError UnknownError :: Text -> TwoCaptchaError NetworkError :: HttpException -> TwoCaptchaError TimeoutError :: TwoCaptchaError -- | Used for picking MonadCaptcha instances for 2Captcha. data TwoCaptcha