Projeto para facilitar e auxiliar na integração com as APIs disponibilizada no Projeto BrasilAPI.
Atualmente o projeto implementando todas as APIs disponiveis para utilização.
Para criar uma instância com configuração default criar da seguinte forma:
Onde a URI_API seria a URL: https://brasilapi.com.br/api
Para ativar cada Endpoint e necessário informar o enableBankService de cada serviço que queira utilizar.
BrasilAPIIntegration brasilAPIIntegration = BrasilAPIIntegration.builder(URI_API)
.configurationDefaultBuild()
.configureBrasilAPIService()
.enableBankService()
.enableCepService()
.enableDirectDialDistanceService()
.enableFipeService()
.enableIBGEService()
.enableISBNService()
.enableJuridicalPersonService()
.enableNatinalHolidayService()
.enableNCMService()
.enableRateService()
.enableRegistroBRService()
.buildServices()
.levelLogger(Level.FULL)
.configureOptionsRequest()
.connectTimeout(1L)
.connectTimeoutUnit(TimeUnit.MINUTES)
.readTimeout(30L)
.readTimeoutUnit(TimeUnit.SECONDS)
.followRedirects(true)
.buildOptionsRequest()
.build();
Caso não seja configurado OptionsRequest ele será criado com configuração default.
this.connectTimeout = 10L;
this.connectTimeoutUnit = TimeUnit.SECONDS;
this.readTimeout = 60L;
this.readTimeoutUnit = TimeUnit.SECONDS;
this.followRedirects = true;
O projeto seguira a ordem descrita para implementação de novos recursos
- Integração utilizando Open Feign
- Integração com Spring Boot
- Disponibilizar no Maven Repository
- Melhoria na cobertura de Testes unitarios e Integração
- Suporte a Java 11, 17 e posteriores.
MIT License
Copyright (c) 2022 BrasilApiIntegration
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.