client
This commit is contained in:
parent
90a08897e0
commit
190cb9cd02
1 changed files with 1 additions and 3 deletions
|
@ -1,14 +1,12 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import config from "../utils/config.json";
|
import config from "../utils/config.json";
|
||||||
import { CODMClientOptions } from "./codmclient.interface";
|
|
||||||
/**
|
/**
|
||||||
* @name APIClient
|
* @name APIClient
|
||||||
* @kind constructor
|
* @kind constructor
|
||||||
* @param {String} key Authorization Key for API (Only for CODM commands)
|
* @param {String} key Authorization Key for API (Only for CODM commands)
|
||||||
*/
|
*/
|
||||||
export class CODMClient {
|
export class CODMClient {
|
||||||
public key: CODMClientOptions;
|
constructor(public key: string) {
|
||||||
constructor(key: CODMClientOptions) {
|
|
||||||
if (key && typeof key !== "string")
|
if (key && typeof key !== "string")
|
||||||
throw new TypeError("API key must be a string");
|
throw new TypeError("API key must be a string");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue