/
CaptchaAPI.ts
45 lines (39 loc) · 1.01 KB
/
CaptchaAPI.ts
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import BaseAPI from "./BaseAPI";
import Client from "../Client";
export type GetCaptchaMetadata = {
funCaptchaPublicKeys: {
type: string;
value: string;
}[];
}
export type GetLanguageResources = {
languageResources: unknown;
}
export default class CaptchaAPI extends BaseAPI {
constructor (client: Client) {
super({
client,
baseUrl: "https://captcha.roblox.com/"
});
}
getCaptchaMetaData (): Promise<GetCaptchaMetadata> {
return this.request({
requiresAuth: false,
request: {
path: `v1/captcha/metadata`
},
json: true
})
.then(response => response.body);
}
getLanguageResources (): Promise<GetLanguageResources> {
return this.request({
requiresAuth: false,
request: {
path: `v1/language-resources`
},
json: true
})
.then(response => response.body);
}
}