-- 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:
--
--
-- - Makes use of the lens package
-- - Mtl-style typeclass, allowing you to use your own monad
-- transformer stack
-- - No exceptions are thrown. Errors are shown explicitly through its
-- type signature
-- - Minimal test suite provided for each captcha type
-- - Captcha services are separated into different packages. Use what
-- you need!
--
@package captcha-capmonster
@version 0.1.0.0
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.Internal.Error
-- | All possible errors when solving a captcha using CapMonster.
data CapMonsterError
-- | An error returned by the CapMonster API.
CapMonsterResponseError :: CapMonsterErrorCode -> CapMonsterError
-- | An error returned by the CapMonster API that does not exist as a
-- CapMonsterErrorCode yet.
--
-- This error holds the error code, followed by its description.
UnknownResponseError :: Text -> Text -> CapMonsterError
-- | An unknown error occurred. Check the message for more details.
--
-- This should never occur. Please report this issue on github if this
-- happens to you.
UnknownError :: Text -> CapMonsterError
-- | An error when sending the http request.
NetworkError :: HttpException -> CapMonsterError
-- | The captcha took to long to solve and was timed out.
TimeoutError :: CapMonsterError
-- | An error code returned by the CapMonster API.
data CapMonsterErrorCode
-- | The provided API key does not exist.
KeyDoesNotExist :: CapMonsterErrorCode
-- | The size of the captcha must be 100 bytes or larger.
ZeroCaptchaFileSize :: CapMonsterErrorCode
-- | The size of the captcha must be less than 50,000 bytes.
TooBigFileSize :: CapMonsterErrorCode
-- | Your CapMonster balance is empty.
ZeroBalance :: CapMonsterErrorCode
-- | Requests from your current API key is not allowed from your ip.
IpNotAllowed :: CapMonsterErrorCode
-- | The captcha cannot be solved. Perhaps it's a corrupted image, or
-- contains too much noise?
CaptchaUnsolvable :: CapMonsterErrorCode
-- | The captcha id does not exist. Is the captcha older than 5 minutes?
InvalidCaptchaId :: CapMonsterErrorCode
-- | The captcha has not been solved yet.
CaptchaNotReady :: CapMonsterErrorCode
-- | You have sent too many requests with an incorrect API key. Try again
-- later.
IpBanned :: CapMonsterErrorCode
-- | The requested method does not exist. You should not ever have to see
-- this error as a user. If this is ever seen, please open an issue:
-- https://github.com/qwbarch/captcha-haskell/issues
NoSuchMethod :: CapMonsterErrorCode
-- | You are being rate limited. Try not to request the result of a captcha
-- more than 1 time per 2 seconds.
TooManyRequests :: CapMonsterErrorCode
-- | The specified domain cannot be solved by CapMonster.
DomainNotAllowed :: CapMonsterErrorCode
-- | The captcha could not be solved due to no available captcha workers.
NoSlotAvailable :: CapMonsterErrorCode
-- | Textual representation of a CapMonsterErrorCode.
errorCode :: CapMonsterErrorCode -> Text
-- | Parse an error code into its equivalent CapMonsterErrorCode.
parseError :: Text -> Maybe CapMonsterErrorCode
instance GHC.Enum.Bounded Captcha.CapMonster.Internal.Error.CapMonsterErrorCode
instance GHC.Enum.Enum Captcha.CapMonster.Internal.Error.CapMonsterErrorCode
instance GHC.Classes.Ord Captcha.CapMonster.Internal.Error.CapMonsterErrorCode
instance GHC.Classes.Eq Captcha.CapMonster.Internal.Error.CapMonsterErrorCode
instance GHC.Show.Show Captcha.CapMonster.Internal.Error.CapMonsterErrorCode
instance GHC.Exception.Type.Exception Captcha.CapMonster.Internal.Error.CapMonsterError
instance GHC.Show.Show Captcha.CapMonster.Internal.Error.CapMonsterError
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.Internal
-- | Used for picking MonadCaptcha instances for CapMonster.
data CapMonster
-- | Parse the http response into the captcha answer, handling any errors
-- found.
parseResponse :: (Value -> Maybe Value) -> Either HttpException (Response ByteString) -> Either CapMonsterError Value
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.CapMonster.Internal.CapMonster r m
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.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.CapMonster.Internal.CapMonster Captcha.Internal.Types.FunCaptcha r m
instance Captcha.Internal.Monad.Class.CaptchaResponse Captcha.CapMonster.Internal.CapMonster Captcha.Internal.Types.FunCaptcha
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.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.CapMonster.Internal.CapMonster Captcha.Internal.Types.HCaptcha r m
instance Captcha.Internal.Monad.Class.CaptchaResponse Captcha.CapMonster.Internal.CapMonster Captcha.Internal.Types.HCaptcha
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.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.CapMonster.Internal.CapMonster Captcha.Internal.Types.ImageCaptcha r m
instance Captcha.Internal.Monad.Class.CaptchaResponse Captcha.CapMonster.Internal.CapMonster Captcha.Internal.Types.ImageCaptcha
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.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.CapMonster.Internal.CapMonster Captcha.Internal.Types.ReCaptchaV2 r m
instance Captcha.Internal.Monad.Class.CaptchaResponse Captcha.CapMonster.Internal.CapMonster Captcha.Internal.Types.ReCaptchaV2
-- | This module is for internal-use and does not follow pvp versioning
-- policies.
module Captcha.CapMonster.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.CapMonster.Internal.CapMonster Captcha.Internal.Types.ReCaptchaV3 r m
instance Captcha.Internal.Monad.Class.CaptchaResponse Captcha.CapMonster.Internal.CapMonster Captcha.Internal.Types.ReCaptchaV3
-- | This module exports functions that follow the pvp versioning policies.
module Captcha.CapMonster
-- | An error code returned by the CapMonster API.
data CapMonsterErrorCode
-- | The provided API key does not exist.
KeyDoesNotExist :: CapMonsterErrorCode
-- | The size of the captcha must be 100 bytes or larger.
ZeroCaptchaFileSize :: CapMonsterErrorCode
-- | The size of the captcha must be less than 50,000 bytes.
TooBigFileSize :: CapMonsterErrorCode
-- | Your CapMonster balance is empty.
ZeroBalance :: CapMonsterErrorCode
-- | Requests from your current API key is not allowed from your ip.
IpNotAllowed :: CapMonsterErrorCode
-- | The captcha cannot be solved. Perhaps it's a corrupted image, or
-- contains too much noise?
CaptchaUnsolvable :: CapMonsterErrorCode
-- | The captcha id does not exist. Is the captcha older than 5 minutes?
InvalidCaptchaId :: CapMonsterErrorCode
-- | The captcha has not been solved yet.
CaptchaNotReady :: CapMonsterErrorCode
-- | You have sent too many requests with an incorrect API key. Try again
-- later.
IpBanned :: CapMonsterErrorCode
-- | The requested method does not exist. You should not ever have to see
-- this error as a user. If this is ever seen, please open an issue:
-- https://github.com/qwbarch/captcha-haskell/issues
NoSuchMethod :: CapMonsterErrorCode
-- | You are being rate limited. Try not to request the result of a captcha
-- more than 1 time per 2 seconds.
TooManyRequests :: CapMonsterErrorCode
-- | The specified domain cannot be solved by CapMonster.
DomainNotAllowed :: CapMonsterErrorCode
-- | The captcha could not be solved due to no available captcha workers.
NoSlotAvailable :: CapMonsterErrorCode
-- | All possible errors when solving a captcha using CapMonster.
data CapMonsterError
-- | An error returned by the CapMonster API.
CapMonsterResponseError :: CapMonsterErrorCode -> CapMonsterError
-- | An error returned by the CapMonster API that does not exist as a
-- CapMonsterErrorCode yet.
--
-- This error holds the error code, followed by its description.
UnknownResponseError :: Text -> Text -> CapMonsterError
-- | An unknown error occurred. Check the message for more details.
--
-- This should never occur. Please report this issue on github if this
-- happens to you.
UnknownError :: Text -> CapMonsterError
-- | An error when sending the http request.
NetworkError :: HttpException -> CapMonsterError
-- | The captcha took to long to solve and was timed out.
TimeoutError :: CapMonsterError
-- | Used for picking MonadCaptcha instances for CapMonster.
data CapMonster