feat: add funcaptcha support
This commit is contained in:
		
							
								
								
									
										22
									
								
								tasks.go
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								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"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user