-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
28 lines (25 loc) · 773 Bytes
/
index.ts
File metadata and controls
28 lines (25 loc) · 773 Bytes
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
import TwoCaptcha from './src/solvers/2captcha';
import CapMonster from './src/solvers/CapMonster';
import { Options, CaptchaClient } from './src/utils/types';
class NotYetImplemented extends Error {
constructor() {
super();
this.name = "NotYetImplemented";
this.message = "Service not yet implemented, please created a pull request or suggestion at https://github.com/zMrKrabz/NoCap"
};
};
export {
TwoCaptcha,
CapMonster,
CaptchaClient,
};
export default function launchSolver(service: "2Captcha" | "CapMonster", key: string, options?: Options): CaptchaClient {
switch (service) {
case "2Captcha":
return new TwoCaptcha(key, options);
case "CapMonster":
return new CapMonster(key, options);
default:
throw new NotYetImplemented();
};
};