internetarchive-sdk-js
Version:
NodeJS / Typescript SDK for Internet Archive APIs
19 lines (18 loc) • 573 B
TypeScript
import { type Endpoint } from './endpoints.js';
import { IaOptions } from './types.js';
interface RequestOptions {
path?: string;
params?: Record<string, any>;
body?: Record<string, any>;
data?: any;
headers?: Record<string, any>;
}
declare class HttpClient {
token?: string | null;
options: IaOptions;
static default: typeof HttpClient;
constructor(token?: string | null, options?: IaOptions);
checkToken: () => void;
makeRequest: (endpoint: Endpoint, options?: RequestOptions) => Promise<unknown>;
}
export default HttpClient;