-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.go
28 lines (25 loc) · 1.07 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"log"
"github.com/andrewdruzhinin/go-anti-captcha/anticaptcha"
)
func main() {
client := anticaptcha.NewClient("apiKey") //Set your apiKey
balance, err := client.Account.GetBalance()
if err != nil {
log.Fatalf("error: %v\n", err)
} else {
log.Printf("Balance: %f\n", balance)
}
sysStat, err := client.GetSystemStat()
if err != nil {
log.Fatalf("error: %v\n", err)
}
log.Printf("Amount of workers waiting for a captcha from English Queue: %v", sysStat.Waiting)
log.Printf("Amount of workers waiting for a captcha from Russian Queue: %v", sysStat.WaitingRU)
log.Printf("Represents current demand/supply ratio: %v", sysStat.Load)
log.Printf("Minimum bid required to enter English Queue. Account's maximum bid must be higher than this value.: %v", sysStat.Minbid)
log.Printf("Minimum bid required to enter Russian Queue: %v", sysStat.MinbidRU)
log.Printf("Average captcha recognition time in English Queue: %v", sysStat.AverageRecognitionTime)
log.Printf("Average captcha recognition time in Russian Queue: %v", sysStat.AverageRecognitionTimeRU)
}