Skip to content

Commit

Permalink
feature: complex image task added
Browse files Browse the repository at this point in the history
  • Loading branch information
alperensert committed Mar 10, 2023
1 parent 26d2154 commit da039c6
Show file tree
Hide file tree
Showing 10 changed files with 267 additions and 12,100 deletions.
4 changes: 4 additions & 0 deletions docs/src/config/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
items:
- label: "Image to Text"
link: "/usage/image-to-text"
- label: "Complex Image (new)"
link: "/usage/complex-image"
- label: "ReCAPTCHA V2"
link: "/usage/recaptcha-v2"
- label: "ReCAPTCHA V2 Enterprise"
Expand All @@ -30,6 +32,8 @@
link: /api/capmonster-client
- label: class CapmonsterError
link: /api/capmonster-error
- label: class ComplexImageTask
link: /api/complex-image-task
- label: class RecaptchaV2Task
link: /api/recaptcha-v2-task
- label: class GeeTestTask
Expand Down
30 changes: 30 additions & 0 deletions docs/src/docs/all-interfaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@ description: Learn more about interfaces which used in node-capmonster

## interfaces

### IComplexImageTaskRequest

```ts
interface IComplexImageTaskRequest extends ITask {
type: "ComplexImageTask"
class: "recaptcha" | "hcaptcha"
imageUrls?: string[]
imagesBase64?: string[]
metadata: RequireAtLeastOne<MetaData, "Task" | "TaskDefinition">
}
```

### IComplexImageTaskRequest.MetaData

```ts
interface MetaData {
Grid?: string | "4x4" | "3x3" | "1x1"
TaskDefinition?: string
Task?: string
}
```

### IComplexImageTaskResponse

```ts
interface IComplexImageTaskResponse extends ITaskSolution {
answer: boolean[]
}
```

### IFuncaptchaTaskRequest

```ts
Expand Down
39 changes: 39 additions & 0 deletions docs/src/docs/api/complex-image-task.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: class CapmonsterError
description: class ComplexImageTask API
---

## extend

| Class | Link |
| ------- | -------------------------- |
| UAProxy | [see](/api/ua-proxy-class) |

> Proxy usage is not allowed in this task type.
> Only user agent will sent with task.
## constructor

| Parameter | Type | Required | Default value | Purpose |
| --------- | ------ | -------- | ------------- | --------------------------------- |
| clientKey | string | Yes | - | Your unique key to solve captchas |

## methods

### task

Creates only the task configuration for reuseable tasks. <br/>
_@returns_ **Omit<[IComplexImageTaskRequest](/all-interfaces#icompleximagetaskrequest), "type">**

| Parameter | Type | Required | Default value |
| --------- | ---------------------------------------------------------------------------------- | -------- | ------------- |
| task | Omit<[IComplexImageTaskRequest](/all-interfaces#icompleximagetaskrequest), "type"> | Yes | - |

### async createWithtask

Creates a funcaptcha task for solving. <br/>
_@returns_ **ID of the created task**

| Parameter | Type | Required | Default value |
| --------- | ---------------------------------------------------------------------------------- | -------- | ------------- |
| task | Omit<[IComplexImageTaskRequest](/all-interfaces#icompleximagetaskrequest), "type"> | Yes | - |
8 changes: 8 additions & 0 deletions docs/src/docs/usage/complex-image.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: ComplexImage Task
description: Learn how to solve complex image task with node-capmonster.
---

The object contains data about the task for solving hCaptcha or reCaptcha.

> content will be here soon...
Loading

0 comments on commit da039c6

Please sign in to comment.