Documentation
¶
Index ¶
- Variables
- type APIError
- type ActivateRequest
- type ActivateResponse
- type Client
- func (c *Client) Activate() (*ActivateResponse, error)
- func (c *Client) Quote(activation string) (*QuoteResponse, error)
- func (c *Client) Redeem(activation, quote string, submissions []string, solveDuration int) (*RedeemResponse, error)
- func (c *Client) ScrapeContext() (SolveContext, error)
- func (c *Client) Solve() (string, error)
- func (c *Client) Verify(token, apiKey string) (*VerifyResponse, error)
- type Payment
- type PaymentEntry
- type QuoteRequest
- type QuoteResponse
- type RedeemRequest
- type RedeemResponse
- type SolveContext
- type VerifyRequest
- type VerifyResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var (
VERSION = "0.1.36"
)
Functions ¶
This section is empty.
Types ¶
type ActivateRequest ¶
type ActivateResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Activate ¶
func (c *Client) Activate() (*ActivateResponse, error)
func (*Client) ScrapeContext ¶
func (c *Client) ScrapeContext() (SolveContext, error)
ScrapeContext fetches the agent iframe page and extracts the solve context variables.
type Payment ¶
type Payment struct {
Entries []PaymentEntry `json:"entries"`
}
type PaymentEntry ¶
type QuoteRequest ¶
type QuoteResponse ¶
type RedeemRequest ¶
type RedeemRequest struct {
Sitekey string `json:"sitekey"`
SolveContext string `json:"solve_context"`
Activation string `json:"activation"`
Quote string `json:"quote"`
Payment Payment `json:"payment"`
Signals string `json:"signals"`
WidgetID string `json:"widget_id"`
SolveDurationWall int `json:"solve_duration_wall"`
SolveDurationAccum int `json:"solve_duration_accumulated"`
TS int64 `json:"ts"`
}
type RedeemResponse ¶
type SolveContext ¶
type VerifyRequest ¶
Click to show internal directories.
Click to hide internal directories.