UNPKG

@termii/node

Version:

Nodejs SDK wrapper for Termii API written with Typescript support

25 lines (24 loc) 972 B
import { AxiosInstance } from 'axios'; import { IAxiosStruct } from './utils'; /** * Represents the TermiiCore class, which provides an interface for making HTTP requests using Axios with a specific API key. */ export declare class TermiiCore { apiKey: string; /** * The AxiosInstance used to make HTTP requests. * @type {AxiosInstance} */ request: AxiosInstance; /** * Constructs a new TermiiCore instance. * @param {string} apiKey - The API key used for authentication in API requests. */ constructor(apiKey: string); /** * Makes an HTTP request using Axios based on the provided request structure. * @param {IAxiosStruct} req - The request structure containing method, URL, and data. * @returns {Promise} A promise that resolves with the Axios response or rejects with an error. */ useRequest(req: IAxiosStruct): Promise<import("axios").AxiosResponse<any, any>>; }