accordous / fluxous-client
Client for Fluxous API
Installs: 1 881
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- ext-json: *
- guzzlehttp/guzzle: ^6.5|^7.3
- illuminate/http: ^7.0|^8.0|^9.0
- illuminate/support: ^7.0|^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-25 14:46:52 UTC
README
Esse pacote auxilia no consumo da API do Fluxous utilizando Laravel.
Documentação: Fluxous - Manual API.
Instalação
composer require accordous/fluxous-client
Configuração
- Publique o arquivo de configuração caso tenha interesse em alterar algum dos valores pré-definidos
php artisan vendor:publish --tag=Fluxous
- Altere as configurações no arquivo
.env
do seu projeto Laravel
FLUXOUS_HOST='https://api.fluxous.com.br'
FLUXOUS_API='/v1'
Recursos
- Autenticação
/auth/token
use Accordous\FluxousClient\Services\FluxousService; $service = new FluxousService(); $data = [ 'client_id' => '', 'client_secret' => '', ]; $response = $service->auth()->token($data); $result = $response->json();
- Categorias
/categories
get
use Accordous\FluxousClient\Services\FluxousService; $service = new FluxousService($clientId, $clientSecret); $response = $service->categories()->index(); $result = $response->json();
post
use Accordous\FluxousClient\Services\FluxousService; $service = new FluxousService($clientId, $clientSecret); $attributes = [ '' => '', ]; $response = $service->categories()->store($attributes); $result = $response->json();
- Contas
/accounts
use Accordous\FluxousClient\Services\FluxousService; $service = new FluxousService($clientId, $clientSecret); $attributes = [ '' => '', ]; $response = $service->accounts()->store($attributes); $result = $response->json();
- Transações
use Accordous\FluxousClient\Services\FluxousService; $service = new FluxousService($clientId, $clientSecret); $attributes = [ '' => '', ]; $response = $service->transactions()->store($attributes); $result = $response->json();