@xfallseane/intersect.ts
Version:
The Intersect Engine API Client Library based on TS.
45 lines • 1.99 kB
TypeScript
import { Admin } from './endpoints/admin.js';
import { Authentification } from './endpoints/authentification.js';
import { Chat } from './endpoints/chat.js';
import { GameObjects } from './endpoints/gameobjects.js';
import { Logs } from './endpoints/logs.js';
import { Players } from './endpoints/players.js';
import { Server } from './endpoints/server.js';
import { Users } from './endpoints/users.js';
import { Variables } from './endpoints/variables.js';
/**
* @class Client
* @description The main class of the API
* @link API documentation: https://docs.freemmorpgmaker.com/en-US/api/v1/
* @param {string} url - The url of the API server you're trying to connect to.
* @param {number | string} port - The port of the API server.
* @param {string} token The token getted from the API server.
* @param {string} refreshToken The refresh token getted from the API server.
* @return {Client} The Client objets, with all the endpoints.
* @example
*/
export declare class Client {
private _url;
private _token;
private _refreshToken;
Admin: Admin;
Auth: Authentification;
Chat: Chat;
GameObjects: GameObjects;
Logs: Logs;
Players: Players;
Server: Server;
Users: Users;
Variables: Variables;
constructor(url: string, port: number | string, token: string, refreshToken: string, tokenCooldown?: number);
}
/**
* It takes in a url, port, username, and password and returns a json object containing the access token.
* @param {string} url - The url of the API server you're trying to connect to.
* @param {number | string} port - The port of the API server.
* @param {string} username - The username of the API user.
* @param {string} password - The password of the API user.
* @returns The JSON token is being returned.
*/
export declare function initToken(url: string, port: number | string, username: string, password: string): Promise<any>;
//# sourceMappingURL=client.d.ts.map