From 6cd9b56293ba73f250e7bed1f239500bf4fe21d5 Mon Sep 17 00:00:00 2001 From: Night Kaly <77528305+night0721@users.noreply.github.com> Date: Mon, 13 Sep 2021 19:09:30 +0800 Subject: [PATCH] Delete src directory --- src/class/apiclient.js | 35 ----------------------------------- src/functions/8ball.js | 13 ------------- src/typings/index.d.ts | 14 -------------- src/utils/config.json | 3 --- 4 files changed, 65 deletions(-) delete mode 100644 src/class/apiclient.js delete mode 100644 src/functions/8ball.js delete mode 100644 src/typings/index.d.ts delete mode 100644 src/utils/config.json diff --git a/src/class/apiclient.js b/src/class/apiclient.js deleted file mode 100644 index 006c734..0000000 --- a/src/class/apiclient.js +++ /dev/null @@ -1,35 +0,0 @@ -const axios = require("axios"); -const config = require("../utils/config.json"); -/** - * @class APIClient - **/ -class APIClient { - /** - * @name APIClient - * @kind constructor - * @param {String} key Authorization Key for API (Only for CODM commands) - * @param {String} [options.key] - */ - constructor(key, options = {}) { - if (key && typeof key !== "string") - throw new TypeError("API key must be a string"); - if (key) this.key = key; - } - /** - * Sends a CODM perk object - * @returns {Promise} - * @param {String} name - */ - async getperk(name) { - const data = await axios - .get(`${config.api}/api/v1/codm/perks?name=${name}`, { - headers: { - Authorization: this.key, - }, - }) - .then(res => res.data) - .catch(err => console.error(`Unauthorized to use`)); - return data; - } -} -module.exports = APIClient; diff --git a/src/functions/8ball.js b/src/functions/8ball.js deleted file mode 100644 index 6e4b21f..0000000 --- a/src/functions/8ball.js +++ /dev/null @@ -1,13 +0,0 @@ -const axios = require("axios"); -const config = require("../utils/config.json"); -/** - * Sends a 8ball response - * @returns {Promise} - */ -async function random() { - const data = await axios - .get(`${config.api}/api/v1/fun/8ball`) - .then(res => res.data); - return data.answer; -} -module.exports = random; diff --git a/src/typings/index.d.ts b/src/typings/index.d.ts deleted file mode 100644 index 17830a9..0000000 --- a/src/typings/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -declare module "cath" { - export class APIClient { - public constructor(key: string, options?: APIClientOptions); - - private key: string; - public options?: APIClientOptions; - - public random8ball(): Promise; - public getperk(perk: string): Promise; - } - export type APIClientOptions = { - codm?: string; - }; -} diff --git a/src/utils/config.json b/src/utils/config.json deleted file mode 100644 index fcb8deb..0000000 --- a/src/utils/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "api": "https://www.cathapi.gq" -}