2captcha-0.1.0.0: Haskell package for easy integration with the 2captcha API.
Safe HaskellNone
LanguageHaskell2010

TwoCaptcha.Internal.Client

Synopsis

Documentation

handle :: (MonadIO m, MonadCatch m) => IO (Response ByteString) -> m Text Source #

Runs the given http method and adapts errors to TwoCaptchaException.

class TwoCaptchaClient m where Source #

Encapsulates the in.php and res.php endpoints for the 2captcha API.

Methods

submit :: (Coercible Captcha a, HasCaptchaLenses a, HasCommonCaptchaLenses a) => Session -> a -> m CaptchaId Source #

Submit a captcha to be solved by the 2captcha API. Returns a captcha id used for answer.

answer :: Session -> CaptchaRes -> m Text Source #

Attempt to retrieve the answer of a captcha previously submitted.

solve :: (Coercible Captcha a, HasCaptchaLenses a, HasCommonCaptchaLenses a) => PollingInterval -> TimeoutDuration -> Session -> a -> m Text Source #

Submits a captcha and polls for the answer.