UNPKG

@shaggytools/nhtsa-api-wrapper

Version:

Universal javascript wrapper for the NHTSA.dot.gov VPIC 'vehicles' API, useful for VIN decoding, etc.

36 lines 1.39 kB
/** * @module api/endpoints/GetModelsForMake * @category API Endpoints */ import type { NhtsaResponse } from '../../types'; /** * ::: tip :bulb: More Information * See: [GetModelsForMake Documentation](/api/endpoints/get-models-for-make) * ::: * * `GetModelsForMake` returns the Models in the vPIC dataset for a specified `makeName` * whose Name is LIKE the Make in vPIC Dataset. * * `makeName` can be a partial, or a full for more specificity, e.g., "Harley", * "Harley Davidson", etc. * * @param {string} makeName - Vehicle make name * @returns {(Promise<NhtsaResponse<GetModelsForMakeResults>>)} - Api Response object * @param {boolean} [doFetch=true] - Whether to fetch the data or just return the URL * (default: `true`) * @returns {(Promise<NhtsaResponse<GetModelsForMakeResults> | string>)} - Api Response `object` * -or- url `string` if `doFetch = false` */ declare function GetModelsForMake(makeName: string, doFetch?: true): Promise<NhtsaResponse<GetModelsForMakeResults>>; declare function GetModelsForMake(makeName: string, doFetch: false): Promise<string>; export { GetModelsForMake }; /** * Objects found in the `Results` array of `GetModelsForMake` endpoint response. */ export type GetModelsForMakeResults = { Make_ID: number; Make_Name: string; Model_ID: number; Model_Name: string; }; //# sourceMappingURL=GetModelsForMake.d.ts.map