2024-11-08 15:44:31 +00:00
|
|
|
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
|
2024-12-06 10:44:26 +00:00
|
|
|
* @param {boolean} [params.useLocal] - Whether to use a remote database instead of API
|
2024-12-08 08:58:57 +00:00
|
|
|
* @param {string | number} [params.user_id] - User ID
|
2024-11-08 15:44:31 +00:00
|
|
|
*
|
|
|
|
* @returns { Promise<import("../package-shared/types").GetReturn> } - Return Object
|
|
|
|
*/
|
2024-12-06 10:44:26 +00:00
|
|
|
declare function get({ key, db, query, queryValues, tableName, useLocal, user_id, }: {
|
2024-11-08 15:44:31 +00:00
|
|
|
key?: string;
|
|
|
|
db?: string;
|
|
|
|
query: string;
|
|
|
|
queryValues?: string[];
|
|
|
|
tableName?: string;
|
2024-11-18 09:34:08 +00:00
|
|
|
useLocal?: boolean;
|
2024-12-08 08:58:57 +00:00
|
|
|
user_id?: string | number;
|
2024-11-08 15:44:31 +00:00
|
|
|
}): Promise<import("../package-shared/types").GetReturn>;
|