@shaggytools/nhtsa-api-wrapper
Version:
Universal javascript wrapper for the NHTSA.dot.gov VPIC 'vehicles' API, useful for VIN decoding, etc.
35 lines • 1.42 kB
TypeScript
/**
* @module api/endpoints/GetVehicleTypesForMake
* @category API Endpoints
*/
import type { NhtsaResponse } from '../../types';
/**
* ::: tip :bulb: More Information
* See: [GetVehicleTypesForMake Documentation](/api/endpoints/get-vehicle-types-for-make)
* :::
*
* `GetVehicleTypesForMake` returns all the Vehicle Types in the vPIC dataset for a specified Make,
* whose name is LIKE the make name in the vPIC Dataset.
*
* `makeName` can be a partial name, or a full name for more specificity, e.g., "Merc",
* "Mercedes Benz", etc.
*
* @param {string} makeName - Name of the vehicle make to search
* @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL
* (default: `true`)
* @returns {(Promise<NhtsaResponse<GetVehicleTypesForMakeResults> | string>)} - Api Response
* `object` -or- url `string` if `doFetch = false`
*/
declare function GetVehicleTypesForMake(makeName: string, doFetch?: true): Promise<NhtsaResponse<GetVehicleTypesForMakeResults>>;
declare function GetVehicleTypesForMake(makeName: string, doFetch: false): Promise<string>;
export { GetVehicleTypesForMake };
/**
* Objects found in the `Results` array of `GetVehicleTypesForMake` endpoint response.
*/
export type GetVehicleTypesForMakeResults = {
MakeId: number;
MakeName: string;
VehicleTypeId: number;
VehicleTypeName: string;
};
//# sourceMappingURL=GetVehicleTypesForMake.d.ts.map