@shaggytools/nhtsa-api-wrapper
Version:
Universal javascript wrapper for the NHTSA.dot.gov VPIC 'vehicles' API, useful for VIN decoding, etc.
36 lines • 1.59 kB
TypeScript
/**
* @module api/endpoints/GetVehicleVariableValuesList
* @category API Endpoints
*/
import type { NhtsaResponse } from '../../types';
/**
* ::: tip :bulb: More Information
* See: [GetVehicleVariableValuesList Documentation](/api/endpoints/get-vehicle-variable-values-list)
* :::
*
* `GetVehicleVariableValuesList` provides a list of all the accepted values for a given variable
* that are stored in the vPIC dataset.
*
* If `variableValue` is a string, it must use full name, not just part of it, e.g.,
* "Battery Type", not "Battery"
*
* `variableValue` can be also be a number, which is the ID of the variable, e.g., 1, 2, 3, etc.
*
* @param {(string|number)} variableValue - The variable you want to get a values list of
* @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL
* (default: `true`)
* @returns {(Promise<NhtsaResponse<GetVehicleVariableValuesListResults> | string>)} - Api Response
* `object` -or- url `string` if `doFetch = false`
*/
declare function GetVehicleVariableValuesList(variableValue: string | number, doFetch?: true): Promise<NhtsaResponse<GetVehicleVariableValuesListResults>>;
declare function GetVehicleVariableValuesList(variableValue: string | number, doFetch: false): Promise<string>;
export { GetVehicleVariableValuesList };
/**
* Objects found in the `Results` array of `GetVehicleVariableValuesList` endpoint response.
*/
export type GetVehicleVariableValuesListResults = {
ElementName: string;
Id: number;
Name: string;
};
//# sourceMappingURL=GetVehicleVariableValuesList.d.ts.map