get_brazil_vehicle_brands: Get Vehicle Brands from BrasilAPI (FIPE Data)
Description
This function retrieves a list of vehicle brands in Brazil using the BrasilAPI
endpoint, which provides data sourced from FIPE (Fundação Instituto de Pesquisas Econômicas).
The user must specify the type of vehicle: `"carros"`, `"motos"`, or `"caminhoes"`.
Usage
get_brazil_vehicle_brands(tipo_veiculo)
Value
A tibble (data frame) with the following columns:
nome: Brand name.
valor: FIPE code of the brand.
Arguments
tipo_veiculo
A string indicating the type of vehicle. Must be one of `"carros"`, `"motos"`, or `"caminhoes"`.
Details
This function sends a GET request to the BrasilAPI endpoint and parses the list of vehicle brands.
If the API returns an error (e.g., invalid vehicle type), the function will return NULL.