From 57719018ca00227559262c1578e5b6870ecad541 Mon Sep 17 00:00:00 2001 From: "sati.ac" Date: Thu, 13 Jul 2023 17:55:37 +0300 Subject: [PATCH] feat: add funcaptcha support --- tasks.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tasks.go b/tasks.go index 1df13c2..0e2eb53 100644 --- a/tasks.go +++ b/tasks.go @@ -51,3 +51,25 @@ func (t *ReCaptcha2Task) Result() any { type ReCaptcha2Result struct { Token string `json:"token"` } + +type FunCaptchaTask struct { + SiteKey string `json:"siteKey"` + PageUrl string `json:"pageUrl"` + Data map[string]string `json:"data,omitempty"` + ServiceUrl *string `json:"serviceUrl,omitempty"` +} + +func (t *FunCaptchaTask) serialize() task { + return task{ + Type: "FunCaptcha", + Data: t, + } +} + +func (t *FunCaptchaTask) Result() any { + return &FunCaptchaResult{} +} + +type FunCaptchaResult struct { + Token string `json:"token"` +}