datasquirel/utils/get.d.ts
Benjamin Toby 7bd4b2fe65 Updates
2024-12-08 09:58:57 +01:00

27 lines
1.0 KiB
TypeScript

export = get;
/**
* Make a get request to Datasquirel API
* ==============================================================================
* @async
*
* @param {Object} params - Single object passed
* @param {string} [params.key] - API Key
* @param {string} [params.db] - Database Name
* @param {string} params.query - SQL Query
* @param {string[]} [params.queryValues] - An array of query values if using "?" placeholders
* @param {string} [params.tableName] - Name of the table to query
* @param {boolean} [params.useLocal] - Whether to use a remote database instead of API
* @param {string | number} [params.user_id] - User ID
*
* @returns { Promise<import("../package-shared/types").GetReturn> } - Return Object
*/
declare function get({ key, db, query, queryValues, tableName, useLocal, user_id, }: {
key?: string;
db?: string;
query: string;
queryValues?: string[];
tableName?: string;
useLocal?: boolean;
user_id?: string | number;
}): Promise<import("../package-shared/types").GetReturn>;