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