Skip to content

Accordous/fluxous-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluxous

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();