-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ts
37 lines (28 loc) · 921 Bytes
/
test.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
import { DBDTeamClient, Endpoint, EndpointType } from "./dist";
const api_key =
"...";
const client = new DBDTeamClient(api_key, {
debug: true,
});
void (async function Main() {
const canvas = new Endpoint(EndpointType.Canvas, client);
const utils = new Endpoint(EndpointType.Utils, client);
const fun = new Endpoint(EndpointType.Fun, client);
console.log((await canvas.get("clyde", { text: "Hail Grasa >:v" })).data);
console.log(
(await utils.get("translate", { text: "Hola mundo!", to: "es" })).data
.result.translation
);
console.log("Joke: " + (await fun.get("joke")).data);
})();
// ! BULLSHIT ! ~ Pavéz
// new Canvas(client)
// .get("clyde", {
// text: "Hello World!",
// })
// .then((data) => console.log(data.data))
// .catch(console.error);
// new Fun(client)
// .get("joke")
// .then((data) => console.log("Joke: ", data.joke))
// .catch(console.error);