Vasconcellos.FipeTable.Types 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Vasconcellos.FipeTable.Types --version 2.0.0
NuGet\Install-Package Vasconcellos.FipeTable.Types -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vasconcellos.FipeTable.Types" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vasconcellos.FipeTable.Types --version 2.0.0
#r "nuget: Vasconcellos.FipeTable.Types, 2.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Vasconcellos.FipeTable.Types as a Cake Addin
#addin nuget:?package=Vasconcellos.FipeTable.Types&version=2.0.0

// Install Vasconcellos.FipeTable.Types as a Cake Tool
#tool nuget:?package=Vasconcellos.FipeTable.Types&version=2.0.0

FIPE table Library [en-us]; Biblioteca da tabela FIPE [pt-br];

Description: Library for using vehicles data from the FIPE table.

License: MIT License
Author: Pedro Henrique Vasconcellos
Site: https://vasconcellos.solutions
Note [en-us].
  • Use the [FipeVehicleTypesEnum] enumerator to say what type of vehicle you want to download for.
  • Types of vehicles contained in the enumerator [FipeVehicleTypesEnum] (Car = 1, Motorcycle = 2, TruckAndMicroBus = 3)
  • If the (referenceCode == 0), the most current reference will be used, that is, the most current data from the fipe table will be downloaded.
  • Warning: Do not call more than one FIPE library download service method in parallel, as the Proxy FIPE will block your IP for a certain time (5-10 minutes maybe).
  • If you want to create the tables in the relational database [MSSQL / SqlServer], there are SQL scripts in the directory=[../Vasconcellos.FipeTable.Database/Tables/].
  • If you to view [Vehicle.Year = 32000], it means that this vehicle is a Zero KM vehicle (New).
Observações [pt-br]:
  • Use o enumerador [FipeVehicleTypesEnum] para dizer qual o tipo de veículo você deseja realizar o downlad.
  • Tipos de veículos contidos no enumerador [FipeVehicleTypesEnum] (Carro = 1, Motocicleta = 2, Caminhão e Micro-Ônibus = 3)
  • Se o (referenceCode == 0), a referência mais atual será usada, ou seja, os dados mais atuais da tabela fipe serão baixados.
  • Aviso: não chame mais de um método de serviço de download da biblioteca FIPE em paralelo, pois o Proxy da FIPE bloqueará o seu IP por um determinado tempo (talvez de 5 a 10 minutos).
  • Se você deseja criar as tabelas no banco de dados relacional [MSSQL / SqlServer], existem scripts SQL no diretório = [../Vasconcellos.FipeTable.Database/Tables/].
  • Se você visualizar [Vehicle.Year = 32000], quer dizer que este veículo, é um veículo Zero KM (Novo).
Library to download the data from the fipe table through FIPE WebAPI.
Library with the entities for the use of vehicle data from the FIPE table.

Example of using the FIPE table library.

using Microsoft.Extensions.Logging;
using Vasconcellos.FipeTable.DownloadService.Infra;
using Vasconcellos.FipeTable.DownloadService.Infra.Interfaces;
using Vasconcellos.FipeTable.DownloadService.Services;
using Vasconcellos.FipeTable.DownloadService.Services.Interfaces;
using Vasconcellos.FipeTable.Types.Enums;

public class Example()
{
    private readonly ILogger _logger;
    private readonly IHttpRequestSettings _httpRequestSettings;
    private readonly IHttpRequest _httpRequest;
    private readonly IFipeDownloadService _downloadService;
    private readonly IFipeNormalizedDownloadService _normalizedDownloadService;

    /// <summary>
    /// Builder.
    /// </summary>
    public Example()
    {
        this._logger = new LoggerFactory().CreateLogger("LoggerFIPE");
        this._httpRequestSettings = new HttpRequestSettings();
        this._httpRequest = new HttpRequest(this._logger, this._httpRequestSettings);
        this._downloadService = new FipeDownloadService(this._logger, this._httpRequest);
        this._normalizedDownloadService = new FipeNormalizedDownloadService(this._logger, this._downloadService);
    }

    public NormalizedDownloadResult GetExample(FipeVehicleTypesEnum vehicleType, int referenceCode = 0)
    {
        var result = this._normalizedDownloadService.GetDataFromFipeTableByVehicleType(vehicleType, referenceCode);
        if(result.VehicleType == vehicleType && result.ReferenceCode == referenceCode
            && result.Brands.Count > 0 && result.Models.Count > 0 && result.Vehicles.Count > 0)
            return result;
        else 
            return null;
    }
}

Object to be consumed.

using System.Collections.Generic;
using Vasconcellos.FipeTable.Types.Entities;
using Vasconcellos.FipeTable.Types.Enums;

namespace Vasconcellos.FipeTable.DownloadService.Models.NormalizedDownloads
{
    public class NormalizedDownloadResult
    {
        public int ReferenceCode { get; private set; }
        public FipeVehicleTypesEnum VehicleType { get; set; }
        public IList<FipeVehicleBrand> Brands { get; private set; }
        public IList<FipeVehicleModel> Models { get; private set; }
        public IList<FipeVehicleInformation> Vehicles { get; private set; }
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Vasconcellos.FipeTable.Types:

Package Downloads
Vasconcellos.FipeTable.DownloadService

Library to download the data from the fipe table through FIPE WebAPI.

Vasconcellos.FipeTable.UploadService

Library to upload the data from the fipe table in the database through FIPE Web API. Save the data from the fipe table on MongoDB.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.0 249 3/24/2023
4.5.0 579 8/31/2022
4.0.0 663 3/3/2021
3.5.0 410 3/1/2021
2.0.0 1,005 2/10/2020

Correction of the vehicle model entity and new implementations