MCPcopy Index your code
hub / github.com/BrasilAPI/BrasilAPI / listReferenceTables

Function listReferenceTables

services/fipe/referenceTable.js:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { FIPE_URL } from './constants';
4
5export async function listReferenceTables() {
6 const { data } = await axios.post(
7 `${FIPE_URL}/veiculos/ConsultarTabelaDeReferencia`,
8 {},
9 {
10 headers: {
11 'Content-Type': 'application/x-www-form-urlencoded',
12 },
13 }
14 );
15
16 return data
17 .map((item) => ({ codigo: item.Codigo, mes: item.Mes }))
18 .sort((a, b) => b.codigo - a.codigo);
19}
20
21export async function getLatestReferenceTable() {
22 const tables = await listReferenceTables();

Callers 6

FipeAutomakersFunction · 0.90
FipeTruckAutomakersFunction · 0.90
FipeVehiclesFunction · 0.90
FipeReferenceTablesFunction · 0.90
getFipePriceInfoFunction · 0.90
getLatestReferenceTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected